diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/CREDITS linux-2.4.23-pre8/CREDITS --- linux-2.4.22/CREDITS 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/CREDITS 2003-10-22 22:47:54.000000000 +0000 @@ -1238,14 +1238,13 @@ N: Christoph Hellwig E: hch@infradead.org -E: hch@sgi.com D: all kinds of driver, filesystem & core kernel hacking D: freevxfs driver D: sysvfs maintainer D: chief codingstyle nitpicker -S: Auweg 38 -S: 85748 Garching -S: Germany +S: Ampferstr. 50 / 4 +S: 6020 Innsbruck +S: Austria N: Richard Henderson E: rth@twiddle.net @@ -2208,6 +2207,15 @@ E: wolfgang@iksw-muees.de D: Auerswald USB driver +N: Paul Mundt +E: lethal@linux-sh.org +P: 1024D/917167DC 563C FC60 83BB A3EE D816 E60D D4AF AD78 9171 67DC +D: Linux/SH and Linux/sh64 +D: Occasional MIPS hacker +D: fbdev hacker +S: Hamilton, Ontario +S: Canada + N: Ian A. Murdock E: imurdock@gnu.ai.mit.edu D: Creator of Debian distribution @@ -2711,7 +2719,7 @@ D: Dosemu N: Duncan Sands -E: duncan.sands@wanadoo.fr +E: duncan.sands@free.fr W: http://topo.math.u-psud.fr/~sands D: Alcatel SpeedTouch USB driver S: 69 rue Dunois @@ -2967,12 +2975,11 @@ S: USA N: Marcelo W. Tosatti -E: marcelo@conectiva.com.br -W: http://bazar.conectiva.com.br/~marcelo/ +E: marcelo.tosatti@cyclades.com D: Miscellaneous kernel hacker (mostly VM/MM work) -S: Conectiva S.A. -S: R. Tocantins, 89 - Cristo Rei -S: 80050-430 - Curitiba - Paraná +D: 2.4 maintainer +S: Av Cristovao Colombo, 462. Floresta. +S: Porto Alegre S: Brazil N: Stefan Traby diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/Documentation/Configure.help linux-2.4.23-pre8/Documentation/Configure.help --- linux-2.4.22/Documentation/Configure.help 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/Documentation/Configure.help 2003-10-22 22:49:39.000000000 +0000 @@ -2,8 +2,6 @@ # Eric S. Raymond # Steven Cole # -# Version 3.01: current with 2.4.19+ -# # Translations of this file available on the WWW: # # - Japanese, maintained by the JF Project , at @@ -19,13 +17,6 @@ # - Catalan, by Antoni Bella , at # # -# To access a document on the WWW, you need to have a direct Internet -# connection and a browser program such as netscape or lynx. If you -# only have email access, you can still use FTP and WWW servers: send -# an email to with the text -# send usenet/news.answers/internet-services/access-via-email -# in the body of the message. -# # Information about what a kernel is, what it does, how to patch and # compile it and much more is contained in the Kernel-HOWTO, available # at . Before you start @@ -109,6 +100,15 @@ like MGA monitors that you are very unlikely to see on today's systems. +Prompt for advanced kernel configuration options +CONFIG_ADVANCED_OPTIONS + This option will enable prompting for a variety of advanced kernel + configuration options. These options can cause the kernel to not + work if they are set incorrectly, but can be used to optimize certain + aspects of kernel memory management. + + Unless you know what you are doing you *should not* enable this option. + Symmetric Multi-Processing support CONFIG_SMP This enables support for systems with more than one CPU. If you have @@ -137,6 +137,15 @@ If you don't know what to do here, say N. +Maximum number of CPUs +CONFIG_NR_CPUS + This allows you to specify the maximum number of CPUs which this + kernel will support. The maximum supported value is 32 and the + mimimum value which makes sense is 2. + + This is purely to save memory - each supported CPU adds + approximately eight kilobytes to the kernel image. + Intel or compatible 80x86 processor CONFIG_X86 This is Linux's home port. Linux was originally native to the Intel @@ -1141,6 +1150,15 @@ Say Y here if you have an IDE controller which uses any of these chipsets: CMD643, CMD646 and CMD648. +Compaq Triflex IDE support +CONFIG_BLK_DEV_TRIFLEX + Say Y here if you have a Compaq Triflex IDE controller, such + as those commonly found on Compaq Pentium-Pro systems + + If you want to compile it as a module, say M here and read + . The module will be called + triflex.o. + CY82C693 chipset support CONFIG_BLK_DEV_CY82C693 This driver adds detection and support for the CY82C693 chipset @@ -1210,11 +1228,26 @@ This is a driver for the OPTi 82C621 EIDE controller. Please read the comments at the top of . +National SCx200 chipset support +CONFIG_BLK_DEV_SC1200 + This driver adds support for the built in IDE on the National + SCx200 series of embedded x86 "Geode" systems + + If you want to compile it as a module, say M here and read + . The module will be called + sc1200.o. + ServerWorks OSB4/CSB5 chipset support CONFIG_BLK_DEV_SVWKS This driver adds PIO/(U)DMA support for the ServerWorks OSB4/CSB5 chipsets. +SGI IOC4 chipset support +CONFIG_BLK_DEV_SGIIOC4 + This driver adds PIO & MultiMode DMA-2 support for the SGI IOC4 + chipset. Please say Y here, if you have an Altix System from + Silicon Graphics Inc. + Intel PIIXn chipsets support CONFIG_BLK_DEV_PIIX This driver adds PIO mode setting and tuning for all PIIX IDE @@ -1264,6 +1297,29 @@ If unsure, say N. +PROMISE PDC202{68|69|70|71|75|76|77} support +CONFIG_BLK_DEV_PDC202XX_NEW + Promise Ultra 100 TX2 [PDC20268] + Promise Ultra 133 PTX2 [PDC20269] + Promise FastTrak LP/TX2/TX4 [PDC20270] + Promise FastTrak TX2000 [PDC20271] + Promise MB Ultra 133 [PDC20275] + Promise MB FastTrak 133 [PDC20276] + Promise FastTrak 133 [PDC20277] + + This driver adds up to 4 more EIDE devices sharing a single + interrupt. This device is a bootable PCI UDMA controller. Since + multiple cards can be installed and there are BIOS ROM problems that + happen if the BIOS revisions of all installed cards (max of five) do + not match, the driver attempts to do dynamic tuning of the chipset + at boot-time for max speed. Ultra33 BIOS 1.25 or newer is required + for more than one card. + + If you say Y here, you need to say Y to "Use DMA by default when + available" as well. + + If unsure, say N. + Special UDMA Feature CONFIG_PDC202XX_BURST This option causes the pdc202xx driver to enable UDMA modes on the @@ -2031,6 +2087,17 @@ The board uses the R4300 and a R5230 CPUs. For more information about this board see . +SGI SN2 L1 serial port support +CONFIG_SGI_L1_SERIAL + If you have an SGI SN2 and you want to use the serial port connected + to the system controller (you want this!), say Y. Otherwise, say N. + +SGI SN2 L1 serial console support +CONFIG_SGI_L1_SERIAL_CONSOLE + If you have an SGI SN2 and you would like to use the system + controller serial port as your console (you want this!), say Y. + Otherwise, say N. + Support for BAGET MIPS series CONFIG_BAGET_MIPS This enables support for the Baget, a Russian embedded system. For @@ -3217,6 +3284,255 @@ If you want to compile it as a module, say M here and read . If unsure, say `N'. +IP: virtual server support +CONFIG_IP_VS + IP Virtual Server support will let you build a high-performance + virtual server based on cluster of two or more real servers. This + option must be enabled for at least one of the clustered computers + that will take care of intercepting incomming connections to a + single IP address and scheduling them to real servers. + + Three request dispatching techniques are implemented, they are + virtual server via NAT, virtual server via tunneling and virtual + server via direct routing. The several scheduling algorithms can + be used to choose which server the connection is directed to, + thus load balancing can be achieved among the servers. For more + information and its administration program, please visit the + following URL: + http://www.linuxvirtualserver.org/ + + If you want to compile it in kernel, say Y. If you want to compile + it as a module, say M here and read Documentation/modules.txt. If + unsure, say N. + +IP virtual server debugging +CONFIG_IP_VS_DEBUG + Say Y here if you want to get additional messages useful in + debugging the IP virtual server code. You can change the debug + level in /proc/sys/net/ipv4/vs/debug_level + +IPVS connection hash table size (the Nth power of 2) +CONFIG_IP_VS_TAB_BITS + The IPVS connection hash table uses the chaining scheme to handle + hash collisions. Using a big IPVS connection hash table will greatly + reduce conflicts when there are hundreds of thousands of connections + in the hash table. + + Note the table size must be power of 2. The table size will be the + value of 2 to the your input number power. The number to choose is + from 8 to 20, the default number is 12, which means the table size + is 4096. Don't input the number too small, otherwise you will lose + performance on it. You can adapt the table size yourself, according + to your virtual server application. It is good to set the table size + not far less than the number of connections per second multiplying + average lasting time of connection in the table. For example, your + virtual server gets 200 connections per second, the connection lasts + for 200 seconds in average in the connection table, the table size + should be not far less than 200x200, it is good to set the table + size 32768 (2**15). + + Another note that each connection occupies 128 bytes effectively and + each hash entry uses 8 bytes, so you can estimate how much memory is + needed for your box. + +IPVS: round-robin scheduling +CONFIG_IP_VS_RR + The robin-robin scheduling algorithm simply directs network + connections to different real servers in a round-robin manner. + + If you want to compile it in kernel, say Y. If you want to compile + it as a module, say M here and read Documentation/modules.txt. If + unsure, say N. + +IPVS: weighted round-robin scheduling +CONFIG_IP_VS_WRR + The weighted robin-robin scheduling algorithm directs network + connections to different real servers based on server weights + in a round-robin manner. Servers with higher weights receive + new connections first than those with less weights, and servers + with higher weights get more connections than those with less + weights and servers with equal weights get equal connections. + + If you want to compile it in kernel, say Y. If you want to compile + it as a module, say M here and read Documentation/modules.txt. If + unsure, say N. + +IPVS: least-connection scheduling +CONFIG_IP_VS_LC + The least-connection scheduling algorithm directs network + connections to the server with the least number of active + connections. + + If you want to compile it in kernel, say Y. If you want to compile + it as a module, say M here and read Documentation/modules.txt. If + unsure, say N. + +IPVS: weighted least-connection scheduling +CONFIG_IP_VS_WLC + The weighted least-connection scheduling algorithm directs network + connections to the server with the least active connections + normalized by the server weight. + + If you want to compile it in kernel, say Y. If you want to compile + it as a module, say M here and read Documentation/modules.txt. If + unsure, say N. + +IPVS: locality-based least-connection scheduling +CONFIG_IP_VS_LBLC + The locality-based least-connection scheduling algorithm is for + destination IP load balancing. It is usually used in cache cluster. + This algorithm usually directs packet destined for an IP address to + its server if the server is alive and under load. If the server is + overloaded (its active connection numbers is larger than its weight) + and there is a server in its half load, then allocate the weighted + least-connection server to this IP address. + + If you want to compile it in kernel, say Y. If you want to compile + it as a module, say M here and read Documentation/modules.txt. If + unsure, say N. + +IPVS: locality-based least-connection with replication scheduling +CONFIG_IP_VS_LBLCR + The locality-based least-connection with replication scheduling + algorithm is also for destination IP load balancing. It is + usually used in cache cluster. It differs from the LBLC scheduling + as follows: the load balancer maintains mappings from a target + to a set of server nodes that can serve the target. Requests for + a target are assigned to the least-connection node in the target's + server set. If all the node in the server set are over loaded, + it picks up a least-connection node in the cluster and adds it + in the sever set for the target. If the server set has not been + modified for the specified time, the most loaded node is removed + from the server set, in order to avoid high degree of replication. + + If you want to compile it in kernel, say Y. If you want to compile + it as a module, say M here and read Documentation/modules.txt. If + unsure, say N. + +IPVS: destination hashing scheduling +CONFIG_IP_VS_DH + The destination hashing scheduling algorithm assigns network + connections to the servers through looking up a statically assigned + hash table by their destination IP addresses. + + If you want to compile it in kernel, say Y. If you want to compile + it as a module, say M here and read Documentation/modules.txt. If + unsure, say N. + +IPVS: source hashing scheduling +CONFIG_IP_VS_SH + The source hashing scheduling algorithm assigns network + connections to the servers through looking up a statically assigned + hash table by their source IP addresses. + + If you want to compile it in kernel, say Y. If you want to compile + it as a module, say M here and read Documentation/modules.txt. If + unsure, say N. + +IPVS: shortest expected delay scheduling +CONFIG_IP_VS_SED + The shortest expected delay scheduling algorithm assigns network + connections to the server with the shortest expected delay. The + expected delay that the job will experience is (Ci + 1) / Ui if + sent to the ith server, in which Ci is the number of connections + on the the ith server and Ui is the fixed service rate (weight) + of the ith server. + + If you want to compile it in kernel, say Y. If you want to compile + it as a module, say M here and read Documentation/modules.txt. If + unsure, say N. + +IPVS: never queue scheduling +CONFIG_IP_VS_NQ + The never queue scheduling algorithm adopts a two-speed model. + When there is an idle server available, the job will be sent to + the idle server, instead of waiting for a fast one. When there + is no idle server available, the job will be sent to the server + that minimize its expected delay (The Shortest Expected Delay + scheduling algorithm). + + If you want to compile it in kernel, say Y. If you want to compile + it as a module, say M here and read Documentation/modules.txt. If + unsure, say N. + +IPVS: FTP protocol helper +CONFIG_IP_VS_FTP + FTP is a protocol that transfers IP address and/or port number in + the payload. In the virtual server via Network Address Translation, + the IP address and port number of real servers cannot be sent to + clients in ftp connections directly, so FTP protocol helper is + required for tracking the connection and mangling it back to that of + virtual service. + + If you want to compile it in kernel, say Y. If you want to compile + it as a module, say M here and read Documentation/modules.txt. If + unsure, say N. + +AH/ESP match support (EXPERIMENTAL) +CONFIG_IP6_NF_MATCH_AHESP + This module allows one to match AH and ESP packets. + + If you want to compile it as a module, say M here and read + . The modules will be called + ip6t_ah.o and ip6t_esp.o. + + If unsure, say 'N'. + +Routing header match support +CONFIG_IP6_NF_MATCH_RT + rt matching allows you to match packets based on the routing + header of the packet. + + If you want to compile it as a module, say M here and read + . The module will be called + ip6t_rt.o. + + If unsure, say 'N'. + +Hop-by-hop and Dst opts header match support +CONFIG_IP6_NF_MATCH_OPTS + This allows one to match packets based on the hop-by-hop + and destination options headers of a packet. + + If you want to compile it as a module, say M here and read + . The modules will be called + ip6t_hbh.o and ip6t_dst.o. + + If unsure, say 'N'. + +Fragmentation header match support +CONFIG_IP6_NF_MATCH_FRAG + frag matching allows you to match packets based on the fragmentation + header of the packet. + + If you want to compile it as a module, say M here and read + . The module will be called + ip6t_frag.o. + + If unsure, say 'N'. + +HL match support +CONFIG_IP6_NF_MATCH_HL + HL matching allows you to match packets based on the hop + limit of the packet. + + If you want to compile it as a module, say M here and read + . The module will be called + ip6t_hl.o. + + If unsure, say 'N'. + +IPv6 Extension Headers Match (EXPERIMENTAL) +CONFIG_IP6_NF_MATCH_IPV6HEADER + This module allows one to match packets based upon + the ipv6 extension headers. + + If you want to compile it as a module, say M here and read + . The module will be called + ip6t_ipv6header.o. + + If unsure, say 'N'. + SYN flood protection CONFIG_SYN_COOKIES Normal TCP/IP networking is open to an attack known as "SYN @@ -3699,25 +4015,25 @@ CONFIG_AGP_AMD_8151 This option gives you AGP support for the GLX component of - XFree86 on AMD K8 with an AGP 8151 chipset. + XFree86 on an AMD Opteron/Athlon64 using the on-CPU GART. You should say Y here if you use XFree86 3.3.6 or 4.x and want to use GLX or DRI. If unsure, say N. Generic SiS support CONFIG_AGP_SIS - This option gives you AGP support for the GLX component of the "soon - to be released" XFree86 4.x on Silicon Integrated Systems [SiS] - chipsets. + This option gives you AGP support for the GLX component of + XFree86 4.x on Silicon Integrated Systems [SiS] chipsets. - Note that 5591/5592 AGP chipsets are NOT supported. + Note that 5591/5592 AGP chipsets are NOT specifically supported; + However, the driver works well on these, too. You should say Y here if you use XFree86 3.3.6 or 4.x and want to use GLX or DRI. If unsure, say N. Serverworks LE/HE support CONFIG_AGP_SWORKS - Say Y here to support the Serverworks AGP card. See + Say Y here to support the Serverworks AGP card. See for product descriptions and images. NVIDIA chipset support @@ -3748,6 +4064,13 @@ This option gives you AGP GART support for the HP ZX1 chipset for IA64 processors. +CONFIG_AGP_ATI + This option gives you AGP support for the GLX component of + XFree86 4.x on the ATI RadeonIGP family of chipsets. + + You should say Y here if you use XFree86 3.3.6 or 4.x and want to + use GLX or DRI. If unsure, say N. + Support for ISA-bus hardware CONFIG_ISA Find out whether you have ISA slots on your motherboard. ISA is the @@ -5107,21 +5430,23 @@ This is the frame buffer device driver for the Hitachi HD64461 LCD frame buffer card. -SIS acceleration +SIS display support CONFIG_FB_SIS - This is the frame buffer device driver for the SiS 630 and 640 Super - Socket 7 UMA cards. Specs available at . + This is the frame buffer device driver for the SiS 300, 315 and 330 + series chipsets. Documentation available at the maintainer's site + at . -SIS 630/540/730 support +SIS 300 series support CONFIG_FB_SIS_300 - This is the frame buffer device driver for the SiS 630 and related - Super Socket 7 UMA cards. Specs available at - . + This enables support for SiS 300 series chipsets (300/305, 540, 630, + 730). Documentation available at the maintainer's website at + . -SIS 315H/315 support +SIS 315/330 series support CONFIG_FB_SIS_315 - This is the frame buffer device driver for the SiS 315 graphics - card. Specs available at . + This enables support for SiS 315/330 series chipsets (315, 550, 650, + M650, 651, 661FX, M661FX, 740, 741, 330). Documentation available at + the maintainer's site . IMS Twin Turbo display support CONFIG_FB_IMSTT @@ -5177,6 +5502,17 @@ is at . +Mach64 Generic LCD support +CONFIG_FB_ATY_GENERIC_LCD + Enabling this option enables the Atyfb driver to drive LCD panels. It + will autodetect the resulution and format of your display and emulate + other resolutions using the hardware stretcher on the chip. + Say Y here if you have computer with a Rage LT Pro, Rage Mobility M1, + Rage XC or Rage XL chip and a laptop LCD display or any other LCD display + that needs to be digitally driven. It is not necessary to enable this + option if you are using an LCD display with a normal VGA connector, + but it won't hurt if you do. + ATI Radeon display support CONFIG_FB_RADEON Choose this option if you want to use an ATI Radeon graphics card as @@ -5781,6 +6117,61 @@ It is safe to say N here for now. +The SCTP Protocol (EXPERIMENTAL) +CONFIG_IP_SCTP + Stream Control Transmission Protocol + + From RFC 2960 (http://www.ietf.org/rfc/rfc2960.txt) + + "SCTP is a reliable transport protocol operating on top of a + connectionless packet network such as IP. It offers the following + services to its users: + + -- acknowledged error-free non-duplicated transfer of user data, + -- data fragmentation to conform to discovered path MTU size, + -- sequenced delivery of user messages within multiple streams, + with an option for order-of-arrival delivery of individual user + messages, + -- optional bundling of multiple user messages into a single SCTP + packet, and + -- network-level fault tolerance through supporting of multi- + homing at either or both ends of an association." + + This protocol support is also available as a module ( = code which + can be inserted in and removed from the running kernel whenever you + want). The module will be called sctp. If you want to compile it + as a module, say M here and read . + + If in doubt, say N. + +SCTP: Use old checksum (Adler-32) +CONFIG_SCTP_ADLER32 + RCF2960 currently specifies the Adler-32 checksum algorithm for SCTP. + This has been deprecated and replaced by an algorithm now referred + to as crc32c. + + If you say Y, this will use the Adler-32 algorithm, this might be + useful for interoperation with downlevel peers. + + If unsure, say N. + +SCTP: Debug messages +CONFIG_SCTP_DBG_MSG + If you say Y, this will enable verbose debugging messages. + + If unsure, say N. However, if you are running into problems, use + this option to gather detailed trace information + +SCTP: Debug object counts +CONFIG_SCTP_DBG_OBJCNT + If you say Y, this will enable debugging support for counting the + type of objects that are currently allocated. This is useful for + identifying memory leaks. If the /proc filesystem is enabled this + debug information can be viewed by + 'cat /proc/net/sctp/sctp_dbg_objcnt' + + If unsure, say N + Kernel httpd acceleration CONFIG_KHTTPD The kernel httpd acceleration daemon (kHTTPd) is a (limited) web @@ -6915,7 +7306,7 @@ CONFIG_CISS_SCSI_TAPE When enabled (Y), this option allows SCSI tape drives and SCSI medium changers (tape robots) to be accessed via a Compaq 5xxx array - controller. (See Documentation/cciss.txt for more details.) + controller. (See for more details.) "SCSI support" and "SCSI tape support" must also be enabled for this option to work. @@ -6923,6 +7314,15 @@ When this option is disabled (N), the SCSI portion of the driver is not compiled. +Enable monitor thread +CONFIG_CISS_MONITOR_THREAD + Intended for use with multipath configurations (see the md driver). + This option allows a per-adapter monitoring thread to periodically + poll the adapter to detect failure modes in which the processor + is unable to receive interrupts from the adapter, thus enabling + fail-over to an alternate adapter in such situations. See + for more details. + QuickNet Internet LineJack/PhoneJack support CONFIG_PHONE_IXJ Say M if you have a telephony card manufactured by Quicknet @@ -7087,6 +7487,16 @@ architecture is based on LSI Logic's Message Passing Interface (MPI) specification. +Maximum number of scatter gather entries +CONFIG_FUSION_MAX_SGE + This option allows you to specify the maximum number of scatter- + gather entries per I/O. The driver defaults to 40, a reasonable number + for most systems. However, the user may increase this up to 128. + Increasing this parameter will require significantly more memory + on a per controller instance. Increasing the parameter is not + necessary (or recommended) unless the user will be running + large I/O's via the raw interface. + Fusion MPT enhanced SCSI error reporting [optional] module CONFIG_FUSION_ISENSE The isense module (roughly stands for Interpret SENSE data) is @@ -7354,6 +7764,27 @@ there should be no noticeable performance impact as long as you have logging turned off. +QDIO base support for IBM S/390 and zSeries +CONFIG_QDIO + This driver provides the Queued Direct I/O base support for the + IBM S/390 (G5 and G6) and eServer zSeries (z800 and z900). + + For details please refer to the documentation provided by IBM at + + + This driver is also available as a module ( = code which can be + inserted in and removed from the running kernel whenever you want). + The module will be called qdio.o. If you want to compile it as a + module, say M here and read . + + If unsure, say Y. + +Performance statistics for QDIO base support +CONFIG_QDIO_PERF_STATS + Say Y here to get performance statistics in /proc/qdio_perf + + If unsure, say N. + SGI WD93C93 SCSI Driver CONFIG_SCSI_SGIWD93 Say Y here to support the on-board WD93C93 SCSI controller found (a) @@ -7964,7 +8395,7 @@ If you want to compile the driver as a module ( = code which can be inserted in and removed from the running kernel whenever you want), say M here and read . The module - will be called sym53c8xx.o. + will be called sym53c8xx_2.o. PCI DMA addressing mode CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE @@ -8627,16 +9058,31 @@ say M here and read . The module will be called AM53C974.o. -AMI MegaRAID support +AMI MegaRAID support (old driver) CONFIG_SCSI_MEGARAID - This driver supports the AMI MegaRAID 418, 428, 438, 466, 762, 490 - and 467 SCSI host adapters. + This driver supports the AMI MegaRAID 418, 428, 438, 466, 762, 490, + 467, 471 and 493 SCSI host adapters. + + This is the old and very heavily tested driver but lacks features + like clustering. If you want to compile this driver as a module ( = code which can be inserted in and removed from the running kernel whenever you want), say M here and read . The module will be called megaraid.o. +AMI MegaRAID support (new driver) +CONFIG_SCSI_MEGARAID2 + This driver supports the AMI MegaRAID 418, 428, 438, 466, 762, 490, + 467, 471, 493 and new Ultra320(518, 520, 531, 532) SCSI host adapters. + + This is the newer less tested but more featureful driver. + + If you want to compile this driver as a module ( = code which can be + inserted in and removed from the running kernel whenever you want), + say M here and read . The module + will be called megaraid2.o. + Intel/ICP (former GDT SCSI Disk Array) RAID Controller support CONFIG_SCSI_GDTH Formerly called GDT SCSI Disk Array Controller Support. @@ -8979,6 +9425,17 @@ Say Y if you really want or need the debugging output, everyone else says N. +CONFIG_IEEE1394_OUI_DB + If you say Y here, then an OUI list (vendor unique ID's) will be + compiled into the ieee1394 module. This doesn't really do much + except being able to display the vendor of a hardware node. The + downside is that it adds about 300k to the size of the module, + or kernel (depending on whether you compile ieee1394 as a + module, or static in the kernel). + + This option is not needed for userspace programs like gscanbus + to show this information. + Network device support CONFIG_NETDEVICES You can say N here if you don't intend to connect your Linux box to @@ -9637,6 +10094,17 @@ Support for these adaptors is so far still incomplete and buggy. You have been warned. +Hermes 802.11b in TMD7160/NCP130 based PCI adaptor support +CONFIG_TMD_HERMES + Enable support for PCMCIA cards supported by the "Hermes" (aka + orinoco) driver when used in TMD7160 based PCI adaptors. These + adaptors are not a full PCMCIA controller but act as a more limited + PCI <-> PCMCIA bridge. Several vendors sell such adaptors so that + 802.11b PCMCIA cards can be used in desktop machines. + + Support for these adaptors is so far still incomplete and buggy. + You have been warned. + Prism 2.5 PCI 802.11b adaptor support CONFIG_PCI_HERMES Enable support for PCI and mini-PCI 802.11b wireless NICs based on @@ -9902,36 +10370,17 @@ This driver supports the FarSync T-Series X.21 (and V.35/V.24) cards from FarSite Communications Ltd. Synchronous communication is supported on all ports at speeds up to - 8Mb/s (128K on V.24) using synchronous PPP or Cisco HDLC. + 8Mb/s (128K on V.24) using synchronous PPP, Cisco HDLC, raw HDLC, + Frame Relay or X.25/LAPB. If you want to compile this driver as a module ( = code which can be inserted in and removed from the running kernel whenever you want) say M here and read . The module will be called farsync.o and if you want the module to be automatically loaded when the interface is referenced then you - should add "alias syncX farsync" to /etc/modules.conf for each + should add "alias hdlcX farsync" to /etc/modules.conf for each interface, where X is 0, 1, 2, ... -CONFIG_HDLC_DEBUG_PKT - This option is for developers only - do NOT use on production - systems. - -CONFIG_HDLC_DEBUG_HARD_HEADER - This option is for developers only - do NOT use on production - systems. - -CONFIG_HDLC_DEBUG_ECN - This option is for developers only - do NOT use on production - systems. - -CONFIG_HDLC_DEBUG_RINGS - If you answer Y here you will be able to get a diagnostic dump of - port's TX and RX packet rings, using "sethdlc hdlcX private" - command. It does not affect normal operations. - - If unsure, say Y here. - - Frame Relay (DLCI) support CONFIG_DLCI This is support for the frame relay protocol; frame relay is a fast @@ -10456,6 +10905,26 @@ The module will be called dscc4.o. For general information about modules read . +PCISYNC feature +CONFIG_DSCC4_PCISYNC + Due to Etinc's design choice for its PCISYNC cards, some operations + are only allowed on specific ports of the DSCC4. This option is the + only way for the driver to know that it shouldn't return a success + code for these operations. + + Please say Y if your card is an Etinc's PCISYNC. + +Hard reset support +CONFIG_DSCC4_PCI_RST + Various DSCC4 bug forbid any reliable software reset of the asic. + As a replacement, some vendors provide a way to assert the PCI #RST + pin of DSCC4 through the GPIO port of the card. If you choose Y, the + driver will make use of this feature before module removal (i.e. rmmod). + This feature is known to exist on Commtech's cards. + Contact your manufacturer for details. + + Say Y if yout card supports this feature. + LanMedia Corp. serial boards (SSI/V.35, T1/E1, HSSI, T3) CONFIG_LANMEDIA This is a driver for the following Lan Media family of serial @@ -10804,6 +11273,15 @@ If unsure, say N here. +Raw HDLC Ethernet device support +CONFIG_HDLC_RAW_ETH + Say Y to this option if you want generic HDLC driver to support + raw HDLC Ethernet device emulation over WAN (Wide Area Network) + connections. + You will need it for Ethernet over HDLC bridges. + + If unsure, say N here. + Cisco HDLC support CONFIG_HDLC_CISCO Say Y to this option if you want generic HDLC driver to support @@ -10818,13 +11296,6 @@ If unsure, say N here. -Frame-Relay bridging support -CONFIG_HDLC_FR_BRIDGE - Say Y to this option if you want generic HDLC driver to support - bridging LAN frames over Frame-Relay links. - - If unsure, say N here. - Synchronous Point-to-Point Protocol (PPP) support CONFIG_HDLC_PPP Say Y to this option if you want generic HDLC driver to support @@ -10867,6 +11338,25 @@ If unsure, say N here. +CONFIG_HDLC_DEBUG_PKT + This option is for developers only - do NOT use on production + systems. + +CONFIG_HDLC_DEBUG_HARD_HEADER + This option is for developers only - do NOT use on production + systems. + +CONFIG_HDLC_DEBUG_ECN + This option is for developers only - do NOT use on production + systems. + +CONFIG_HDLC_DEBUG_RINGS + If you answer Y here you will be able to get a diagnostic dump of + port's TX and RX packet rings, using "sethdlc hdlcX private" + command. It does not affect normal operations. + + If unsure, say Y here. + Ethernet (10 or 100Mbit) CONFIG_NET_ETHERNET Ethernet (also called IEEE 802.3 or ISO 8802-2) is the most common @@ -11195,33 +11685,69 @@ The safe and default value for this is N. -SysKonnect SK-98xx and SK-95xx Gigabit Ethernet Adapter family support +Marvell Yukon / SysKonnect SK-98xx and SK-95xx Gigabit Ethernet Adapter family support CONFIG_SK98LIN - Say Y here if you have a SysKonnect SK-98xx or SK-95xx Gigabit - Ethernet Server Adapter. The following adapters are supported by - this driver: - - SK-9521 10/100/1000Base-T Adapter - - SK-9821 Gigabit Ethernet 1000Base-T Server Adapter - - SK-9822 Gigabit Ethernet 1000Base-T Dual Port Server Adapter - - SK-9841 Gigabit Ethernet 1000Base-LX Server Adapter - - SK-9842 Gigabit Ethernet 1000Base-LX Dual Port Server Adapter - - SK-9843 Gigabit Ethernet 1000Base-SX Server Adapter - - SK-9844 Gigabit Ethernet 1000Base-SX Dual Port Server Adapter - - SK-9861 Gigabit Ethernet 1000Base-SX Server Adapter - - SK-9862 Gigabit Ethernet 1000Base-SX Dual Port Server Adapter - - SK-9871 Gigabit Ethernet 1000Base-ZX Server Adapter - - SK-9872 Gigabit Ethernet 1000Base-ZX Dual Port Server Adapter - - SK-9821 V2.0 Gigabit Ethernet 10/100/1000Base-T Adapter - - SK-9841 V2.0 Gigabit Ethernet 1000Base-LX Adapter - - SK-9843 V2.0 Gigabit Ethernet 1000Base-SX Adapter - - SK-9851 V2.0 Gigabit Ethernet 1000Base-SX Adapter - - SK-9861 V2.0 Gigabit Ethernet 1000Base-SX Adapter - - SK-9871 V2.0 Gigabit Ethernet 1000Base-ZX Adapter + Say Y here if you have a Marvell Yukon or SysKonnect SK-98xx/SK-95xx + compliant Gigabit Ethernet Adapter. The following adapters are supported + by this driver: + - 3Com 3C940 Gigabit LOM Ethernet Adapter + - 3Com 3C941 Gigabit LOM Ethernet Adapter + - Allied Telesyn AT-2970LX Gigabit Ethernet Adapter + - Allied Telesyn AT-2970LX/2SC Gigabit Ethernet Adapter + - Allied Telesyn AT-2970SX Gigabit Ethernet Adapter + - Allied Telesyn AT-2970SX/2SC Gigabit Ethernet Adapter + - Allied Telesyn AT-2970TX Gigabit Ethernet Adapter + - Allied Telesyn AT-2970TX/2TX Gigabit Ethernet Adapter + - Allied Telesyn AT-2971SX Gigabit Ethernet Adapter + - Allied Telesyn AT-2971T Gigabit Ethernet Adapter + - DGE-530T Gigabit Ethernet Adapter + - EG1032 v2 Instant Gigabit Network Adapter + - EG1064 v2 Instant Gigabit Network Adapter + - Marvell 88E8001 Gigabit LOM Ethernet Adapter (Abit) + - Marvell 88E8001 Gigabit LOM Ethernet Adapter (Asus) + - Marvell 88E8001 Gigabit LOM Ethernet Adapter (ECS) + - Marvell 88E8001 Gigabit LOM Ethernet Adapter (Epox) + - Marvell 88E8001 Gigabit LOM Ethernet Adapter (Gigabyte) + - Marvell 88E8001 Gigabit LOM Ethernet Adapter (Iwill) + - Marvell RDK-8001 Adapter + - Marvell RDK-8002 Adapter + - Marvell RDK-8003 Adapter + - Marvell RDK-8004 Adapter + - Marvell RDK-8006 Adapter + - Marvell RDK-8007 Adapter + - Marvell RDK-8008 Adapter + - Marvell RDK-8009 Adapter + - Marvell RDK-8010 Adapter + - Marvell RDK-8011 Adapter + - Marvell RDK-8012 Adapter + - Marvell Yukon Gigabit Ethernet 10/100/1000Base-T Adapter (32 bit) + - Marvell Yukon Gigabit Ethernet 10/100/1000Base-T Adapter (64 bit) + - N-Way PCI-Bus Giga-Card 1000/100/10Mbps(L) + - SK-9521 10/100/1000Base-T Adapter + - SK-9521 V2.0 10/100/1000Base-T Adapter + - SK-9821 Gigabit Ethernet Server Adapter (SK-NET GE-T) + - SK-9821 V2.0 Gigabit Ethernet 10/100/1000Base-T Adapter + - SK-9822 Gigabit Ethernet Server Adapter (SK-NET GE-T dual link) + - SK-9841 Gigabit Ethernet Server Adapter (SK-NET GE-LX) + - SK-9841 V2.0 Gigabit Ethernet 1000Base-LX Adapter + - SK-9842 Gigabit Ethernet Server Adapter (SK-NET GE-LX dual link) + - SK-9843 Gigabit Ethernet Server Adapter (SK-NET GE-SX) + - SK-9843 V2.0 Gigabit Ethernet 1000Base-SX Adapter + - SK-9844 Gigabit Ethernet Server Adapter (SK-NET GE-SX dual link) + - SK-9851 V2.0 Gigabit Ethernet 1000Base-SX Adapter + - SK-9861 Gigabit Ethernet Server Adapter (SK-NET GE-SX Volition) + - SK-9861 V2.0 Gigabit Ethernet 1000Base-SX Adapter + - SK-9862 Gigabit Ethernet Server Adapter (SK-NET GE-SX Volition dual link) + - SK-9871 Gigabit Ethernet Server Adapter (SK-NET GE-ZX) + - SK-9871 V2.0 Gigabit Ethernet 1000Base-ZX Adapter + - SK-9872 Gigabit Ethernet Server Adapter (SK-NET GE-ZX dual link) + - SMC EZ Card 1000 (SMC9452TXV.2) The adapters support Jumbo Frames. The dual link adapters support link-failover and dual port features. - The V2.0 adapters support the scatter-gather functionality with - sendfile(). Read Documentation/networking/sk98lin.txt for information about + Both Marvell Yukon and SysKonnect SK-98xx/SK-95xx adapters support + the scatter-gather functionality with sendfile(). Please refer to + Documentation/networking/sk98lin.txt for more information about optional driver parameters. Questions concerning this driver may be addressed to: linux@syskonnect.de @@ -11231,6 +11757,7 @@ say M here and read Documentation/modules.txt. This is recommended. The module will be called sk98lin.o. + Sun GEM support CONFIG_SUNGEM Support for the Sun GEM chip, aka Sun GigabitEthernet/P 2.0. See also @@ -13126,6 +13653,15 @@ If unsure, say 'N'. +MTD concatenating support +CONFIG_MTD_CONCAT + Support for concatenating several MTD devices into a single + (virtual) one. This allows you to have -for example- a JFFS(2) + file system spanning multiple physical flash chips. If unsure, + say 'Y'. + + If compiled as a module, it will be called mtdconcat.o. + ARM Firmware Suite flash layout / partition parsing CONFIG_MTD_AFS_PARTS The ARM Firmware Suite allows the user to divide flash devices into @@ -13532,6 +14068,14 @@ D-Box 2 board. If you have one of these boards and would like to use the flash chips on it, say 'Y'. +CFI Flash devices mapped on IBM Redwood +CONFIG_MTD_REDWOOD + This enables access routines for the flash chips on the IBM + Redwood board. If you have one of these boards and would like to + use the flash chips on it, say 'Y'. + + If compiled as a module, it will be called redwood.o. + CFI Flash device mapped on the XScale IQ80310 board CONFIG_MTD_IQ80310 This enables access routines for the flash chips on the Intel XScale @@ -13664,6 +14208,20 @@ CONFIG_MTD_NAND_SPIA If you had to ask, you don't have one. Say 'N'. +SmartMediaCard on autronix autcpu12 board +CONFIG_MTD_NAND_AUTCPU12 + This enables the driver for the autronix autcpu12 board to + access the SmartMediaCard. + + If compiled as a module, it will be called autcpu12.o. + +Support for Cirrus Logic EBD7312 evaluation board +CONFIG_MTD_NAND_EDB7312 + This enables the driver for the Cirrus Logic EBD7312 evaluation + board to access the onboard NAND Flash. + + If compiled as a module, it will be called edb7312.o. + M-Systems Disk-On-Chip 1000 support CONFIG_MTD_DOC1000 This provides an MTD device driver for the M-Systems DiskOnChip @@ -14162,8 +14720,8 @@ USB HIDBP Mouse (basic) support CONFIG_USB_MOUSE Say Y here only if you are absolutely sure that you don't want - to use the generic HID driver for your USB keyboard and prefer - to use the keyboard in its limited Boot Protocol mode instead. + to use the generic HID driver for your USB mouse and prefer + to use the mouse in its limited Boot Protocol mode instead. This is almost certainly not what you want. @@ -14523,6 +15081,9 @@ CONFIG_USB_SERIAL_KEYSPAN_USA49W Say Y here to include firmware for the USA-49W converter. +CONFIG_USB_SERIAL_KEYSPAN_USA49WLC + Say Y here to include firmware for the USA-49WLC converter. + USB ZyXEL omni.net LCD Plus Driver CONFIG_USB_SERIAL_OMNINET Say Y here if you want to use a ZyXEL omni.net LCD ISDN TA. @@ -15529,21 +16090,15 @@ architectural foundations. In general, ReiserFS is as fast as ext2, but is very efficient with - large directories and small files. Additional patches are needed - for NFS and quotas, please see for links. - - It is more easily extended to have features currently found in - database and keyword search systems than block allocation based file - systems are. The next version will be so extended, and will support - plugins consistent with our motto ``It takes more than a license to - make source code open.'' + large directories and small files. It is much faster for writes, + and slightly slower for reads than ext2. It is much faster than + ext3. It will be obsoleted by Reiser4 in not too long, so keep + an eye on our website for when Reiser4 ships. - Read to learn more about reiserfs. + Mount with the notail option if performance matters more to you than + saving space (the design flaw underlying this is fixed in reiser4). - Sponsored by Threshold Networks, Emusic.com, and Bigstorage.com. - - If you like it, you can pay us to add new features to it that you - need, buy a support contract, or pay us to port it to another OS. + Read to learn more about reiserfs. Enable extra Reiserfs consistency checks CONFIG_REISERFS_CHECK @@ -17494,6 +18049,24 @@ Enable this option if you intend to use a HIL keyboard. +HP System Device Controller support +CONFIG_HP_SDC + This option enables supports for the the "System Device Controller", + an i8042 carrying microcode to manage a few miscellanous devices + on some Hewlett Packard systems. The SDC itself contains a 10ms + resolution timer/clock capable of delivering interrupts on periodic + and one-shot basis. The SDC may also be connected to a battery-backed + real-time clock, a basic audio waveform generator, and an HP-HIL + Master Link Controller serving up to seven input devices. + + By itself this option is rather useless, but enabling it will + enable selection of drivers for the abovementioned devices. + It is, however, incompatible with the old, reliable HIL keyboard + driver, and the new HIL driver is experimental, so if you plan to + use a HIL keyboard as your primary keyboard, you may wish to + keep using that driver until the new HIL drivers have had more + testing. + Include IOP (IIfx/Quadra 9x0) ADB driver CONFIG_ADB_IOP The I/O Processor (IOP) is an Apple custom IC designed to provide @@ -17809,6 +18382,19 @@ read . The module will be called istallion.o. +PDC software console support +CONFIG_PDC_CONSOLE + Saying Y here will enable the software based PDC console to be + used as the system console. This is useful for machines in + which the hardware based console has not been written yet. The + following steps must be competed to use the PDC console: + + 1. create the device entry (mknod /dev/ttyB0 c 60 0) + 2. Edit the /etc/inittab to start a getty listening on /dev/ttyB0 + 3. Add device ttyB0 to /etc/securetty (if you want to log on as + root on this console.) + 4. Change the kernel command console parameter to: console=ttyB0 + Microgate SyncLink adapter support CONFIG_SYNCLINK Provides support for the SyncLink ISA and PCI multiprotocol serial @@ -18259,6 +18845,15 @@ it as a module, say M here and read . The module will be called i2c-proc.o. +Powermac Keywest I2C interface +CONFIG_I2C_KEYWEST + This supports the use of the I2C interface in the combo-I/O + chip on recent Apple machines. Say Y if you have such a machine. + + This driver is also available as a module. If you want to compile + it as a module, say M here and read Documentation/modules.txt. + The module will be called i2c-keywest.o. + Bus Mouse Support CONFIG_BUSMOUSE Say Y here if your machine has a bus mouse as opposed to a serial @@ -18768,6 +19363,13 @@ selected, the module will be called i810.o. AGP support is required for this driver to work. +Intel 830M, 845G, 852GM, 855GM, 865G +CONFIG_DRM_I830 + Choose this option if you have a system that has Intel 830M, 845G, + 852GM, 855GM or 865G integrated graphics. If M is selected, the + module will be called i830.o. AGP support is required for this driver + to work. + Matrox G200/G400/G450 CONFIG_DRM_MGA Choose this option if you have a Matrox G200, G400 or G450 graphics @@ -18921,6 +19523,21 @@ If unsure, say N. +Intel/AMD/VIA HW Random Number Generator support +CONFIG_HW_RANDOM + This driver provides kernel-side support for the + Random Number Generator hardware found on Intel i8xx-based motherboards, + AMD 76x-based motherboards, and Via Nehemiah CPUs. + + Provides a character driver, used to read() entropy data. + + To compile this driver as a module ( = code which can be inserted in + and removed from the running kernel whenever you want), say M here + and read . The module will be called + hw_random. + + If unsure, say N. + Power Management support CONFIG_PM "Power Management" means that parts of your computer are shut @@ -18970,30 +19587,8 @@ The ACPI Sourceforge project may also be of interest: -ACPI Processor Enumeration for HT -CONFIG_ACPI_HT_ONLY - ACPI enumerates both logical (a.k.a. Hyper-Threaded -- HT) - and physical processors. It is designed to obsolete several older - specifications, including the MultiProcessor Specification (MPS), - which supported only physical processors. - - CONFIG_ACPI_HT_ONLY includes just the minimal ACPI boot-time code - necessary to enumerate logical processors and enable HT. - - CONFIG_ACPI includes this code, plus IO APIC enumeration, - and the hooks to run the ACPI AML interpreter for run-time events. - - When CONFIG_ACPI is selected, the command-line option "acpi=ht" - is available to run just the ACPI boot-time code -- just as if - only CONFIG_ACPI_HT_ONLY were selected. - Note that "acpi=off" can be used to disable all ACPI code in the kernel. -Enable ACPI 2.0 with errata 1.3 -CONFIG_ACPI20 - Enable support for the 2.0 version of the ACPI interpreter. See the - help for ACPI for caveats and discussion. - ACPI kernel configuration manager CONFIG_ACPI_KERNEL_CONFIG If you say `Y' here, Linux's ACPI support will use the @@ -19013,23 +19608,6 @@ particular, many Toshiba laptops require this for correct operation of the AC module. -ACPI Bus Manager -CONFIG_ACPI_BUSMGR - The ACPI Bus Manager enumerates devices in the ACPI namespace, and - handles PnP messages. All ACPI devices use its services, so using - them requires saying Y here. - -ACPI System Driver -CONFIG_ACPI_SYS - This driver will enable your system to shut down using ACPI, and - dump your ACPI DSDT table using /proc/acpi/dsdt. - -ACPI Processor Driver -CONFIG_ACPI_CPU - This driver installs ACPI as the idle handler for Linux, and uses - ACPI C2 and C3 processor states to save power, on systems that - support it. - ACPI Button CONFIG_ACPI_BUTTON This driver registers for events based on buttons, such as the @@ -19064,11 +19642,6 @@ the battery and thermal drivers. If you are compiling for a laptop, say Y. -ACPI Control Method Battery -CONFIG_ACPI_CMBATT - This driver adds support for battery information through - /proc/acpi/battery. If you have a laptop with a battery, say Y. - ACPI Thermal CONFIG_ACPI_THERMAL This driver handles overheating conditions on laptops. It is HIGHLY @@ -19084,6 +19657,9 @@ display brightness and output, switching the LCD backlight on and off, and most importantly, allows you to blink those fancy LEDs intended for reporting mail and wireless status. + + Note: the display switching code is currently considered EXPERIMENTAL, + toying with these values may even lock your machine. All settings are changed via /proc/acpi/asus directory entries. Owner and group for these entries can be set with asus_uid and asus_gid @@ -19561,6 +20137,15 @@ . The module will be called cpuid.o +x86 BIOS Enhanced Disk Drive support +CONFIG_EDD + Say Y or M here if you want to enable BIOS Enhanced Disk Drive + Services real mode BIOS calls to determine which disk + BIOS tries boot from. This information is then exported via /proc. + + This option is experimental, but believed to be safe, + and most disk controller BIOS vendors do not yet implement this feature. + SBC-60XX Watchdog Timer CONFIG_60XX_WDT This driver can be used with the watchdog timer found on some @@ -21540,6 +22125,11 @@ This enables HiSax support for the HFC-S+, HFC-SP and HFC-PCMCIA cards. This code is not finished yet. +Formula-n enter:now PCI card (EXPERIMENTAL) +CONFIG_HISAX_ENTERNOW_PCI + This enables HiSax support for the Formula-n enter:now PCI + ISDN card. + Am7930 CONFIG_HISAX_AMD7930 This enables HiSax support for the AMD7930 chips on some SPARCs. @@ -22687,15 +23277,16 @@ want). The module is called ariadne.o. If you want to compile it as a module, say M here and read . -Ariadne II and X-Surf support -CONFIG_ARIADNE2 - This driver is for the Village Tronic Ariadne II and the Individual +Zorro NS8390-based Ethernet support +CONFIG_ZORRO8390 + This driver is for Zorro Ethernet cards using an NS8390-compatible + chipset, like the Village Tronic Ariadne II and the Individual Computers X-Surf Ethernet cards. If you have such a card, say Y. Otherwise, say N. This driver is also available as a module ( = code which can be inserted in and removed from the running kernel whenever you want). - The module will be called ariadne2.o. If you want to compile it as + The module is called zorro8390.o. If you want to compile it as a module, say M here and read . A2065 support @@ -23468,6 +24059,38 @@ /proc/sys/dev/mac_hid/mouse_button2_keycode /proc/sys/dev/mac_hid/mouse_button3_keycode +Set high memory pool address +CONFIG_HIGHMEM_START_BOOL + Unless you know what you are doing you *should not* set this option. + + It can be used to override the default PKMAP_BASE address which + is the location of the high memory pool. This can be useful in + optimizing virtual memory usage in a system. + +Set maximum low memory +CONFIG_LOWMEM_SIZE_BOOL + Unless you know what you are doing you *should not* set this option. + + It can be used to override the standard calculated value of + MAX_LOW_MEM. This can be useful in optimizing virtual memory usage + in a system. + +Set custom kernel base address +CONFIG_KERNEL_START_BOOL + Unless you know what you are doing you *should not* set this option. + + It can be used to override the standard PAGE_OFFSET/KERNELBASE + value used by the kernel. This can be useful in controlling + amount of virtual address space available to the kernel. + +Set custom user task size +CONFIG_TASK_SIZE_BOOL + Unless you know what you are doing you *should not* set this option. + + It can be used to override the standard TASK_SIZE value used + by the kernel. This can be useful in controlling amount of + virtual address space available to user tasks. + Enhanced Real Time Clock Support (/dev/rtc) CONFIG_PPC_RTC If you say Y here and create a character special file /dev/rtc with @@ -24735,6 +25358,46 @@ Say Y if you want support for the ARM1020 processor. Otherwise, say N. +Disable I-Cache +CONFIG_CPU_ICACHE_DISABLE + Say Y here to disable the processor instruction cache. Unless + you have a reason not to or are unsure, say N. + +Disable D-Cache +CONFIG_CPU_DCACHE_DISABLE + Say Y here to disable the processor data cache. Unless + you have a reason not to or are unsure, say N. + +Force write through D-cache +CONFIG_CPU_DCACHE_WRITETHROUGH + Say Y here to use the data cache in write-through mode. Unless you + specifically require this or are unsure, say N. + +Round robin I and D cache replacement algorithm +CONFIG_CPU_CACHE_ROUND_ROBIN + Say Y here to use the predictable round-robin cache replacement + policy. Unless you specifically require this or are unsure, say N. + +Disable branch prediction +CONFIG_CPU_BPREDICT_DISABLE + Say Y here to disable branch prediction. If unsure, say N. + +Compressed boot loader in ROM/flash +CONFIG_ZBOOT_ROM + Say Y here if you intend to execute your compressed kernel image (zImage) + directly from ROM or flash. If unsure, say N. + +Compressed ROM boot loader base address +CONFIG_ZBOOT_ROM_TEXT + The base address for zImage. Unless you have special requirements, you + should not change this value. + +Compressed ROM boot loader BSS address +CONFIG_ZBOOT_ROM_BSS + The base address of 64KiB of read/write memory, which must be available + while the decompressor is running. Unless you have special requirements, + you should not change this value. + Support StrongARM SA-110 processor CONFIG_CPU_SA110 The Intel StrongARM(R) SA-110 is a 32-bit microprocessor and @@ -24894,6 +25557,19 @@ output to the second serial port on these devices. Saying N will cause the debug messages to appear on the first serial port. +Kernel log buffer length shift +CONFIG_LOG_BUF_SHIFT + The kernel log buffer has a fixed size of : + 64 kB (2^16) on MULTIQUAD and IA64, + 128 kB (2^17) on S390 + 32 kB (2^15) on SMP systems + 16 kB (2^14) on UP systems + + You have the ability to change this size with this paramter which + fixes the bit shift of to get the buffer length (which must be a + power of 2). Eg: a value of 16 sets the buffer to 64 kB (2^16). + The default value of 0 uses standard values above. + Disable pgtable cache CONFIG_NO_PGT_CACHE Normally the kernel maintains a `quicklist' of preallocated @@ -25250,6 +25926,44 @@ brave people. System crashes and other bad things are likely to occur if you use this driver. If in doubt, select N. +Tieman Voyager USB Braille display support (EXPERIMENTAL) +CONFIG_USB_BRLVGER + Say Y here if you want to use the Voyager USB Braille display from + Tieman. See for more + information. + + This code is also available as a module ( = code which can be + inserted in and removed from the running kernel whenever you want). + The module will be called brlvger.o. If you want to compile it as + a module, say M here and read . + +KB Gear JamStudio tablet support +CONFIG_USB_KBTAB + Say Y here if you want to use the USB version of the KB Gear + JamStudio tablet. Make sure to say Y to "Mouse support" + (CONFIG_INPUT_MOUSEDEV) and/or "Event interface support" + (CONFIG_INPUT_EVDEV) as well. + + This driver is also available as a module ( = code which can be + inserted in and removed from the running kernel whenever you want). + The module will be called kbtab.o. If you want to compile it as a + module, say M here and read . + +USB Inside Out Edgeport Serial Driver (TI devices) +CONFIG_USB_SERIAL_EDGEPORT_TI + Say Y here if you want to use any of the devices from Inside Out + Networks (Digi) that are not supported by the io_edgeport driver. + This includes the Edgeport/1 device. + + This code is also available as a module ( = code which can be + inserted in and removed from the running kernel whenever you want). + The module will be called io_ti.o. If you want to compile it + as a module, say M here and read . + +USB Keyspan MPR Firmware +CONFIG_USB_SERIAL_KEYSPAN_MPR + Say Y here to include firmware for the Keyspan MPR converter. + Winbond W83977AF IrDA Device Driver CONFIG_WINBOND_FIR Say Y here if you want to build IrDA support for the Winbond @@ -26294,11 +27008,13 @@ # Choice: ia64type Itanium CONFIG_ITANIUM - Select your IA64 processor type. The default is Intel Itanium. + Select your IA-64 processor type. The default is Intel Itanium. + This choice is safe for all IA-64 systems, but may not perform + optimally on systems with, say, Itanium 2 or newer processors. -McKinley +Itanium 2 CONFIG_MCKINLEY - Select this to configure for a McKinley processor. + Select this to configure for an Itanium 2 (McKinley) processor. # Choice: ia64system IA-64 system type @@ -26355,6 +27071,14 @@ Say Y here to enable machine check support for IA-64. If you're unsure, answer Y. +Use PAL_HALT_LIGHT in idle loop +CONFIG_IA64_PAL_IDLE + Say Y here to enable use of PAL_HALT_LIGHT in the cpu_idle loop. + This allows the CPU to enter a low power state when idle. You + can enable CONFIG_IA64_PALINFO and check /proc/pal/cpu0/power_info + to see the power consumption and latency for this state. If you're + unsure your firmware supports it, answer N. + Disable IA-64 Virtual Hash Page Table CONFIG_DISABLE_VHPT The Virtual Hash Page Table (VHPT) enhances virtual address @@ -26375,12 +27099,31 @@ and restore instructions. It's useful for tracking down spinlock problems, but slow! If you're unsure, select N. -Early printk support (requires VGA!) +Early printk support CONFIG_IA64_EARLY_PRINTK - Selecting this option uses the VGA screen for printk() output before - the consoles are initialised. It is useful for debugging problems - early in the boot process, but only if you have a VGA screen - attached. If you're unsure, select N. + Selecting this option uses a UART or VGA screen (or both) for + printk() output before the consoles are initialised. It is useful + for debugging problems early in the boot process, but only if you + have a serial terminal or a VGA screen attached. If you're unsure, + select N. + +Early printk on serial port +CONFIG_IA64_EARLY_PRINTK_UART + Select this option to use a serial port for early printk() output. + You must also select either CONFIG_IA64_EARLY_PRINTK_UART_BASE or + CONFIG_SERIAL_HCDP. If you select CONFIG_SERIAL_HCDP, early + printk() output will appear on the first console device described by + the HCDP. If you set CONFIG_IA64_EARLY_PRINTK_UART_BASE, the HCDP + will be ignored. + +UART base address +CONFIG_IA64_EARLY_PRINTK_UART_BASE + The physical MMIO address of the UART to use for early printk(). + This overrides any UART located using the EFI HCDP table. + +Early printk on VGA +CONFIG_IA64_EARLY_PRINTK_VGA + Select this option to use VGA for early printk() output. Print possible IA64 hazards to console CONFIG_IA64_PRINT_HAZARDS @@ -26405,6 +27148,58 @@ To use this option, you have to check that the "/proc file system support" (CONFIG_PROC_FS) is enabled, too. +PPC4xx DMA controller support +CONFIG_PPC4xx_DMA + Select this to enable support for the PPC4xx general purpose DMA + controller. + +ttyS0 device +CONFIG_UART0_TTYS0 + This option reverses the mapping between the hardware UART and software + device. Selecting UART0 gives the normal mapping of UART0=ttyS0 and + UART1=ttyS1. Selecting UART1 gives the reverse mapping of UART0=ttyS1 + and UART1=ttyS0. Most people will use UART0. + +PowerPC 405 on-chip ethernet +CONFIG_IBM_OCP_ENET + If you want to use the 405 built-in ethernet select this. + +CONFIG_IBM_OCP_ENET_ERROR_MSG + Enable this option to print verbose debug messages for troubleshooting. + +PowerPC 405 on-chip ethernet -- Number of receive buffers +CONFIG_IBM_OCP_ENET_RX_BUFF + Number of ethernet receive (read) buffers. Unless you know what you + are doing the default should be fine. + +PowerPC 405 on-chip ethernet -- Number of transmit buffers +CONFIG_IBM_OCP_ENET_TX_BUFF + Number of ethernet transmit (write) buffers. Unless you know what + you are doing the default should be fine. + +PowerPC 405 on-chip ethernet -- Amount of bytes to Reserve on a skb +CONFIG_IBM_OCP_ENET_SKB_RES + Many standard ethernet drivers need to reserve 2 bytes of data + on the skb before giving the data ptr to the hardware. This is + so the IP data will be 16-byte aligned when it goes up the stack. + This is a requirement for some processors and it can cause major + slow downs on others. The 405GP dose not have problems with the + misaligned data so the default is 0. If you need to route the + incoming ethernet packets to another device that has alignment + requirements this can help remove a data copy. A value of 2 can + help at getting 16-byte aligned IP data for another device. A + larger value can be used when routing to a IP tunnel device. + Make sure XXX_DESC_SIZE - XXX_SKB_RES >= 1514, or larger if VLANS + are used. + +PPC 405 I2C Algorithm +CONFIG_PPC405_I2C_ALGO + Enable this option to use the built-in I2C on your 405. + +PPC 405 I2C Adapter +CONFIG_PPC405_I2C_ADAP + Enable this option to use the built-in I2C on your 405. + /proc/efi/vars support CONFIG_EFI_VARS If you say Y here, you are able to get EFI (Extensible Firmware @@ -26497,6 +27292,11 @@ best used in conjunction with the NMI watchdog so that spinlock deadlocks are also debuggable. +Additional run-time checks +CONFIG_CHECKING + Enables some internal consistency checks for kernel debugging. + You should normally say N. + Read-write spinlock debugging CONFIG_DEBUG_RWLOCK If you say Y here then read-write lock processing will count how many @@ -27170,6 +27970,12 @@ If unsure, say N. +Hotplug firmware loading support (EXPERIMENTAL) +CONFIG_FW_LOADER + This option is provided for the case where no in-kernel-tree modules require + hotplug firmware loading support, but a module built outside the kernel tree + does. + NatSemi SCx200 support CONFIG_SCx200 This provides basic support for the National Semiconductor SCx200 @@ -27395,6 +28201,82 @@ kernel tree does. Such modules that use library CRC32 functions require that you say M or Y here. +Chassis LCD and LED support +CONFIG_CHASSIS_LCD_LED + Say Y here if you want to enable support for the Heartbeat, + Disk/Network activities LEDs on some PA-RISC machines, + or support for the LCD that can be found on recent material. + + This has nothing to do with LED State support for A, J and E class. + + If unsure, say Y. + +VSC/GSC/HSC bus support +CONFIG_GSC + The VSC, GSC and HSC busses were used from the earliest 700-series + workstations up to and including the C360/J2240 workstations. They + were also used in servers from the E-class to the K-class. They + are not found in B1000, C3000, J5000, A500, L1000, N4000 and upwards. + If in doubt, say "Y". + +Wax I/O support +CONFIG_GSC_WAX + Say Y here to support the Wax multifunction chip found in some + older systems, including B/C/D/R class and 715/64, 715/80 and + 715/100. Wax includes an EISA adapter, a serial port (not always + used), a HIL interface chip and is also known to be used as the + GSC bridge for an X.25 GSC card. + +GSCtoPCI/Dino PCI support +CONFIG_GSC_DINO + Say Y here to support the Dino & Cujo GSC to PCI bridges found in + machines from the B132 to the C360, the J2240 and the A180. Some + GSC/HSC cards (eg gigabit & dual 100 Mbit Ethernet) have a Dino on + the card, and you also need to say Y here if you have such a card. + Note that Dino also supplies one of the serial ports on certain + machines. If in doubt, say Y. + +HPET timers +CONFIG_HPET_TIMER + Use the IA-PC HPET (High Precision Event Timer) to manage + time in preference to the PIT and RTC, if a HPET is + present. The HPET provides a stable time base on SMP + systems, unlike the RTC, but it is more expensive to access, + as it is off-chip. You can find the HPET spec at + . + + If unsure, say Y. + +IOMMU support +CONFIG_GART_IOMMU + Support the K8 IOMMU. Needed to run systems with more than 4GB of memory + properly with 32-bit PCI devices that do not support DAC (Double Address + Cycle). The IOMMU can be turned off at runtime with the iommu=off parameter. + Normally the kernel will take the right choice by itself. + If unsure say Y + +Debug __init statements +CONFIG_INIT_DEBUG + Fill __init and __initdata at the end of boot. This helps debugging + invalid uses of __init and __initdata after initialization. + +Force IOMMU to on +CONFIG_IOMMU_DEBUG + Force the IOMMU to on even when you have less than 4GB of memory and add + debugging code. + Can be disabled at boot time with iommu=noforce. + +IOMMU leak tracing +CONFIG_IOMMU_LEAK + Add a simple leak tracer to the IOMMU code. This is useful when you + are debugging a buggy device driver that leaks IOMMU mappings. + +pSeries Hypervisor Virtual Console support +CONFIG_HVC_CONSOLE + pSeries machines when partitioned support a hypervisor virtual + console. This driver allows each pSeries partition to have a console + which is accessed via the HMC. + CONFIG_CRYPTO This option provides the core Cryptographic API. @@ -27478,6 +28360,12 @@ See http://csrc.nist.gov/encryption/aes/ for more information. +CONFIG_CRYPTO_CAST5 + CAST5 (CAST-128) cipher algorithm. + + The CAST5 encryption algorithm (synonymous with CAST-128) is + described in RFC2144. + CONFIG_CRYPTO_DEFLATE This is the Deflate algorithm (RFC1951), specified for use in IPSec with the IPCOMP protocol (RFC3173, RFC2394). @@ -27486,6 +28374,28 @@ CONFIG_CRYPTO_TEST Quick & dirty crypto test module. + +CONFIG_SOUND_WM97XX + Say Y here to support the Wolfson WM9705 and WM9712 touchscreen + controllers. These controllers are mainly found in PDA's + i.e. Dell Axim and Toshiba e740 + + This is experimental code. + Please see Documentation/wolfson-touchscreen.txt for + a complete list of parameters. + + In order to use this driver, a char device called wm97xx with a major + number of 10 and minor number 16 will have to be created under + /dev/touchscreen. + + e.g. + mknod /dev/touchscreen/wm97xx c 10 16 + + If you want to compile this as a module ( = code which can be + inserted in and removed from the running kernel whenever you want), + say M here. The module will be called ac97_plugin_wm97xx.o. + + If unsure, say N. # # A couple of things I keep forgetting: diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/Documentation/README.nsp32_cb.eng linux-2.4.23-pre8/Documentation/README.nsp32_cb.eng --- linux-2.4.22/Documentation/README.nsp32_cb.eng 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/Documentation/README.nsp32_cb.eng 2003-10-22 22:49:10.000000000 +0000 @@ -0,0 +1,57 @@ + <> + + +1. What's this? + + This is Workbit corp.'s(http://www.workbit.co.jp/) NinjaSCSI-32Bi +(http://www.workbit.co.jp/ts/z_njsc32bi.html) PCMCIA card and NinjaSCSI-32UDE +PCI card driver module for Linux. + + + +2. Install + +[1] This driver requires Kernel 2.4.x/2.6.x or later. + And you want to load the module when Ninja card was inserted, you also + install "hotplug" (http://linux-hotplug.sourceforge.net/) utility. + +[2] Insert Ninja card to your PC, and check your card is NinjaSCSI-32Bi/UDE + card. + +# lspci +.... +01:00.0 SCSI storage controller: I-O Data Device, Inc. CBSC-II duo SCSI PCMCIA card (rev 01) + +[3] This driver requires Kernel 2.4/2.6's source code. Please install cernel + source code. + +[4] Please check your kernel have PCI, CardBus, PCMCIA and SCSI support. + If not, rebuild your kernel. And also requires PCMCIA-CS if you use + CardBus card. + +[5] Extract this archive somewhere. + +[6] Edit "Makefile" and type "make" to compile the driver. + +[7] Copy "nsp32.o" to /lib/modules//kernel/driver/scsi/pcmcia/ . + +[8] Type "depmod -ae" to re-made "/lib/modules//modules.pcimap" + +[9] Ok. Now you can use Ninja card in CardBus mode. Check your Ninja card is in + CardBus mode, and insert the card to PC card slot. + + + +3. Caution + If you eject card when doing some operation for your SCSI device or suspend +your computer, you encount some *BAD* error like disk crash. + It works good when I using this driver right way. But I'm not guarantee +your data. Please backup your data when you use this driver. + + +4. Copyright. + + No, no, this is Copyleft software. See GPL. + + +YOKOTA Hiroshi diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/Documentation/README.nsp_cs.eng linux-2.4.23-pre8/Documentation/README.nsp_cs.eng --- linux-2.4.22/Documentation/README.nsp_cs.eng 2001-10-11 18:17:22.000000000 +0000 +++ linux-2.4.23-pre8/Documentation/README.nsp_cs.eng 2003-10-22 22:49:16.000000000 +0000 @@ -8,8 +8,8 @@ for Linux. 2. My Linux environment -Linux kernel: 2.4.7 / 2.2.19 -pcmcia-cs: 3.1.27 +Linux kernel: 2.4.20 / 2.5.63 +pcmcia-cs: 3.1.33 gcc: gcc-2.95.4 PC card: I-O data PCSC-F (NinjaSCSI-3) I-O data CBSC-II in 16 bit mode (NinjaSCSI-32Bi) @@ -46,22 +46,16 @@ $ make config ... -[3] If you use this driver with Kernel 2.2, Unpack pcmcia-cs in some directory - and make & install. This driver requies pcmcia-cs header file. -$ cd /usr/src -$ tar zxvf cs-pcmcia-cs-3.x.x.tar.gz -... - -[4] Extract this driver's archive somewhere, and edit Makefile, then do make. +[3] Extract this driver's archive somewhere, and edit Makefile, then do make. $ tar -zxvf nsp_cs-x.x.tar.gz $ cd nsp_cs-x.x $ emacs Makefile ... $ make -[5] Copy nsp_cs.o to suitable plase, like /lib/modules//pcmcia/ . +[4] Copy nsp_cs.o to suitable plase, like /lib/modules//pcmcia/ . -[6] Add these lines to /etc/pcmcia/config . +[5] Add these lines to /etc/pcmcia/config . If you yse pcmcia-cs-3.1.8 or later, we can use "nsp_cs.conf" file. So, you don't need to edit file. Just copy to /etc/pcmcia/ . @@ -97,7 +91,7 @@ bind "nsp_cs" ------------------------------------- -[7] Start (or restart) pcmcia-cs. +[6] Start (or restart) pcmcia-cs. # /etc/rc.d/rc.pcmcia start (BSD style) or # /etc/init.d/pcmcia start (SYSV style) @@ -113,8 +107,7 @@ your data. Please backup your data when you use this driver. 6. Known Bugs - In 2.4 kernel, you can't use 640MB Optical disk. This error comes from -high level SCSI driver. + Many bugs in this driver. Be careful! 7. Testing Please send me some reports(bug reports etc..) of this software. @@ -127,4 +120,4 @@ See GPL. -2001/08/08 yokota@netlab.is.tsukuba.ac.jp +2002/01/17 yokota@netlab.is.tsukuba.ac.jp diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/Documentation/SubmittingDrivers linux-2.4.23-pre8/Documentation/SubmittingDrivers --- linux-2.4.22/Documentation/SubmittingDrivers 2002-11-28 23:53:08.000000000 +0000 +++ linux-2.4.23-pre8/Documentation/SubmittingDrivers 2003-10-22 22:49:12.000000000 +0000 @@ -35,12 +35,12 @@ Linux 2.4: The same rules apply as 2.2. The final contact point for Linux 2.4 - submissions is Marcelo Tosatti . + submissions is Marcelo Tosatti . Linux 2.5: The same rules apply as 2.4 except that you should follow linux-kernel to track changes in API's. The final contact point for Linux 2.5 - submissions is Linus Torvalds . + submissions is Linus Torvalds . What Criteria Determine Acceptance ---------------------------------- diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/Documentation/cciss.txt linux-2.4.23-pre8/Documentation/cciss.txt --- linux-2.4.22/Documentation/cciss.txt 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/Documentation/cciss.txt 2003-10-22 22:47:47.000000000 +0000 @@ -13,6 +13,7 @@ * SA 642 * SA 6400 * SA 6400 U320 Expansion Module + * SA 6i If nodes are not already created in the /dev/cciss directory @@ -53,6 +54,56 @@ /dev/cciss/c1d1p2 Controller 1, disk 1, partition 2 /dev/cciss/c1d1p3 Controller 1, disk 1, partition 3 +Support for more than 8 controllers +----------------------------------- +Originally the driver only supports 8 controllers in the system, +and this is due to the major numbers assigned to the driver +(104 thru 111). + +The driver can now support up to 32 controllers in the system. + +For the ninth controller and beyond, the major numbers will be +assigned dynamically by the kernel when it is discovered, +and there is no guarantee what the major number you will get, +but most likely it will start from 254 and goes down from there. + +You can check the assigned major numbers by typing + cat /proc/devices +And look for cciss controllers + +Once you have this, you need to create device nodes in +/dev/cciss directory. The nodes for the first 8 controllers +should already be created by mkdev.cciss script or +/etc/makedev.d/cciss script. You can add the major number(s) +in those scripts, or create the nodes manually by using +the mknod command. + +You can also use mknod_dyn.cciss and rmnod_dyn.cciss scripts +to create or remove nodes easily. These scripts can be found +in the Documentation directory. + +Then you can mount the devices and create partitions +(You also need to make nodes for these partitions). + +As for the minor number, the disk device will have a minor +number divisible by 16 (e.g: 0, 16, 32 etc), and the +partitions on those disk devices will have the minor number +of the disk device plus the partition number (1-15). +For example, disk d2 will have minor number 32, and its +partitions 1 and 2 will have minor numbers 33 and 34. + +Look at the mkdev.cciss script for example. + +Note: + In 2.4 kernel, partition names are hard coded in + /usr/src/linux/fs/partitions/check.c + and only for the first 8 cciss controllers. The rest + will be reported as ccissXX. This should not affect + I/O operation or performance. Please apply the + cciss_2.4_partition_name.patch to address this. This + will not be an issue under 2.5 kernel, since partition + names will be handled by the driver. + SCSI tape drive and medium changer support ------------------------------------------ @@ -127,3 +178,55 @@ access these devices too, as if the array controller were merely a SCSI controller in the same way that we are allowing it to access SCSI tape drives. +Monitor Threads +--------------- + +For multipath configurations (acheived via a higher level driver, such +as the "md" driver) it is important that failure of a controller is detected. +Ordinarily, the driver is entirely interrupt driven. If a failure occurs +in such a way that the processor cannot receive interrupts from an adapter, +the driver will wait forever for i/o's to complete. In a multipath +configuration this is undesirable, as the md driver relies on i/o's being +reported as failed by the low level driver to trigger failing over to an +alternate controller. The monitor threads allow the driver to detect such +situations and report outstanding i/o's as having failed so that recovery +actions such switching to an alternate controller can occur. The monitor +threads periodically sends a trivial "no-operation" command down to +the controllers and expect them to complete within a a reasonable (short) +time period. The firmware on the adapter is designed such that no matter +how busy the adapter is serving i/o, it can respond quickly to a +"no-operation" command. In the event that a deadline elapses before a no +operation command completes, all outstanding commands on that controller +are reported back to the upper layers as having failed, and any new commands +sent to the controller are immediately reported back as failed. + +To enable the monitor threads, the compile time option must be enabled +(via the usual linux kernel configuration) and the monitor thread must +be enabled at runtime as well. A system may have many adapters, but +perhaps only a single pair operating in a multipath configuration. +In this way, it is possible to run monitoring threads only for those +adapters which require it. + +To start a monitoring thread on the first cciss adapter, "cciss0" with +a polling interval of 30 seconds, execute the following command: + + echo "monitor 30" > /proc/driver/cciss/cciss0 + +To change the polling interval, to say, 60 seconds: + + echo "monitor 60" > /proc/driver/cciss/cciss0 + +(Note, the change will not take effect until the previous polling +interval elapses.) + +To disable the monitoring thread, set the polling interval to 0 seconds: + + echo "monitor 0" > /proc/driver/cciss/cciss0 + +(Again, the monitoring thread will not exit until the previous polling +interval elapses.) + +The minimum monitoring period is 10 seconds, and the maximum monitoring +period is 3600 seconds (1 hour). The no-operation command must complete +with 5 seconds of submission in all cases or the controller will be presumed +failed. diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/Documentation/crypto/api-intro.txt linux-2.4.23-pre8/Documentation/crypto/api-intro.txt --- linux-2.4.22/Documentation/crypto/api-intro.txt 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/Documentation/crypto/api-intro.txt 2003-10-22 22:49:53.000000000 +0000 @@ -186,7 +186,6 @@ Dag Arne Osvik (Serpent) Brian Gladman (AES) - SHA1 algorithm contributors: Jean-Francois Dive @@ -214,6 +213,9 @@ Kyle McMartin Adam J. Richter +CAST5 algorithm contributors: + Kartikey Mahendra Bhatt (original developers unknown, FSF copyright). + Generic scatterwalk code by Adam J. Richter Please send any credits updates or corrections to: diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/Documentation/filesystems/jfs.txt linux-2.4.23-pre8/Documentation/filesystems/jfs.txt --- linux-2.4.22/Documentation/filesystems/jfs.txt 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/Documentation/filesystems/jfs.txt 2003-10-22 22:49:03.000000000 +0000 @@ -23,6 +23,15 @@ read-write. The resize keyword with no value will grow the volume to the full size of the partition. +nointegrity Do not write to the journal. The primary use of this option + is to allow for higher performance when restoring a volume + from backup media. The integrity of the volume is not + guaranteed if the system abnormally abends. + +integrity Default. Commit metadata changes to the journal. Use this + option to remount a volume where the nointegrity option was + previously specified in order to restore normal behavior. + JFS TODO list: Plans for our near term development items diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/Documentation/firmware_class/README linux-2.4.23-pre8/Documentation/firmware_class/README --- linux-2.4.22/Documentation/firmware_class/README 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/Documentation/firmware_class/README 2003-10-22 22:48:21.000000000 +0000 @@ -0,0 +1,58 @@ + + request_firmware() hotplug interface: + ------------------------------------ + Copyright (C) 2003 Manuel Estrada Sainz + + Why: + --- + + Today, the most extended way to use firmware in the Linux kernel is linking + it statically in a header file. Which has political and technical issues: + + 1) Some firmware is not legal to redistribute. + 2) The firmware occupies memory permanently, even though it often is just + used once. + 3) Some people, like the Debian crowd, don't consider some firmware free + enough and remove entire drivers (e.g.: keyspan). + + about in-kernel persistence: + --------------------------- + Under some circumstances, as explained below, it would be interesting to keep + firmware images in non-swappable kernel memory or even in the kernel image + (probably within initramfs). + + Note that this functionality has not been implemented. + + - Why OPTIONAL in-kernel persistence may be a good idea sometimes: + + - If the device that needs the firmware is needed to access the + filesystem. When upon some error the device has to be reset and the + firmware reloaded, it won't be possible to get it from userspace. + e.g.: + - A diskless client with a network card that needs firmware. + - The filesystem is stored in a disk behind an scsi device + that needs firmware. + - Replacing buggy DSDT/SSDT ACPI tables on boot. + Note: this would require the persistent objects to be included + within the kernel image, probably within initramfs. + + And the same device can be needed to access the filesystem or not depending + on the setup, so I think that the choice on what firmware to make + persistent should be left to userspace. + + - Why register_firmware()+__init can be useful: + - For boot devices needing firmware. + - To make the transition easier: + The firmware can be declared __init and register_firmware() + called on module_init. Then the firmware is warranted to be + there even if "firmware hotplug userspace" is not there yet or + it doesn't yet provide the needed firmware. + Once the firmware is widely available in userspace, it can be + removed from the kernel. Or made optional (CONFIG_.*_FIRMWARE). + + In either case, if firmware hotplug support is there, it can move the + firmware out of kernel memory into the real filesystem for later + usage. + + Note: If persistence is implemented on top of initramfs, + register_firmware() may not be appropriate. diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/Documentation/firmware_class/firmware_sample_driver.c linux-2.4.23-pre8/Documentation/firmware_class/firmware_sample_driver.c --- linux-2.4.22/Documentation/firmware_class/firmware_sample_driver.c 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/Documentation/firmware_class/firmware_sample_driver.c 2003-10-22 22:48:41.000000000 +0000 @@ -0,0 +1,121 @@ +/* + * firmware_sample_driver.c - + * + * Copyright (c) 2003 Manuel Estrada Sainz + * + * Sample code on how to use request_firmware() from drivers. + * + * Note that register_firmware() is currently useless. + * + */ + +#include +#include +#include +#include + +#include "linux/firmware.h" + +#define WE_CAN_NEED_FIRMWARE_BEFORE_USERSPACE_IS_AVAILABLE +#ifdef WE_CAN_NEED_FIRMWARE_BEFORE_USERSPACE_IS_AVAILABLE +char __init inkernel_firmware[] = "let's say that this is firmware\n"; +#endif + +static char ghost_device[] = "ghost0"; + +static void sample_firmware_load(char *firmware, int size) +{ + u8 buf[size+1]; + memcpy(buf, firmware, size); + buf[size] = '\0'; + printk("firmware_sample_driver: firmware: %s\n", buf); +} + +static void sample_probe_default(void) +{ + /* uses the default method to get the firmware */ + const struct firmware *fw_entry; + printk("firmware_sample_driver: a ghost device got inserted :)\n"); + + if(request_firmware(&fw_entry, "sample_driver_fw", ghost_device)!=0) + { + printk(KERN_ERR + "firmware_sample_driver: Firmware not available\n"); + return; + } + + sample_firmware_load(fw_entry->data, fw_entry->size); + + release_firmware(fw_entry); + + /* finish setting up the device */ +} +static void sample_probe_specific(void) +{ + /* Uses some specific hotplug support to get the firmware from + * userspace directly into the hardware, or via some sysfs file */ + + /* NOTE: This currently doesn't work */ + + printk("firmware_sample_driver: a ghost device got inserted :)\n"); + + if(request_firmware(NULL, "sample_driver_fw", ghost_device)!=0) + { + printk(KERN_ERR + "firmware_sample_driver: Firmware load failed\n"); + return; + } + + /* request_firmware blocks until userspace finished, so at + * this point the firmware should be already in the device */ + + /* finish setting up the device */ +} +static void sample_probe_async_cont(const struct firmware *fw, void *context) +{ + if(!fw){ + printk(KERN_ERR + "firmware_sample_driver: firmware load failed\n"); + return; + } + + printk("firmware_sample_driver: device pointer \"%s\"\n", + (char *)context); + sample_firmware_load(fw->data, fw->size); +} +static void sample_probe_async(void) +{ + /* Let's say that I can't sleep */ + int error; + error = request_firmware_nowait (THIS_MODULE, + "sample_driver_fw", ghost_device, + "my device pointer", + sample_probe_async_cont); + if(error){ + printk(KERN_ERR + "firmware_sample_driver:" + " request_firmware_nowait failed\n"); + } +} + +static int sample_init(void) +{ +#ifdef WE_CAN_NEED_FIRMWARE_BEFORE_USERSPACE_IS_AVAILABLE + register_firmware("sample_driver_fw", inkernel_firmware, + sizeof(inkernel_firmware)); +#endif + /* since there is no real hardware insertion I just call the + * sample probe functions here */ + sample_probe_specific(); + sample_probe_default(); + sample_probe_async(); + return 0; +} +static void __exit sample_exit(void) +{ +} + +module_init (sample_init); +module_exit (sample_exit); + +MODULE_LICENSE("GPL"); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/Documentation/firmware_class/hotplug-script linux-2.4.23-pre8/Documentation/firmware_class/hotplug-script --- linux-2.4.22/Documentation/firmware_class/hotplug-script 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/Documentation/firmware_class/hotplug-script 2003-10-22 22:47:39.000000000 +0000 @@ -0,0 +1,16 @@ +#!/bin/sh + +# Simple hotplug script sample: +# +# Both $DEVPATH and $FIRMWARE are already provided in the environment. + +HOTPLUG_FW_DIR=/usr/lib/hotplug/firmware/ + +echo 1 > /sysfs/$DEVPATH/loading +cat $HOTPLUG_FW_DIR/$FIRMWARE > /sysfs/$DEVPATH/data +echo 0 > /sysfs/$DEVPATH/loading + +# To cancel the load in case of error: +# +# echo -1 > /sysfs/$DEVPATH/loading +# diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/Documentation/hw_random.txt linux-2.4.23-pre8/Documentation/hw_random.txt --- linux-2.4.22/Documentation/hw_random.txt 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/Documentation/hw_random.txt 2003-10-22 22:49:18.000000000 +0000 @@ -0,0 +1,138 @@ + Hardware driver for Intel/AMD/VIA Random Number Generators (RNG) + Copyright 2000,2001 Jeff Garzik + Copyright 2000,2001 Philipp Rumpf + +Introduction: + + The hw_random device driver is software that makes use of a + special hardware feature on your CPU or motherboard, + a Random Number Generator (RNG). + + In order to make effective use of this device driver, you + should download the support software as well. Download the + latest version of the "rng-tools" package from the + hw_random driver's official Web site: + + http://sourceforge.net/projects/gkernel/ + +About the Intel RNG hardware, from the firmware hub datasheet: + + The Firmware Hub integrates a Random Number Generator (RNG) + using thermal noise generated from inherently random quantum + mechanical properties of silicon. When not generating new random + bits the RNG circuitry will enter a low power state. Intel will + provide a binary software driver to give third party software + access to our RNG for use as a security feature. At this time, + the RNG is only to be used with a system in an OS-present state. + +Theory of operation: + + Character driver. Using the standard open() + and read() system calls, you can read random data from + the hardware RNG device. This data is NOT CHECKED by any + fitness tests, and could potentially be bogus (if the + hardware is faulty or has been tampered with). Data is only + output if the hardware "has-data" flag is set, but nevertheless + a security-conscious person would run fitness tests on the + data before assuming it is truly random. + + /dev/hwrandom is char device major 10, minor 183. + +Driver notes: + + * FIXME: support poll(2) + + NOTE: request_mem_region was removed, for two reasons: + 1) Only one RNG is supported by this driver, 2) The location + used by the RNG is a fixed location in MMIO-addressable memory, + 3) users with properly working BIOS e820 handling will always + have the region in which the RNG is located reserved, so + request_mem_region calls always fail for proper setups. + However, for people who use mem=XX, BIOS e820 information is + -not- in /proc/iomem, and request_mem_region(RNG_ADDR) can + succeed. + +Driver details: + + Based on: + Intel 82802AB/82802AC Firmware Hub (FWH) Datasheet + May 1999 Order Number: 290658-002 R + + Intel 82802 Firmware Hub: Random Number Generator + Programmer's Reference Manual + December 1999 Order Number: 298029-001 R + + Intel 82802 Firmware HUB Random Number Generator Driver + Copyright (c) 2000 Matt Sottek + + Special thanks to Matt Sottek. I did the "guts", he + did the "brains" and all the testing. + +Change history: + + Version 1.0.0: + * Merge Intel, AMD, VIA RNG drivers into one. + Further changelog in BitKeeper. + + Version 0.9.8: + * Support other i8xx chipsets by adding 82801E detection + * 82801DB detection is the same as for 82801CA. + + Version 0.9.7: + * Support other i8xx chipsets too (by adding 82801BA(M) and + 82801CA(M) detection) + + Version 0.9.6: + * Internal driver cleanups, prep for 1.0.0 release. + + Version 0.9.5: + * Rip out entropy injection via timer. It never ever worked, + and a better solution (rngd) is now available. + + Version 0.9.4: + * Fix: Remove request_mem_region + * Fix: Horrible bugs in FIPS calculation and test execution + + Version 0.9.3: + * Clean up rng_read a bit. + * Update i810_rng driver Web site URL. + * Increase default timer interval to 4 samples per second. + * Abort if mem region is not available. + * BSS zero-initialization cleanup. + * Call misc_register() from rng_init_one. + * Fix O_NONBLOCK to occur before we schedule. + + Version 0.9.2: + * Simplify open blocking logic + + Version 0.9.1: + * Support i815 chipsets too (Matt Sottek) + * Fix reference counting when statically compiled (prumpf) + * Rewrite rng_dev_read (prumpf) + * Make module races less likely (prumpf) + * Small miscellaneous bug fixes (prumpf) + * Use pci table for PCI id list + + Version 0.9.0: + * Don't register a pci_driver, because we are really + using PCI bridge vendor/device ids, and someone + may want to register a driver for the bridge. (bug fix) + * Don't let the usage count go negative (bug fix) + * Clean up spinlocks (bug fix) + * Enable PCI device, if necessary (bug fix) + * iounmap on module unload (bug fix) + * If RNG chrdev is already in use when open(2) is called, + sleep until it is available. + * Remove redundant globals rng_allocated, rng_use_count + * Convert numeric globals to unsigned + * Module unload cleanup + + Version 0.6.2: + * Clean up spinlocks. Since we don't have any interrupts + to worry about, but we do have a timer to worry about, + we use spin_lock_bh everywhere except the timer function + itself. + * Fix module load/unload. + * Fix timer function and h/w enable/disable logic + * New timer interval sysctl + * Clean up sysctl names diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/Documentation/i386/zero-page.txt linux-2.4.23-pre8/Documentation/i386/zero-page.txt --- linux-2.4.22/Documentation/i386/zero-page.txt 1999-08-30 17:47:02.000000000 +0000 +++ linux-2.4.23-pre8/Documentation/i386/zero-page.txt 2003-10-22 22:48:28.000000000 +0000 @@ -31,6 +31,7 @@ 0x1e0 unsigned long ALT_MEM_K, alternative mem check, in Kb 0x1e8 char number of entries in E820MAP (below) +0x1e9 unsigned char number of entries in EDDBUF (below) 0x1f1 char size of setup.S, number of sectors 0x1f2 unsigned short MOUNT_ROOT_RDONLY (if !=0) 0x1f4 unsigned short size of compressed kernel-part in the @@ -66,6 +67,7 @@ 0x220 4 bytes (setup.S) 0x224 unsigned short setup.S heap end pointer 0x2d0 - 0x600 E820MAP +0x600 - 0x7D4 EDDBUF (setup.S) 0x800 string, 2K max COMMAND_LINE, the kernel commandline as copied using CL_OFFSET. diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/Documentation/ioctl-number.txt linux-2.4.23-pre8/Documentation/ioctl-number.txt --- linux-2.4.22/Documentation/ioctl-number.txt 2001-07-11 23:35:37.000000000 +0000 +++ linux-2.4.23-pre8/Documentation/ioctl-number.txt 2003-10-22 22:49:41.000000000 +0000 @@ -171,10 +171,6 @@ 0xA0 all linux/sdp/sdp.h Industrial Device Project -0xA2 00-0F DVD decoder driver in development: - -0xA3 00-1F Philips SAA7146 dirver in development: - 0xA3 80-8F Port ACL in development: 0xA3 90-9F linux/dtlk.h diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/Documentation/kernel-parameters.txt linux-2.4.23-pre8/Documentation/kernel-parameters.txt --- linux-2.4.22/Documentation/kernel-parameters.txt 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/Documentation/kernel-parameters.txt 2003-10-22 22:48:57.000000000 +0000 @@ -278,6 +278,8 @@ keepinitrd [HW, ARM] + lapic [IA-32,APIC] Enable the local APIC even if BIOS disabled it. + load_ramdisk= [RAM] List of ramdisks to load from floppy. lockd.udpport= [NFS] @@ -414,6 +416,8 @@ nointroute [IA-64] + nolapic [IA-32,APIC] Do not enable or use the local APIC. + no-scroll [VGA] nosmp [SMP] Tells an SMP kernel to act as a UP kernel. diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/Documentation/laptop-mode.txt linux-2.4.23-pre8/Documentation/laptop-mode.txt --- linux-2.4.22/Documentation/laptop-mode.txt 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/Documentation/laptop-mode.txt 2003-10-22 22:47:37.000000000 +0000 @@ -0,0 +1,72 @@ +Laptop mode +=========== + +This small doc describes the 2.4 laptop mode patch. + +Last updated 2003-05-25, Jens Axboe + +Introduction +------------ + +A few properties of the Linux vm makes it virtually impossible to attempt +to spin down the hard drive in a laptop for a longer period of time (more +than a handful of seconds). This means you are lucky if you can even reach +the break even point with regards to power consumption, let alone expect any +decrease. + +One problem is the age time of dirty buffers. Linux uses 30 seconds per +default, so if you dirty any data then flusing of that data will commence +at most 30 seconds from then. Another is the journal commit interval of +journalled file systems such as ext3, which is 5 seconds on a stock kernel. +Both of these are tweakable either from proc/sysctl or as mount options +though, and thus partly solvable from user space. + +The kernel update daemon (kupdated) also runs at specific intervals, flushing +old dirty data out. Default is every 5 seconds, this too can be tweaked +from sysctl. + +So what does the laptop mode patch do? It attempts to fully utilize the +hard drive once it has been spun up, flushing the old dirty data out to +disk. Instead of flushing just the expired data, it will clean everything. +When a read causes the disk to spin up, we kick off this flushing after +a few seconds. This means that once the disk spins down again, everything +is up to date. That allows longer dirty data and journal expire times. + +It follows that you have to set long expire times to get long spin downs. +This means you could potentially loose 10 minutes worth of data, if you +set a 10 minute expire count instead of just 30 seconds worth. The biggest +risk here is undoubtedly running out of battery. + +Settings +-------- + +The main knob is /proc/sys/vm/laptop_mode. Setting that to 1 switches the +vm (and block layer) to laptop mode. Leaving it to 0 makes the kernel work +like before. When in laptop mode, you also want to extend the intervals +desribed above. See the laptop-mode.sh script for how to do that. + +It can happen that the disk still keeps spinning up and you don't quite +know why or what causes it. The laptop mode patch has a little helper for +that as well, /proc/sys/vm/block_dump. When set to 1, it will dump info to +the kernel message buffer about what process caused the io. Be very careful +when playing with this setting, it is advisable to shut down syslog first! + +Result +------ + +Using the laptop-mode.sh script with its default settings, I get the full +10 minutes worth of drive spin down. Provided your work load is cached, +the disk will only spin up every 10 minutes (well actually, 9 minutes and 55 +seconds due to the 5 second delay in flushing dirty data after the last read +completes). I can't tell you exactly how much extra battery life you will +gain in laptop mode, it will vary greatly on the laptop and workload in +question. The only way to know for sure is to try it out. Getting 10% extra +battery life is not unrealistic. + +Notes +----- + +Patch only changes journal expire time for ext3. reiserfs uses a hardwire +value, should be trivial to adapt though (basically just make it call +get_buffer_flushtime() and uses that). I have not looked at other +journalling file systems, I'll happily accept patches to rectify that! diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/Documentation/mkdev_dyn.cciss linux-2.4.23-pre8/Documentation/mkdev_dyn.cciss --- linux-2.4.22/Documentation/mkdev_dyn.cciss 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/Documentation/mkdev_dyn.cciss 2003-10-22 22:48:38.000000000 +0000 @@ -0,0 +1,171 @@ +#!/bin/sh +# +# Author: Francis Wiran +# +# Script to create device nodes for SMART Array controllers, idea from +# mkdev.cciss found in Documentation. The argument syntax is different, +# hence, the name change. +# +# Usage: +# mkdev_dyn.cciss [ctlr num] [major num] [num log vol] [num partitions] +# +# With no arguments, the script will check to see if there are any cciss +# nodes already created in the /dev directory. If so, then it will assume +# that the nodes for the first 8 controllers are already created by +# /etc/makedev.d, which is likely. If not, then the script will create +# them, using the major numbers reserved for cciss controllers (104 thru 111). +# +# After that, it will start creating nodes for the controllers which major +# numbers are dynamically allocated by the kernel. It will check +# /proc/devices for any cciss controllers with major numbers other than +# 104 thru 111 and creates the nodes. +# +# Note that it is a good idea to run rmdev_dyn.cciss script if you remove +# those controllers (the ones which major numbers were dynamically allocated) +# This will unclutter /dev, as well as preventing possible problems due to +# referenced devices and major numbers no longer available or taken by +# other non-cciss drivers. +# +# With no arguments, the script assumes 16 logical volumes per controller +# and 16 partitions per volume; +# +# Passing arguments: +# If you know that one of your controllers, say cciss8, has been dynamically +# assigned major number 254, and were planning on no more than 2 logical +# volumes, using a maximum of 4 partitions per volume, you could do: +# +# mkdev_dyn.cciss 8 254 2 4 +# +# Of course, this has no real benefit over "mkdev_dyn.cciss 8 254" except +# that it doesn't create as many device nodes in /dev/cciss. +# + +# Inputs +NR_CTLR=${1-8} +NR_MAJOR=${2-254} +NR_VOL=${3-16} +NR_PART=${4-16} + +echo_usage() +{ + echo "Usage: mkdev_dyn.cciss [ctlr num] [maj] [volumes] [partitions]" + echo "The script assumes that ctlr 0 thru 7 is statically created" + echo "Therefore, if you want to pass arguments make sure that" + echo "ctlr num is equal or greater than 8, and the major number" + echo "is not one that's statically assigned for cciss controller." + echo "Check the correct major number in /proc/devices" + + # Hmm... we don't support volumes and partitions greater than 16 + # either. +} + +echo_create() +{ + echo "created /dev/cciss/c${1}* nodes using major number ${2}" +} + + +# Function: do_mknod() +# Creates devices nodes under /dev/cciss +# Inputs: $1 - ctlr number +# $2 - major number +# $3 - number of devices on controller +# $4 - number of partitions per device +do_mknod() +{ + D=0; + while [ $D -lt $3 ]; do + P=0; + while [ $P -lt $4 ]; do + MIN=`expr $D \* 16 + $P`; + if [ $P -eq 0 ]; then + mknod /dev/cciss/c${1}d${D} b $2 $MIN + else + mknod /dev/cciss/c${1}d${D}p${P} b $2 $MIN + fi + P=`expr $P + 1`; + done + D=`expr $D + 1`; + done +} + +# Function: do_dyn +# Search and create cciss nodes for the controllers which +# major numbers are allocated dynamically by the kernel +# instead of using kernel.org 's value of 104 to 111. +# +# Input: $1 - ctlr num - will create nodes /dev/cciss/c${1} +# $2 - major num - the major number to assign to the nodes +# $3 - volumes - max number of volumes per controller +# $4 - partitions - max number of partitions per volume +# +# Note: Without input, this function will start creating nodes +# for controller c8 and above, making assumption that +# c0 thru c7 are already made, and the name c8 and above +# are not already taken. +do_dyn() +{ + if [ $# -eq 0 ]; then + C=0; + for MAJ in `cat /proc/devices |\ + grep cciss |\ + awk '/cciss[0-9]$/ { sub("cciss", "cciss0") }; {print}' |\ + sort -k 2,2 |\ + awk '{print $1-i}'`; + do + if [ `ls -l /dev/cciss/c* |\ + awk '{print $5-i}' |\ + uniq |\ + grep $MAJ |\ + wc -l` -gt 0 ]; then + : + else + do_mknod $C $MAJ $NR_VOL $NR_PART; + echo_create $C $MAJ; + fi + C=`expr $C + 1`; + done + else + do_mknod $1 $2 $3 $4; + echo_create $1 $2; + fi + + exit +} + +# Start here + +# Check the input values +if [ $NR_CTLR -lt 8 ]; then + echo_usage; + exit +fi + +if [ $NR_CTLR -ge 8 ]; then + if [ \( $NR_MAJOR -ge 104 \) -a \( $NR_MAJOR -le 111 \) ]; then + echo_usage; + exit + fi +fi + +if [ ! -d /dev/cciss ]; then + mkdir -p /dev/cciss +fi + +# Assume that if c0d0p1 node already exist, then all nodes from c0d0p1 +# to c7d15p15 have been created for us. +if [ ! -b /dev/cciss/c0d0p1 ]; then + C=0; + while [ $C -lt 8 ]; do + MAJ=`expr $C + 104`; + do_mknod $C $MAJ $NR_VOL $NR_PART; + echo_create $C $MAJ; + C=`expr $C + 1`; + done +fi + +if [ $# -gt 0 ]; then + do_dyn $NR_CTLR $NR_MAJOR $NR_VOL $NR_PART; +else + do_dyn; +fi diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/Documentation/networking/00-INDEX linux-2.4.23-pre8/Documentation/networking/00-INDEX --- linux-2.4.22/Documentation/networking/00-INDEX 2003-06-13 14:51:29.000000000 +0000 +++ linux-2.4.23-pre8/Documentation/networking/00-INDEX 2003-10-22 22:49:16.000000000 +0000 @@ -97,8 +97,8 @@ sis900.txt - SiS 900/7016 Fast Ethernet device driver info. sk98lin.txt - - SysKonnect SK-98xx and SK-98xx Gigabit Ethernet Adapter family - driver info. + - Marvell Yukon Chipset / SysKonnect SK-98xx compliant Gigabit + Ethernet Adapter family driver info skfp.txt - SysKonnect FDDI (SK-5xxx, Compaq Netelligent) driver info. smc9.txt diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/Documentation/networking/atm.txt linux-2.4.23-pre8/Documentation/networking/atm.txt --- linux-2.4.22/Documentation/networking/atm.txt 2000-02-09 02:23:13.000000000 +0000 +++ linux-2.4.23-pre8/Documentation/networking/atm.txt 2003-10-22 22:49:54.000000000 +0000 @@ -1,8 +1,8 @@ In order to use anything but the most primitive functions of ATM, several user-mode programs are required to assist the kernel. These programs and related material can be found via the ATM on Linux Web -page at http://icawww1.epfl.ch/linux-atm/ +page at http://linux-atm.sourceforge.net/ If you encounter problems with ATM, please report them on the ATM on Linux mailing list. Subscription information, archives, etc., -can be found on http://icawww1.epfl.ch/linux-atm/ +can be found on http://linux-atm.sourceforge.net/ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/Documentation/networking/bonding.txt linux-2.4.23-pre8/Documentation/networking/bonding.txt --- linux-2.4.22/Documentation/networking/bonding.txt 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/Documentation/networking/bonding.txt 2003-10-22 22:48:16.000000000 +0000 @@ -527,9 +527,9 @@ 1) Bonding information files ---------------------------- -The bonding driver information files reside in the /proc/net/bond* directories. +The bonding driver information files reside in the /proc/net/bonding directory. -Sample contents of /proc/net/bond0/info after the driver is loaded with +Sample contents of /proc/net/bonding/bond0 after the driver is loaded with parameters of mode=0 and miimon=1000 is shown below. Bonding Mode: load balancing (round-robin) diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/Documentation/networking/generic-hdlc.txt linux-2.4.23-pre8/Documentation/networking/generic-hdlc.txt --- linux-2.4.22/Documentation/networking/generic-hdlc.txt 2003-06-13 14:51:29.000000000 +0000 +++ linux-2.4.23-pre8/Documentation/networking/generic-hdlc.txt 2003-10-22 22:49:45.000000000 +0000 @@ -1,11 +1,13 @@ -Generic HDLC layer for Linux kernel 2.4/2.5 +Generic HDLC layer Krzysztof Halasa -May, 2001 +January, 2003 Generic HDLC layer currently supports: -- Frame Relay (ANSI, CCITT and no LMI), with ARP support (no InARP), -- raw HDLC (IPv4 only), +- Frame Relay (ANSI, CCITT and no LMI), with ARP support (no InARP). + Normal (routed) and Ethernet-bridged (Ethernet device emulation) + interfaces can share a single PVC. +- raw HDLC - either IP (IPv4) interface or Ethernet device emulation. - Cisco HDLC, - PPP (uses syncppp.c), - X.25 (uses X.25 routines). @@ -15,6 +17,10 @@ - RISCom/N2 by SDL Communications Inc. - and others, some not in the official kernel. +Ethernet device emulation (using HDLC or Frame-Relay PVC) is compatible +with IEEE 802.1Q (VLANs) and 802.1D (Ethernet bridging). + + Make sure the hdlc.o and the hardware driver are loaded. It should create a number of "hdlc" (hdlc0 etc) network devices, one for each WAN port. You'll need the "sethdlc" utility, get it from: @@ -32,8 +38,10 @@ sethdlc hdlc0 cisco interval 10 timeout 25 or sethdlc hdlc0 rs232 clock ext - sethdlc fr lmi ansi - sethdlc create 99 + sethdlc hdlc0 fr lmi ansi + sethdlc hdlc0 create 99 + ifconfig hdlc0 up + ifconfig pvc0 localIP pointopoint remoteIP In Frame Relay mode, ifconfig master hdlc device up (without assigning any IP address to it) before using pvc devices. @@ -58,6 +66,9 @@ no-parity / crc16 / crc16-pr0 (CRC16 with preset zeros) / crc32-itu crc16-itu (CRC16 with ITU-T polynomial) / crc16-itu-pr0 - sets parity +* hdlc-eth - Ethernet device emulation using HDLC. Parity and encoding + as above. + * cisco - sets Cisco HDLC mode (IP, IPv6 and IPX supported) interval - time in seconds between keepalive packets timeout - time in seconds after last received keepalive packet before @@ -77,7 +88,12 @@ n392 - error threshold - both user and network n393 - monitored events count - both user and network -* create | delete n - FR only - adds / deletes PVC interface with DLCI #n. +Frame-Relay only: +* create n | delete n - adds / deletes PVC interface with DLCI #n. + Newly created interface will be named pvc0, pvc1 etc. + +* create ether n | delete ether n - adds a device for Ethernet-bridged + frames. The device will be named pvceth0, pvceth1 etc. @@ -104,11 +120,11 @@ If you have a problem with N2 or C101 card, you can issue the "private" -command to see port's packet descriptor rings: +command to see port's packet descriptor rings (in kernel logs): sethdlc hdlc0 private -The hardware driver have to be build with CONFIG_HDLC_DEBUG_RINGS. +The hardware driver has to be build with CONFIG_HDLC_DEBUG_RINGS. Attaching this info to bug reports would be helpful. Anyway, let me know if you have problems using this. diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/Documentation/networking/ifenslave.c linux-2.4.23-pre8/Documentation/networking/ifenslave.c --- linux-2.4.22/Documentation/networking/ifenslave.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/Documentation/networking/ifenslave.c 2003-10-22 22:47:56.000000000 +0000 @@ -140,6 +140,7 @@ #include #include #include +#include #include #include #include diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/Documentation/networking/sk98lin.txt linux-2.4.23-pre8/Documentation/networking/sk98lin.txt --- linux-2.4.22/Documentation/networking/sk98lin.txt 2003-06-13 14:51:29.000000000 +0000 +++ linux-2.4.23-pre8/Documentation/networking/sk98lin.txt 2003-10-22 22:49:09.000000000 +0000 @@ -1,11 +1,11 @@ -(C)Copyright 1999-2002 SysKonnect GmbH. +(C)Copyright 1999-2003 Marvell(R). All rights reserved =========================================================================== -sk98lin.txt created 19-Dec-2002 +sk98lin.txt created 23-Sep-2003 -Readme File for sk98lin v6.02 -SysKonnect SK-98xx Gigabit Ethernet Adapter family driver for LINUX +Readme File for sk98lin v6.18 +Marvell Yukon/SysKonnect SK-98xx Gigabit Ethernet Adapter family driver for LINUX This file contains 1 Overview @@ -19,7 +19,6 @@ 5 Large Frame Support 6 VLAN and Link Aggregation Support (IEEE 802.1, 802.1q, 802.3ad) 7 Troubleshooting - 8 History =========================================================================== @@ -27,8 +26,9 @@ 1 Overview =========== -The sk98lin driver supports the SysKonnect SK-98xx and SK-95xx family -on Linux. It has been tested with Linux on Intel/x86 machines. +The sk98lin driver supports the Marvell Yukon and SysKonnect +SK-98xx/SK-95xx compliant Gigabit Ethernet Adapter on Linux. It has +been tested with Linux on Intel/x86 machines. *** @@ -75,8 +75,8 @@ To integrate the driver permanently into the kernel, proceed as follows: 1. Select the menu "Network device support" and then "Ethernet(1000Mbit)" -2. Mark "SysKonnect SK-98xx and SK-95xx Gigabit Ethernet Adapter - family support" with (*) +2. Mark "Marvell Yukon Chipset / SysKonnect SK-98xx family support" + with (*) 3. Build a new kernel when the configuration of the above options is finished. 4. Install the new kernel. @@ -87,8 +87,8 @@ 1. Enable 'loadable module support' in the kernel. 2. For automatic driver start, enable the 'Kernel module loader'. 3. Select the menu "Network device support" and then "Ethernet(1000Mbit)" -4. Mark "SysKonnect SK-98xx and SK-95xx Gigabit Ethernet Adapter - family support" with (M) +4. Mark "Marvell Yukon Chipset / SysKonnect SK-98xx family support" + with (M) 5. Execute the command "make modules". 6. Execute the command "make modules_install". The appropiate modules will be installed. @@ -100,21 +100,23 @@ To load the module manually, proceed as follows: 1. Enter "modprobe sk98lin". -2. If the SysKonnect SK-98xx adapter is installed in your computer and you - have a /proc file system, execute the command: +2. If a Marvell Yukon or SysKonnect SK-98xx adapter is installed in + your computer and you have a /proc file system, execute the command: "ls /proc/net/sk98lin/" This should produce an output containing a line with the following format: eth0 eth1 ... which indicates that your adapter has been found and initialized. - NOTE 1: If you have more than one SysKonnect SK-98xx adapter installed, - the adapters will be listed as 'eth0', 'eth1', 'eth2', etc. - For each adapter, repeat steps 3 and 4 below. - - NOTE 2: If you have other Ethernet adapters installed, your SysKonnect - SK-98xx adapter will be mapped to the next available number, - e.g. 'eth1'. The mapping is executed automatically. + NOTE 1: If you have more than one Marvell Yukon or SysKonnect SK-98xx + adapter installed, the adapters will be listed as 'eth0', + 'eth1', 'eth2', etc. + For each adapter, repeat steps 3 and 4 below. + + NOTE 2: If you have other Ethernet adapters installed, your Marvell + Yukon or SysKonnect SK-98xx adapter will be mapped to the + next available number, e.g. 'eth1'. The mapping is executed + automatically. The module installation message (displayed either in a system log file or on the console) prints a line for each adapter found containing the corresponding 'ethX'. @@ -141,7 +143,7 @@ Use 'ping ' to verify the connection to other computers on your network. 5. To check the adapter configuration view /proc/net/sk98lin/[devicename]. - For example by executing: + For example by executing: "cat /proc/net/sk98lin/eth0" Unload the module @@ -184,7 +186,7 @@ unload and reload the driver. The syntax of the driver parameters is: - modprobe sk98lin parameter=value1[,value2[,value3...]] + modprobe sk98lin parameter=value1[,value2[,value3...]] where value1 refers to the first adapter, value2 to the second etc. @@ -198,7 +200,7 @@ to FULL, and on the second adapter to HALF. Then, you must enter: - modprobe sk98lin AutoNeg=On,Off DupCap=Full,Half + modprobe sk98lin AutoNeg_A=On,Off DupCap_A=Full,Half NOTE: The number of adapters that can be configured this way is limited in the driver (file skge.c, constant SK_MAX_CARD_PARAM). @@ -256,9 +258,9 @@ port reports during auto-negotiation. It can be set for each port individually. Possible modes: - -- Sym = Symetric: both link partners are allowed to send + -- Sym = Symmetric: both link partners are allowed to send PAUSE frames - -- SymOrRem = SymetricOrRemote: both or only remote partner + -- SymOrRem = SymmetricOrRemote: both or only remote partner are allowed to send PAUSE frames -- LocSend = LocalSend: only local link partner is allowed to send PAUSE frames @@ -283,6 +285,101 @@ 4.2 Adapter Parameters ----------------------- +Connection Type (SK-98xx V2.0 copper adapters only) +--------------- +Parameter: ConType +Values: Auto, 100FD, 100HD, 10FD, 10HD +Default: Auto + +The parameter 'ConType' is a combination of all five per-port parameters +within one single parameter. This simplifies the configuration of both ports +of an adapter card! The different values of this variable reflect the most +meaningful combinations of port parameters. + +The following table shows the values of 'ConType' and the corresponding +combinations of the per-port parameters: + + ConType | DupCap AutoNeg FlowCtrl Role Speed + ----------+------------------------------------------------------ + Auto | Both On SymOrRem Auto Auto + 100FD | Full Off None Auto (ignored) 100 + 100HD | Half Off None Auto (ignored) 100 + 10FD | Full Off None Auto (ignored) 10 + 10HD | Half Off None Auto (ignored) 10 + +Stating any other port parameter together with this 'ConType' variable +will result in a merged configuration of those settings. This due to +the fact, that the per-port parameters (e.g. Speed_? ) have a higher +priority than the combined variable 'ConType'. + +NOTE: This parameter is always used on both ports of the adapter card. + +Interrupt Moderation +-------------------- +Parameter: Moderation +Values: None, Static, Dynamic +Default: None + +Interrupt moderation is employed to limit the maxmimum number of interrupts +the driver has to serve. That is, one or more interrupts (which indicate any +transmit or receive packet to be processed) are queued until the driver +processes them. When queued interrupts are to be served, is determined by the +'IntsPerSec' parameter, which is explained later below. + +Possible modes: + + -- None - No interrupt moderation is applied on the adapter card. + Therefore, each transmit or receive interrupt is served immediately + as soon as it appears on the interrupt line of the adapter card. + + -- Static - Interrupt moderation is applied on the adapter card. + All transmit and receive interrupts are queued until a complete + moderation interval ends. If such a moderation interval ends, all + queued interrupts are processed in one big bunch without any delay. + The term 'static' reflects the fact, that interrupt moderation is + always enabled, regardless how much network load is currently + passing via a particular interface. In addition, the duration of + the moderation interval has a fixed length that never changes while + the driver is operational. + + -- Dynamic - Interrupt moderation might be applied on the adapter card, + depending on the load of the system. If the driver detects that the + system load is too high, the driver tries to shield the system against + too much network load by enabling interrupt moderation. If - at a later + time - the CPU utilizaton decreases again (or if the network load is + negligible) the interrupt moderation will automatically be disabled. + +Interrupt moderation should be used when the driver has to handle one or more +interfaces with a high network load, which - as a consequence - leads also to a +high CPU utilization. When moderation is applied in such high network load +situations, CPU load might be reduced by 20-30%. + +NOTE: The drawback of using interrupt moderation is an increase of the round- +trip-time (RTT), due to the queueing and serving of interrupts at dedicated +moderation times. + +Interrupts per second +--------------------- +Parameter: IntsPerSec +Values: 30...40000 (interrupts per second) +Default: 2000 + +This parameter is only used, if either static or dynamic interrupt moderation +is used on a network adapter card. Using this paramter if no moderation is +applied, will lead to no action performed. + +This parameter determines the length of any interrupt moderation interval. +Assuming that static interrupt moderation is to be used, an 'IntsPerSec' +parameter value of 2000 will lead to an interrupt moderation interval of +500 microseconds. + +NOTE: The duration of the moderation interval is to be chosen with care. +At first glance, selecting a very long duration (e.g. only 100 interrupts per +second) seems to be meaningful, but the increase of packet-processing delay +is tremendous. On the other hand, selecting a very short moderation time might +compensate the use of any moderation being applied. + + Preferred Port -------------- Parameter: PrefPort @@ -365,10 +462,10 @@ 6 VLAN and Link Aggregation Support (IEEE 802.1, 802.1q, 802.3ad) ================================================================== -The SysKonnect Linux drivers are able to support VLAN and Link Aggregation -according to IEEE standards 802.1, 802.1q, and 802.3ad. These features are -only available after installation of open source modules available on the -Internet: +The Marvell Yukon/SysKonnect Linux drivers are able to support VLAN and +Link Aggregation according to IEEE standards 802.1, 802.1q, and 802.3ad. +These features are only available after installation of open source +modules available on the Internet: For VLAN go to: http://scry.wanfear.com/~greear/vlan.html For Link Aggregation go to: http://www.st.rim.or.jp/~yumo @@ -448,7 +545,7 @@ Nr: 0xcc Msg: SkGeInitPort() cannot init running ports" Reason: You are using a driver compiled for single processor machines - on a multiprocessor machine with SMP (Symetric MultiProcessor) + on a multiprocessor machine with SMP (Symmetric MultiProcessor) kernel. Solution: Configure your kernel appropriately and recompile the kernel or the modules. @@ -459,208 +556,13 @@ support for help (linux@syskonnect.de). When contacting our technical support, please ensure that the following information is available: -- System Manufacturer and Model -- Boards in your system +- System Manufacturer and HW Informations (CPU, Memory... ) +- PCI-Boards in your system - Distribution - Kernel version - Driver version *** -8 History -========== -VERSION 6.00 (In-Kernel version) -New Features: -- Support for SK-98xx V2.0 adapters -- Support for gmac -- Support for kernel 2.4.x and kernel 2.2.x -- Zerocopy support for kernel 2.4.x with sendfile() -- Support for scatter-gather functionality with sendfile() -- Speed support for SK-98xx V2.0 adapters -- New ProcFs entries -- New module parameters -Problems fixed: -- ProcFS initialization -- csum packet error -- Ierror/crc counter error (#10767) -- rx_too_long counter error (#10751) -Known limitations: -- None - -VERSION 4.11 -New Features: -- none -Problems fixed: -- Error statistic counter fix (#10620) -- RLMT-Fixes (#10659, #10639, #10650) -- LM80 sensor initialization fix (#10623) -- SK-CSUM memory fixes (#10610). -Known limitations: -- None - -VERSION 4.10 -New Features: -- New ProcFs entries -Problems fixed: -- Corrected some printk's -Known limitations: -- None - -VERSION 4.09 -New Features: -- IFF_RUNNING support (link status) -- New ProcFs entries -Problems fixed: -- too long counters -- too short counters -- Kernel error compilation -Known limitations: -- None - -VERSION 4.06 (In-Kernel version) -Problems fixed: -- MTU init problems - -VERSION 4.04 -Problems fixed: -- removed VLAN error messages - -VERSION 4.02 (In-Kernel version) -New Features: -- Add Kernel 2.4 changes -Known limitations: -- None - -VERSION 4.01 (In-Kernel version) -Problems fixed: -- Full statistics support for DualNet mode -Known limitations: -- None - -VERSION 4.00 (In-Kernel version) -Problems fixed: -- Memory leak found -New Features: -- Proc filesystem integration -- DualNet functionality integrated -- Rlmt networks added -Known limitations: -- statistics partially incorrect in DualNet mode - -VERSION 3.04 (In-Kernel version) -Problems fixed: -- Driver start failed on UltraSPARC -- Rx checksum calculation for big endian machines did not work -- Jumbo frames were counted as input-errors in netstat - -VERSION 3.03 (Standalone version) -Problems fixed: -- Compilation did not find script "printver.sh" if "." not in PATH -Known limitations: -- None - -VERSION 3.02 (In-Kernel version) -Problems fixed: -- None -New Features: -- Integration in Linux kernel source (2.2.14 and 2.3.29) -Known limitations: -- None - -VERSION 3.01 -Problems fixed: -- None -New Features: -- Full source release -Known limitations: -- None - -VERSION 3.00 -Problems fixed: -- None -New Features: -- Support for 1000Base-T adapters (SK-9821 and SK-9822) -Known limitations: -- None - -VERSION 1.07 -Problems fixed: -- RlmtMode parameter value strings were wrong (#10437) -- Driver sent too many RLMT frames (#10439) -- Driver did not recognize network segmentation (#10440) -- RLMT switched too often on segmented network (#10441) -Known limitations: -- None - -VERSION 1.06 -Problems fixed: -- System panic'ed after some time when running with - RlmtMode=CheckOtherLink or RlmtMode=CheckSeg (#10421) - Panic message: "Kernel panic: skput: over ... dev: eth0" -- Driver did not switch back to default port when connected - back-to-back (#10422). -Changes: -- RlmtMode parameter names have changed -New features: -- There is now a version for ALPHA processors -Known limitations: -- None - -VERSION 1.05 -Problems fixed: -- Driver failed to load on kernels with version information - for module symbols enabled -Known limitations: -- None - -VERSION 1.04 -Problems fixed: -- Large frame support does work now (no autonegotiation - support for large frames, just manually selectable) -New Features: -- Receive checksumming in hardware -- Performance optimizations - Some numbers (on two PII-400 machines, back-to-back): - netpipe: 300 MBit/sec, with large frames: 470 MBit/sec - ttcp: 38 MByte/sec, with large frames: 60 MByte/sec - ttcp (UDP send): 66 MByte/sec, with large frames: 106 MByte/sec -Known limitations: -- None - -VERSION 1.03 -Problems fixed: -- Unloading with "rmmod" caused segmentation fault (#10415) -- The link LED flickered from time to time, if no link was - established (#10402) -- Installation problems with RedHat 6.0 (#10409) -New Features: -- Connection state ouput at "network connection up" -Known limitations: -- None - -VERSION 1.02 -Problems fixed: -- Failed with multiple adapters -- Failed with Single Port adapters -- Startup string was only displayed if adapter found -- No link could be established on certain switches when the switches were - rebooted. (#10377) -Known limitations: -- Segmentation fault at "rmmod" with kernel 2.2.3 on some machines - -VERSION 1.01 -Problems fixed: -- Sensor status was not set back to 'ok' after 'warning/error'. (#10386) -Changes: -- improved parallelism in driver - -VERSION 1.00 -Known limitations: -- not tested with all kernel versions (I don't have that much time :-) -- only x86 version available (if you need others, ask for it) -- source code not completely available ***End of Readme File*** - - - diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/Documentation/rmdev_dyn.cciss linux-2.4.23-pre8/Documentation/rmdev_dyn.cciss --- linux-2.4.22/Documentation/rmdev_dyn.cciss 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/Documentation/rmdev_dyn.cciss 2003-10-22 22:48:53.000000000 +0000 @@ -0,0 +1,87 @@ +#!/bin/sh +# +# Author: Francis Wiran +# +# Script to remove device nodes for SMART Array controllers. This will +# be the device nodes with major numbers which are dynamically allocated +# by the kernel. This script will not attempt to remove the device +# nodes with major number 104 thru 111 (c0 thru c7), which are +# the major numbers that's allocated for cciss controllers by kernel.org. +# +# Usage: +# rmdev_dyn.cciss [ctlr num] +# +# With no arguments, the script will check to see if there are any nodes +# under /dev/cciss, whose major number no longer shows in /proc/partitions, +# or to be exact, no longer shows to be owned by cciss driver. +# If there is, then it will be removed. +# +# Note that it is a good idea to run rmdev_dyn.cciss script if you remove +# those controllers (the ones which major numbers were dynamically allocated) +# This will unclutter /dev, as well as preventing possible problems due to +# referenced devices and major numbers no longer available or taken by +# other non-cciss drivers. +# +# Passing arguments: +# If you know that one of your controllers, say cciss8, has been removed +# and the nodes are no longer valid, you could do +# +# rmdev_dyn.cciss 8 +# +# This is the same as doing `rm -f /dev/cciss/c8*` + +# Inputs +NR_CTLR=${1} + +echo_usage() +{ + echo "Usage: rmdev_dyn.cciss [ctlr num]" + echo "The script will not attempt to remove nodes for controllers" + echo "0 thru 7, therefore if you want to pass an argument," + echo "make sure that ctlr num is equal or greater than 8" +} + +rm_nod1() +{ + if [ $1 -lt 8 ]; then + echo_usage; + exit + else + rm -f /dev/cciss/c${1}* + echo "removed /dev/cciss/c${1}*" + fi +} + +rm_nod2() +{ + for X in `ls -l /dev/cciss/c* |\ + awk '{print $5-i}' |\ + uniq`; do + if [ \( $X -ge 104 \) -a \( $X -le 111 \) ]; then + : + elif [ `cat /proc/devices |\ + grep cciss |\ + grep $X |\ + wc -l` -eq 0 ]; then + + Y=`ls -l /dev/cciss/ |\ + awk '{print $5-i ":" $10}'|\ + tr d ':' |\ + grep $X |\ + awk -F: '{print $2}' |\ + uniq` + + Z="/dev/cciss/${Y}*" + + rm -f $Z + echo "removed $Z" + fi + done +} + +# Start here +if [ $# -gt 0 ]; then + rm_nod1 $NR_CTLR; +else + rm_nod2; +fi diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/Documentation/sonypi.txt linux-2.4.23-pre8/Documentation/sonypi.txt --- linux-2.4.22/Documentation/sonypi.txt 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/Documentation/sonypi.txt 2003-10-22 22:47:30.000000000 +0000 @@ -8,7 +8,9 @@ Copyright (C) 2000 Andrew Tridgell This driver enables access to the Sony Programmable I/O Control Device which -can be found in many (all ?) Sony Vaio laptops. +can be found in many Sony Vaio laptops. Some newer Sony laptops (seems to be +limited to new FX series laptops, at least the FX501 and the FX702) lack a +sonypi device and are not supported at all by this driver. It will give access (through a user space utility) to some events those laptops generate, like: @@ -96,6 +98,7 @@ SONYPI_THUMBPHRASE_MASK 0x0200 SONYPI_MEYE_MASK 0x0400 SONYPI_MEMORYSTICK_MASK 0x0800 + SONYPI_BATTERY_MASK 0x1000 useinput: if set (which is the default) jogdial events are forwarded to the input subsystem as mouse wheel diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/Documentation/usb/usb-serial.txt linux-2.4.23-pre8/Documentation/usb/usb-serial.txt --- linux-2.4.22/Documentation/usb/usb-serial.txt 2003-06-13 14:51:29.000000000 +0000 +++ linux-2.4.23-pre8/Documentation/usb/usb-serial.txt 2003-10-22 22:47:39.000000000 +0000 @@ -88,6 +88,9 @@ necessary. Some devices need this before they can talk to the USB port properly. + Devices that are not compiled into the kernel can be specified with module + parameters. e.g. modprobe visor vendor=0x54c product=0x66 + There is a webpage and mailing lists for this portion of the driver at: http://usbvisor.sourceforge.net/ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/Documentation/video4linux/bttv/CARDLIST linux-2.4.23-pre8/Documentation/video4linux/bttv/CARDLIST --- linux-2.4.22/Documentation/video4linux/bttv/CARDLIST 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/Documentation/video4linux/bttv/CARDLIST 2003-10-22 22:47:44.000000000 +0000 @@ -7,7 +7,7 @@ card=5 - Diamond DTV2000 card=6 - AVerMedia TVPhone card=7 - MATRIX-Vision MV-Delta - card=8 - Lifeview FlyVideo II (Bt848) LR26 + card=8 - Lifeview FlyVideo II (Bt848) LR26 / MAXI TV Video PCI2 LR26 card=9 - IMS/IXmicro TurboTV card=10 - Hauppauge (bt878) card=11 - MIRO PCTV pro @@ -104,6 +104,11 @@ card=102 - IVC-200 card=103 - Grand X-Guard / Trust 814PCI card=104 - Nebula Electronics DigiTV + card=105 - ProVideo PV143 + card=106 - PHYTEC VD-009-X1 MiniDIN (bt878) + card=107 - PHYTEC VD-009-X1 Combi (bt878) + card=108 - PHYTEC VD-009 MiniDIN (bt878) + card=109 - PHYTEC VD-009 Combi (bt878) tuner.o type=0 - Temic PAL (4002 FH5) @@ -147,3 +152,4 @@ type=38 - Philips PAL/SECAM multi (FM1216ME MK3) type=39 - LG NTSC (newer TAPC series) type=40 - HITACHI V7-J180AT + type=41 - Philips PAL_MK (FI1216 MK) diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/Documentation/video4linux/meye.txt linux-2.4.23-pre8/Documentation/video4linux/meye.txt --- linux-2.4.22/Documentation/video4linux/meye.txt 2003-06-13 14:51:29.000000000 +0000 +++ linux-2.4.23-pre8/Documentation/video4linux/meye.txt 2003-10-22 22:48:01.000000000 +0000 @@ -16,6 +16,23 @@ MJPEG hardware grabbing is supported via a private API (see below). +Hardware supported: +------------------- + +This driver supports the 'second' version of the MotionEye camera :) + +The first version was connected directly on the video bus of the Neomagic +video card and is unsupported. + +The second one, made by Kawasaki Steel is fully supported by this +driver (PCI vendor/device is 0x136b/0xff01) + +The third one, present in recent (more or less last year) Picturebooks +(C1M* models), is not supported. The manufacturer has given the specs +to the developers under a NDA (which allows the develoment of a GPL +driver however), but things are not moving very fast (see +http://r-engine.sourceforge.net/) (PCI vendor/device is 0x10cf/0x2011). + Driver options: --------------- diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/Documentation/wolfson-touchscreen.txt linux-2.4.23-pre8/Documentation/wolfson-touchscreen.txt --- linux-2.4.22/Documentation/wolfson-touchscreen.txt 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/Documentation/wolfson-touchscreen.txt 2003-10-22 22:49:02.000000000 +0000 @@ -0,0 +1,178 @@ + +Wolfson Microelectronics WM9705 and WM9712 Touchscreen Controllers +=================================================================== + +The WM9705 and WM9712 are high performance AC97 audio codecs with built +in touchscreen controllers that are mainly found in portable devices. +i.e. Dell Axim and Toshiba e740. + +This driver uses the AC97 link controller for all communication with the +codec and can be either built into the kernel or built as a module. + +Build Instructions +================== + +The driver will be built into the kernel if "sound card support" = y and +"wolfson AC97 touchscreen support" = y in the kernel sound configuration. + +To build as a module, "wolfson AC97 touchscreen support" = m +in the kernel sound configuration. + + +Driver Features +=============== + + * supports WM9705, WM9712 + * polling mode + * coordinate polling + * adjustable rpu/dpp settings + * adjustable pressure current + * adjustable sample settle delay + * 4 and 5 wire touchscreens (5 wire is WM9712 only) + * pen down detection + * power management + * AUX ADC sampling + + +Driver Usage +============ + +In order to use this driver, a char device called wm97xx with a major +number of 10 and minor number 16 will have to be created under +/dev/touchscreen. + +e.g. +mknod /dev/touchscreen/wm97xx c 10 16 + + +Driver Parameters +================= +The driver can accept several parameters for fine tuning the touchscreen. +However, the syntax is different between module options and passing the +options in the kernel command line. + +e.g. + +rpu=1 (module) +rpu:1 (kernel command line) + + +1. Codec sample mode. (mode) + + The WM9712 can sample touchscreen data in 3 different operating + modes. i.e. polling, coordinate and continous. + + Polling:- The driver polls the codec and issues 3 seperate commands + over the AC97 link to read X,Y and pressure. + + Coordinate: - The driver polls the codec and only issues 1 command over + the AC97 link to read X,Y and pressure. This mode has + strict timing requirements and may drop samples if + interrupted. However, it is less demanding on the AC97 + link. Note: this mode requires a larger delay than polling + mode. + + Continuous:- The codec automatically samples X,Y and pressure and then + sends the data over the AC97 link in slots. This is then + same method used by the codec when recording audio. + + Set mode = 0 for polling, 1 for coordinate and 2 for continuous. + + Default mode = 0 + + + +2. WM9712 Internal pull up for pen detect. (rpu) + + Pull up is in the range 1.02k (least sensitive) to 64k (most sensitive) + i.e. pull up resistance = 64k Ohms / rpu. + + Adjust this value if you are having problems with pen detect not + detecting any down events. + + Set rpu = value + + Default rpu = 1 + + + +3. WM9705 Pen detect comparator threshold. (pdd) + + 0 to Vmid in 15 steps, 0 = use zero power comparator with Vmid threshold + i.e. 1 = Vmid/15 threshold + 15 = Vmid/1 threshold + + Adjust this value if you are having problems with pen detect not + detecting any down events. + + Set pdd = value + + Default pdd = 0 + + + +4. Set current used for pressure measurement. (pil) + + Set pil = 2 to use 400uA + pil = 1 to use 200uA and + pil = 0 to disable pressure measurement. + + This is used to increase the range of values returned by the adc + when measureing touchpanel pressure. + + Default pil = 0 + + + +5. WM9712 Set 5 wire touchscreen mode. (five_wire) + + Set five_wire = 1 to enable 5 wire mode on the WM9712. + + Default five_wire = 0 + + NOTE: Five wire mode does not allow for readback of pressure. + + + +6. ADC sample delay. (delay) + + For accurate touchpanel measurements, some settling time may be + required between the switch matrix applying a voltage across the + touchpanel plate and the ADC sampling the signal. + + This delay can be set by setting delay = n, where n is the array + position of the delay in the array delay_table below. + Long delays > 1ms are supported for completeness, but are not + recommended. + + Default delay = 4 + + wm_delay uS AC97 link frames + ==================================== + 0 21 1 + 1 42 2 + 2 84 4 + 3 167 8 + 4 333 16 + 5 667 32 + 6 1000 48 + 7 1333 64 + 8 2000 96 + 9 2667 128 + 10 3333 160 + 11 4000 192 + 12 4667 224 + 13 5333 256 + 14 6000 288 + 15 0 0 (No delay, switch matrix always on) + + + +Contact +======= + +Further information about the WM9705 and WM9712 can be found on the +Wolfson Website. http://www.wolfsonmicro.com + +Please report bugs to liam.girdwood@wolfsonmicro.com or + linux@wolfsonmicro.com diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/Documentation/x86_64/boot-options.txt linux-2.4.23-pre8/Documentation/x86_64/boot-options.txt --- linux-2.4.22/Documentation/x86_64/boot-options.txt 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/Documentation/x86_64/boot-options.txt 2003-10-22 22:48:59.000000000 +0000 @@ -65,13 +65,14 @@ 0 don't use an NMI watchdog 1 use the IO-APIC timer for the NMI watchdog 2 use the local APIC for the NMI watchdog using a performance counter. Note - This will use one performance counter. + This will use one performance counter and the local APIC's performance + counter vector. Idle loop idle=poll Don't do power saving in the idle loop using HLT, but poll for rescheduling - event. This will make the CPUs eat a lot more power, but may be useful + events. This will make the CPUs burn a lot more power, but may be useful to get slightly better performance in multiprocessor benchmarks. It also makes some profiling using performance counters more accurate. @@ -145,7 +146,7 @@ off don't use the IOMMU leak turn on simple iommu leak tracing (only when CONFIG_IOMMU_LEAK is on) memaper[=order] allocate an own aperture over RAM with size 32MB^order. - noforce don't force IOMMU usage. Should be fastest. - force Force IOMMU and turn on unmap debugging. + noforce don't force IOMMU usage. Default. + force Force IOMMU for all devices. diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/Documentation/zorro.txt linux-2.4.23-pre8/Documentation/zorro.txt --- linux-2.4.22/Documentation/zorro.txt 2000-10-16 19:51:16.000000000 +0000 +++ linux-2.4.23-pre8/Documentation/zorro.txt 2003-10-22 22:49:19.000000000 +0000 @@ -2,7 +2,7 @@ ---------------------------------------- Written by Geert Uytterhoeven -Last revised: February 27, 2000 +Last revised: September 5, 2003 1. Introduction @@ -77,7 +77,7 @@ The treatment of these regions depends on the type of Zorro space: - Zorro II address space is always mapped and does not have to be mapped - explicitly using ioremap(). + explicitly using z_ioremap(). Conversion from bus/physical Zorro II addresses to kernel virtual addresses and vice versa is done using: @@ -85,22 +85,20 @@ virt_addr = ZTWO_VADDR(bus_addr); bus_addr = ZTWO_PADDR(virt_addr); - - Zorro III address space must be mapped explicitly using ioremap() first + - Zorro III address space must be mapped explicitly using z_ioremap() first before it can be accessed: - virt_addr = ioremap(bus_addr, size); + virt_addr = z_ioremap(bus_addr, size); ... - iounmap(virt_addr); + z_iounmap(virt_addr); 5. References ------------- linux/include/linux/zorro.h -linux/include/linux/ioport.h -linux/include/asm-m68k/io.h -linux/include/asm-m68k/amigahw.h -linux/include/asm-ppc/io.h +linux/include/asm-{m68k,ppc}/zorro.h +linux/include/linux/zorro_ids.h linux/drivers/zorro /proc/bus/zorro diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/MAINTAINERS linux-2.4.23-pre8/MAINTAINERS --- linux-2.4.22/MAINTAINERS 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/MAINTAINERS 2003-10-22 22:49:05.000000000 +0000 @@ -202,7 +202,7 @@ ALCATEL SPEEDTOUCH USB DRIVER P: Duncan Sands -M: duncan.sands@wanadoo.fr +M: duncan.sands@free.fr L: linux-usb-users@lists.sourceforge.net L: linux-usb-devel@lists.sourceforge.net W: http://www.linux-usb.org/SpeedTouch/ @@ -266,6 +266,16 @@ L: linux-net@vger.kernel.org S: Maintained +ASUS ACPI EXTRAS DRIVER +P: Karol Kozimor +M: sziwan@users.sourceforge.net +P: Julien Lerouge +M: julien.lerouge@free.fr +L: acpi4asus-user@lists.sourceforge.net +W: http://sourceforge.net/projects/acpi4asus +W: http://julien.lerouge.free.fr +S: Maintained + ATM P: Chas Williams M: chas@cmf.nrl.navy.mil @@ -504,6 +514,14 @@ M: jmorris@intercode.com.au P: David S. Miller M: davem@redhat.com +MARVELL YUKON / SYSKONNECT DRIVER +P: Mirko Lindner +M: mlindner@syskonnect.de +P: Ralph Roesler +M: rroesler@syskonnect.de +W: http://www.syskonnect.com +S: Supported +M: davem@redhat.com W http://samba.org/~jamesm/crypto/ L: linux-kernel@vger.kernel.org S: Maintained @@ -670,7 +688,7 @@ ETHERNET BRIDGE P: Stephen Hemminger M: shemminger@osdl.org -L: bridge@math.leidenuniv.nl +L: bridge@osdl.org W: http://bridge.sourceforge.net/ S: Maintained @@ -944,6 +962,11 @@ L: linux-mips@linux-mips.org S: Maintained +IOC4 IDE DRIVER +P: Jeremy Higdon +M: jeremy@sgi.com +S: Maintained + IP MASQUERADING: P: Juanjo Ciarlante M: jjciarla@raiz.uncu.edu.ar @@ -1745,12 +1768,6 @@ L: linux-video@atrey.karlin.mff.cuni.cz S: Maintained -SYSKONNECT DRIVER -P: Mirko Lindner -M: mlindner@syskonnect.de -W: http://www.syskonnect.com -S: Supported - SYSV FILESYSTEM P: Christoph Hellwig M: hch@infradead.org diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/Makefile linux-2.4.23-pre8/Makefile --- linux-2.4.22/Makefile 2003-08-25 11:44:44.000000000 +0000 +++ linux-2.4.23-pre8/Makefile 2003-10-22 22:47:44.000000000 +0000 @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 4 -SUBLEVEL = 22 -EXTRAVERSION = +SUBLEVEL = 23 +EXTRAVERSION = -pre8 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) @@ -28,7 +28,7 @@ AS = $(CROSS_COMPILE)as LD = $(CROSS_COMPILE)ld CC = $(CROSS_COMPILE)gcc -CPP = $(CC) -E +PP = $(CC) -E AR = $(CROSS_COMPILE)ar NM = $(CROSS_COMPILE)nm STRIP = $(CROSS_COMPILE)strip @@ -181,6 +181,7 @@ DRIVERS-$(CONFIG_HAMRADIO) += drivers/net/hamradio/hamradio.o DRIVERS-$(CONFIG_TC) += drivers/tc/tc.a DRIVERS-$(CONFIG_USB) += drivers/usb/usbdrv.o +DRIVERS-$(CONFIG_USB_GADGET) += drivers/usb/gadget/built-in.o DRIVERS-y +=drivers/media/media.o DRIVERS-$(CONFIG_INPUT) += drivers/input/inputdrv.o DRIVERS-$(CONFIG_HIL) += drivers/hil/hil.o diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/alpha/Makefile linux-2.4.23-pre8/arch/alpha/Makefile --- linux-2.4.22/arch/alpha/Makefile 2002-08-03 00:39:42.000000000 +0000 +++ linux-2.4.23-pre8/arch/alpha/Makefile 2003-10-22 22:49:06.000000000 +0000 @@ -131,3 +131,6 @@ bootpfile: @$(MAKEBOOT) bootpfile + +bootpzfile: + @$(MAKEBOOT) bootpzfile diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/alpha/boot/Makefile linux-2.4.23-pre8/arch/alpha/boot/Makefile --- linux-2.4.22/arch/alpha/boot/Makefile 2001-10-05 01:47:08.000000000 +0000 +++ linux-2.4.23-pre8/arch/alpha/boot/Makefile 2003-10-22 22:47:56.000000000 +0000 @@ -7,6 +7,21 @@ # # Copyright (C) 1994 by Linus Torvalds # +# Creating a compressed kernel image (arch/alpha/boot/vmlinux.gz) +# is done via: +# +# make boot +# +# Creating a BOOTP image (arch/alpha/boot/bootpfile or bootpzfile) +# is done via: +# +# make bootpfile # using an uncompressed kernel +# make bootpzfile # using a compressed kernel +# +# Adding an INITRD image to a BOOTP file (arch/alpha/boot/bootpzfile) +# can be done, e.g, via: +# +# INITRD=`pwd`/initrd.img make bootpzfile LINKFLAGS = -static -T bootloader.lds #-N -relax @@ -17,6 +32,7 @@ OBJECTS = head.o main.o BPOBJECTS = head.o bootp.o +BPZOBJECTS = head.o bootpz.o misc.o TARGETS = vmlinux.gz tools/objstrip # also needed by aboot & milo VMLINUX = $(TOPDIR)/vmlinux OBJSTRIP = tools/objstrip @@ -41,6 +57,12 @@ cat $(INITRD) >> bootpfile endif +bootpzfile: tools/bootpzh vmlinux.nh.gz + cat tools/bootpzh vmlinux.nh.gz > bootpzfile +ifdef INITRD + cat $(INITRD) >> bootpzfile +endif + srmboot: bootdevice bootimage dd if=bootimage of=$(BOOTDEV) bs=512 seek=1 skip=1 tools/mkbb $(BOOTDEV) tools/lxboot @@ -48,16 +70,31 @@ bootdevice: @test "$(BOOTDEV)" != "" || (echo You must specify BOOTDEV ; exit -1) -vmlinux.gz: vmlinux - gzip -fv9 vmlinux +vmlinux.gz: $(TOPDIR)/vmlinux + gzip -fv9c $(TOPDIR)/vmlinux > vmlinux.gz + +vmlinux.nh.gz: vmlinux.nh + gzip -fv9c vmlinux.nh > vmlinux.nh.gz main.o: ksize.h bootp.o: ksize.h +bootpz.o: kzsize.h + ksize.h: vmlinux.nh dummy echo "#define KERNEL_SIZE `ls -l vmlinux.nh | awk '{print $$5}'`" > $@T ifdef INITRD + [ ! \( -f $(INITRD) \) ] || exit 1 + echo "#define INITRD_IMAGE_SIZE `ls -l $(INITRD) | awk '{print $$5}'`" >> $@T +endif + cmp -s $@T $@ || mv -f $@T $@ + rm -f $@T + +kzsize.h: vmlinux.nh.gz dummy + echo "#define KERNEL_SIZE `ls -l vmlinux.nh | awk '{print $$5}'`" > $@T + echo "#define KERNEL_Z_SIZE `ls -l vmlinux.nh.gz | awk '{print $$5}'`" >> $@T +ifdef INITRD [ -f $(INITRD) ] || exit 1 echo "#define INITRD_IMAGE_SIZE `ls -l $(INITRD) | awk '{print $$5}'`" >> $@T endif @@ -67,7 +104,7 @@ vmlinux.nh: $(VMLINUX) $(OBJSTRIP) $(OBJSTRIP) -v $(VMLINUX) vmlinux.nh -vmlinux: $(TOPDIR)/vmlinux +vmlinux: $(VMLINUX) $(STRIP) -o vmlinux $(VMLINUX) tools/lxboot: $(OBJSTRIP) bootloader @@ -79,6 +116,9 @@ tools/bootph: bootpheader $(OBJSTRIP) $(OBJSTRIP) -vb bootpheader tools/bootph +tools/bootpzh: bootpzheader $(OBJSTRIP) + $(OBJSTRIP) -vb bootpzheader tools/bootpzh + $(OBJSTRIP): $(OBJSTRIP).c $(HOSTCC) $(HOSTCFLAGS) -I$(HPATH) $(OBJSTRIP).c -o $(OBJSTRIP) @@ -91,6 +131,11 @@ bootpheader: $(BPOBJECTS) $(LD) $(LINKFLAGS) $(BPOBJECTS) $(LIBS) -o bootpheader +bootpzheader: $(BPZOBJECTS) + $(LD) $(LINKFLAGS) $(BPZOBJECTS) $(LIBS) -o bootpzheader + +misc.o: misc.c $(TOPDIR)/lib/inflate.c + clean: rm -f $(TARGETS) bootloader bootimage bootpfile bootpheader rm -f tools/mkbb tools/bootlx tools/lxboot tools/bootph diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/alpha/boot/bootpz.c linux-2.4.23-pre8/arch/alpha/boot/bootpz.c --- linux-2.4.22/arch/alpha/boot/bootpz.c 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/alpha/boot/bootpz.c 2003-10-22 22:48:39.000000000 +0000 @@ -0,0 +1,447 @@ +/* + * arch/alpha/boot/bootpz.c + * + * Copyright (C) 1997 Jay Estabrook + * + * This file is used for creating a compressed BOOTP file for the + * Linux/AXP kernel + * + * based significantly on the arch/alpha/boot/main.c of Linus Torvalds + * and the decompression code from MILO. + */ +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include "kzsize.h" + +/* FIXME FIXME FIXME */ +#define MALLOC_AREA_SIZE 0x200000 /* 2MB for now */ +/* FIXME FIXME FIXME */ + + +#undef DEBUG_CHECK_RANGE +#define DEBUG_ADDRESSES + +#define DEBUG_SP(x) \ + {register long sp asm("30"); srm_printk("%s (sp=%lx)\n", x, sp);} + +extern unsigned long switch_to_osf_pal(unsigned long nr, + struct pcb_struct * pcb_va, struct pcb_struct * pcb_pa, + unsigned long *vptb); + +extern int decompress_kernel(void* destination, void *source, + size_t ksize, size_t kzsize); + +struct hwrpb_struct *hwrpb = INIT_HWRPB; +static struct pcb_struct pcb_va[1]; + +/* + * Find a physical address of a virtual object.. + * + * This is easy using the virtual page table address. + */ +#define VPTB ((unsigned long *) 0x200000000) + +static inline unsigned long +find_pa(unsigned long address) +{ + unsigned long result; + + result = VPTB[address >> 13]; + result >>= 32; + result <<= 13; + result |= address & 0x1fff; + return result; +} + +int +check_range(unsigned long vstart, unsigned long vend, + unsigned long kstart, unsigned long kend) +{ + unsigned long vaddr, kaddr; + +#ifdef DEBUG_CHECK_RANGE + srm_printk("check_range: V[0x%lx:0x%lx] K[0x%lx:0x%lx]\n", + vstart, vend, kstart, kend); +#endif + /* do some range checking for detecting an overlap... */ + for (vaddr = vstart; vaddr <= vend; vaddr += PAGE_SIZE) + { + kaddr = (find_pa(vaddr) | PAGE_OFFSET); + if (kaddr >= kstart && kaddr <= kend) + { +#ifdef DEBUG_CHECK_RANGE + srm_printk("OVERLAP: vaddr 0x%lx kaddr 0x%lx" + " [0x%lx:0x%lx]\n", + vaddr, kaddr, kstart, kend); +#endif + return 1; + } + } + return 0; +} + +/* + * This function moves into OSF/1 pal-code, and has a temporary + * PCB for that. The kernel proper should replace this PCB with + * the real one as soon as possible. + * + * The page table muckery in here depends on the fact that the boot + * code has the L1 page table identity-map itself in the second PTE + * in the L1 page table. Thus the L1-page is virtually addressable + * itself (through three levels) at virtual address 0x200802000. + */ + +#define L1 ((unsigned long *) 0x200802000) + +void +pal_init(void) +{ + unsigned long i, rev; + struct percpu_struct * percpu; + struct pcb_struct * pcb_pa; + + /* Create the dummy PCB. */ + pcb_va->ksp = 0; + pcb_va->usp = 0; + pcb_va->ptbr = L1[1] >> 32; + pcb_va->asn = 0; + pcb_va->pcc = 0; + pcb_va->unique = 0; + pcb_va->flags = 1; + pcb_va->res1 = 0; + pcb_va->res2 = 0; + pcb_pa = (struct pcb_struct *)find_pa((unsigned long)pcb_va); + + /* + * a0 = 2 (OSF) + * a1 = return address, but we give the asm the vaddr of the PCB + * a2 = physical addr of PCB + * a3 = new virtual page table pointer + * a4 = KSP (but the asm sets it) + */ + srm_printk("Switching to OSF PAL-code... "); + + i = switch_to_osf_pal(2, pcb_va, pcb_pa, VPTB); + if (i) { + srm_printk("failed, code %ld\n", i); + __halt(); + } + + percpu = (struct percpu_struct *) + (INIT_HWRPB->processor_offset + (unsigned long) INIT_HWRPB); + rev = percpu->pal_revision = percpu->palcode_avail[2]; + + srm_printk("OK (rev %lx)\n", rev); + + tbia(); /* do it directly in case we are SMP */ +} + +/* + * Start the kernel. + */ +static inline void +runkernel(void) +{ + __asm__ __volatile__( + "bis %1,%1,$30\n\t" + "bis %0,%0,$27\n\t" + "jmp ($27)" + : /* no outputs: it doesn't even return */ + : "r" (START_ADDR), + "r" (PAGE_SIZE + INIT_STACK)); +} + +/* Must record the SP (it is virtual) on entry, so we can make sure + not to overwrite it during movement or decompression. */ +unsigned long SP_on_entry; + +/* Calculate the kernel image address based on the end of the BOOTP + bootstrapper (ie this program). +*/ +extern char _end; +#define KERNEL_ORIGIN \ + ((((unsigned long)&_end) + 511) & ~511) + +/* Round address to next higher page boundary. */ +#define NEXT_PAGE(a) (((a) | (PAGE_SIZE - 1)) + 1) + +#ifdef INITRD_IMAGE_SIZE +# define REAL_INITRD_SIZE INITRD_IMAGE_SIZE +#else +# define REAL_INITRD_SIZE 0 +#endif + +/* Defines from include/asm-alpha/system.h + + BOOT_ADDR Virtual address at which the consoles loads + the BOOTP image. + + KERNEL_START KSEG address at which the kernel is built to run, + which includes some initial data pages before the + code. + + START_ADDR KSEG address of the entry point of kernel code. + + ZERO_PGE KSEG address of page full of zeroes, but + upon entry to kerne cvan be expected + to hold the parameter list and possible + INTRD information. + + These are used in the local defines below. +*/ + + +/* Virtual addresses for the BOOTP image. Note that this includes the + bootstrapper code as well as the compressed kernel image, and + possibly the INITRD image. + + Oh, and do NOT forget the STACK, which appears to be placed virtually + beyond the end of the loaded image. +*/ +#define V_BOOT_IMAGE_START BOOT_ADDR +#define V_BOOT_IMAGE_END SP_on_entry + +/* Virtual addresses for just the bootstrapper part of the BOOTP image. */ +#define V_BOOTSTRAPPER_START BOOT_ADDR +#define V_BOOTSTRAPPER_END KERNEL_ORIGIN + +/* Virtual addresses for just the data part of the BOOTP + image. This may also include the INITRD image, but always + includes the STACK. +*/ +#define V_DATA_START KERNEL_ORIGIN +#define V_INITRD_START (KERNEL_ORIGIN + KERNEL_Z_SIZE) +#define V_INTRD_END (V_INITRD_START + REAL_INITRD_SIZE) +#define V_DATA_END V_BOOT_IMAGE_END + +/* KSEG addresses for the uncompressed kernel. + + Note that the end address includes workspace for the decompression. + Note also that the DATA_START address is ZERO_PGE, to which we write + just before jumping to the kernel image at START_ADDR. + */ +#define K_KERNEL_DATA_START ZERO_PGE +#define K_KERNEL_IMAGE_START START_ADDR +#define K_KERNEL_IMAGE_END (START_ADDR + KERNEL_SIZE) + +/* Define to where we may have to decompress the kernel image, before + we move it to the final position, in case of overlap. This will be + above the final position of the kernel. + + Regardless of overlap, we move the INITRD image to the end of this + copy area, because there needs to be a buffer area after the kernel + for "bootmem" anyway. +*/ +#define K_COPY_IMAGE_START NEXT_PAGE(K_KERNEL_IMAGE_END) +#define K_INITRD_START NEXT_PAGE(K_COPY_IMAGE_START + KERNEL_SIZE) +#define K_COPY_IMAGE_END \ + (K_INITRD_START + REAL_INITRD_SIZE + MALLOC_AREA_SIZE) +#define K_COPY_IMAGE_SIZE \ + NEXT_PAGE(K_COPY_IMAGE_END - K_COPY_IMAGE_START) + +void +start_kernel(void) +{ + int must_move = 0; + + /* Initialize these for the decompression-in-place situation, + which is the smallest amount of work and most likely to + occur when using the normal START_ADDR of the kernel + (currently set to 16MB, to clear all console code. + */ + unsigned long uncompressed_image_start = K_KERNEL_IMAGE_START; + unsigned long uncompressed_image_end = K_KERNEL_IMAGE_END; + + unsigned long initrd_image_start = K_INITRD_START; + + /* + * Note that this crufty stuff with static and envval + * and envbuf is because: + * + * 1. Frequently, the stack is short, and we don't want to overrun; + * 2. Frequently the stack is where we are going to copy the kernel to; + * 3. A certain SRM console required the GET_ENV output to stack. + * ??? A comment in the aboot sources indicates that the GET_ENV + * destination must be quadword aligned. Might this explain the + * behaviour, rather than requiring output to the stack, which + * seems rather far-fetched. + */ + static long nbytes; + static char envval[256] __attribute__((aligned(8))); + register unsigned long asm_sp asm("30"); + + SP_on_entry = asm_sp; + + srm_printk("Linux/Alpha BOOTPZ Loader for Linux " UTS_RELEASE "\n"); + + /* Validity check the HWRPB. */ + if (INIT_HWRPB->pagesize != 8192) { + srm_printk("Expected 8kB pages, got %ldkB\n", + INIT_HWRPB->pagesize >> 10); + return; + } + if (INIT_HWRPB->vptb != (unsigned long) VPTB) { + srm_printk("Expected vptb at %p, got %p\n", + VPTB, (void *)INIT_HWRPB->vptb); + return; + } + + /* PALcode (re)initialization. */ + pal_init(); + + /* Get the parameter list from the console environment variable. */ + nbytes = callback_getenv(ENV_BOOTED_OSFLAGS, envval, sizeof(envval)); + if (nbytes < 0 || nbytes >= sizeof(envval)) { + nbytes = 0; + } + envval[nbytes] = '\0'; + +#ifdef DEBUG_ADDRESSES + srm_printk("START_ADDR 0x%lx\n", START_ADDR); + srm_printk("KERNEL_ORIGIN 0x%lx\n", KERNEL_ORIGIN); + srm_printk("KERNEL_SIZE 0x%x\n", KERNEL_SIZE); + srm_printk("KERNEL_Z_SIZE 0x%x\n", KERNEL_Z_SIZE); +#endif + + /* Since all the SRM consoles load the BOOTP image at virtual + * 0x20000000, we have to ensure that the physical memory + * pages occupied by that image do NOT overlap the physical + * address range where the kernel wants to be run. This + * causes real problems when attempting to cdecompress the + * former into the latter... :-( + * + * So, we may have to decompress/move the kernel/INITRD image + * virtual-to-physical someplace else first before moving + * kernel /INITRD to their final resting places... ;-} + * + * Sigh... + */ + + /* First, check to see if the range of addresses occupied by + the bootstrapper part of the BOOTP image include any of the + physical pages into which the kernel will be placed for + execution. + + We only need check on the final kernel image range, since we + will put the INITRD someplace that we can be sure is not + in conflict. + */ + if (check_range(V_BOOTSTRAPPER_START, V_BOOTSTRAPPER_END, + K_KERNEL_DATA_START, K_KERNEL_IMAGE_END)) + { + srm_printk("FATAL ERROR: overlap of bootstrapper code\n"); + __halt(); + } + + /* Next, check to see if the range of addresses occupied by + the compressed kernel/INITRD/stack portion of the BOOTP + image include any of the physical pages into which the + decompressed kernel or the INITRD will be placed for + execution. + */ + if (check_range(V_DATA_START, V_DATA_END, + K_KERNEL_IMAGE_START, K_COPY_IMAGE_END)) + { +#ifdef DEBUG_ADDRESSES + srm_printk("OVERLAP: cannot decompress in place\n"); +#endif + uncompressed_image_start = K_COPY_IMAGE_START; + uncompressed_image_end = K_COPY_IMAGE_END; + must_move = 1; + + /* Finally, check to see if the range of addresses + occupied by the compressed kernel/INITRD part of + the BOOTP image include any of the physical pages + into which that part is to be copied for + decompression. + */ + while (check_range(V_DATA_START, V_DATA_END, + uncompressed_image_start, + uncompressed_image_end)) + { +#if 0 + uncompressed_image_start += K_COPY_IMAGE_SIZE; + uncompressed_image_end += K_COPY_IMAGE_SIZE; + initrd_image_start += K_COPY_IMAGE_SIZE; +#else + /* Keep as close as possible to end of BOOTP image. */ + uncompressed_image_start += PAGE_SIZE; + uncompressed_image_end += PAGE_SIZE; + initrd_image_start += PAGE_SIZE; +#endif + } + } + + srm_printk("Starting to load the kernel with args '%s'\n", envval); + +#ifdef DEBUG_ADDRESSES + srm_printk("Decompressing the kernel...\n" + "...from 0x%lx to 0x%lx size 0x%x\n", + V_DATA_START, + uncompressed_image_start, + KERNEL_SIZE); +#endif + decompress_kernel((void *)uncompressed_image_start, + (void *)V_DATA_START, + KERNEL_SIZE, KERNEL_Z_SIZE); + + /* + * Now, move things to their final positions, if/as required. + */ + +#ifdef INITRD_IMAGE_SIZE + + /* First, we always move the INITRD image, if present. */ +#ifdef DEBUG_ADDRESSES + srm_printk("Moving the INITRD image...\n" + " from 0x%lx to 0x%lx size 0x%x\n", + V_INITRD_START, + initrd_image_start, + INITRD_IMAGE_SIZE); +#endif + memcpy((void *)initrd_image_start, + (void *)V_INITRD_START, + INITRD_IMAGE_SIZE); + +#endif /* INITRD_IMAGE_SIZE */ + + /* Next, we may have to move the uncompressed kernel to the + final destination. + */ + if (must_move) { +#ifdef DEBUG_ADDRESSES + srm_printk("Moving the uncompressed kernel...\n" + "...from 0x%lx to 0x%lx size 0x%x\n", + uncompressed_image_start, + K_KERNEL_IMAGE_START, + (unsigned)KERNEL_SIZE); +#endif + memcpy((void *)K_KERNEL_IMAGE_START, + (void *)uncompressed_image_start, + KERNEL_SIZE); + } + + /* Clear the zero page, then move the argument list in. */ + memset((char*)ZERO_PGE, 0, PAGE_SIZE); + strcpy((char*)ZERO_PGE, envval); + +#ifdef INITRD_IMAGE_SIZE + /* Finally, set the INITRD paramenters for the kernel. */ + ((long *)(ZERO_PGE+256))[0] = initrd_image_start; + ((long *)(ZERO_PGE+256))[1] = INITRD_IMAGE_SIZE; + +#endif /* INITRD_IMAGE_SIZE */ + + runkernel(); +} diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/alpha/boot/misc.c linux-2.4.23-pre8/arch/alpha/boot/misc.c --- linux-2.4.22/arch/alpha/boot/misc.c 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/alpha/boot/misc.c 2003-10-22 22:47:59.000000000 +0000 @@ -0,0 +1,207 @@ +/* + * misc.c + * + * This is a collection of several routines from gzip-1.0.3 + * adapted for Linux. + * + * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994 + * + * Modified for ARM Linux by Russell King + * + * Nicolas Pitre 1999/04/14 : + * For this code to run directly from Flash, all constant variables must + * be marked with 'const' and all other variables initialized at run-time + * only. This way all non constant variables will end up in the bss segment, + * which should point to addresses in RAM and cleared to 0 on start. + * This allows for a much quicker boot time. + * + * Modified for Alpha, from the ARM version, by Jay Estabrook 2003. + */ + +#include + +#include + +#define memzero(s,n) memset ((s),0,(n)) +#define puts srm_printk +extern long srm_printk(const char *, ...) + __attribute__ ((format (printf, 1, 2)));; + +/* + * gzip delarations + */ +#define OF(args) args +#define STATIC static + +typedef unsigned char uch; +typedef unsigned short ush; +typedef unsigned long ulg; + +#define WSIZE 0x8000 /* Window size must be at least 32k, */ + /* and a power of two */ + +static uch *inbuf; /* input buffer */ +static uch *window; /* Sliding window buffer */ + +static unsigned insize; /* valid bytes in inbuf */ +static unsigned inptr; /* index of next byte to be processed in inbuf */ +static unsigned outcnt; /* bytes in output buffer */ + +/* gzip flag byte */ +#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */ +#define CONTINUATION 0x02 /* bit 1 set: continuation of multi-part gzip file */ +#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */ +#define ORIG_NAME 0x08 /* bit 3 set: original file name present */ +#define COMMENT 0x10 /* bit 4 set: file comment present */ +#define ENCRYPTED 0x20 /* bit 5 set: file is encrypted */ +#define RESERVED 0xC0 /* bit 6,7: reserved */ + +#define get_byte() (inptr < insize ? inbuf[inptr++] : fill_inbuf()) + +/* Diagnostic functions */ +#ifdef DEBUG +# define Assert(cond,msg) {if(!(cond)) error(msg);} +# define Trace(x) fprintf x +# define Tracev(x) {if (verbose) fprintf x ;} +# define Tracevv(x) {if (verbose>1) fprintf x ;} +# define Tracec(c,x) {if (verbose && (c)) fprintf x ;} +# define Tracecv(c,x) {if (verbose>1 && (c)) fprintf x ;} +#else +# define Assert(cond,msg) +# define Trace(x) +# define Tracev(x) +# define Tracevv(x) +# define Tracec(c,x) +# define Tracecv(c,x) +#endif + +static int fill_inbuf(void); +static void flush_window(void); +static void error(char *m); +static void gzip_mark(void **); +static void gzip_release(void **); + +static char *input_data; +static int input_data_size; + +static uch *output_data; +static ulg output_ptr; +static ulg bytes_out; + +static void *malloc(int size); +static void free(void *where); +static void error(char *m); +static void gzip_mark(void **); +static void gzip_release(void **); + +extern int end; +static ulg free_mem_ptr; +static ulg free_mem_ptr_end; + +#define HEAP_SIZE 0x2000 + +#include "../../../lib/inflate.c" + +static void *malloc(int size) +{ + void *p; + + if (size <0) error("Malloc error\n"); + if (free_mem_ptr <= 0) error("Memory error\n"); + + free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */ + + p = (void *)free_mem_ptr; + free_mem_ptr += size; + + if (free_mem_ptr >= free_mem_ptr_end) + error("Out of memory"); + return p; +} + +static void free(void *where) +{ /* gzip_mark & gzip_release do the free */ +} + +static void gzip_mark(void **ptr) +{ + *ptr = (void *) free_mem_ptr; +} + +static void gzip_release(void **ptr) +{ + free_mem_ptr = (long) *ptr; +} + +/* =========================================================================== + * Fill the input buffer. This is called only when the buffer is empty + * and at least one byte is really needed. + */ +int fill_inbuf(void) +{ + if (insize != 0) + error("ran out of input data\n"); + + inbuf = input_data; + insize = input_data_size; + + inptr = 1; + return inbuf[0]; +} + +/* =========================================================================== + * Write the output window window[0..outcnt-1] and update crc and bytes_out. + * (Used for the decompressed data only.) + */ +void flush_window(void) +{ + ulg c = crc; + unsigned n; + uch *in, *out, ch; + + in = window; + out = &output_data[output_ptr]; + for (n = 0; n < outcnt; n++) { + ch = *out++ = *in++; + c = crc_32_tab[((int)c ^ ch) & 0xff] ^ (c >> 8); + } + crc = c; + bytes_out += (ulg)outcnt; + output_ptr += (ulg)outcnt; + outcnt = 0; +/* puts("."); */ +} + +static void error(char *x) +{ + puts("\n\n"); + puts(x); + puts("\n\n -- System halted"); + + while(1); /* Halt */ +} + +unsigned int +decompress_kernel(void *output_start, + void *input_start, + size_t ksize, + size_t kzsize) +{ + output_data = (uch *)output_start; + input_data = (uch *)input_start; + input_data_size = kzsize; /* use compressed size */ + + /* FIXME FIXME FIXME */ + free_mem_ptr = (ulg)output_start + ksize; + free_mem_ptr_end = (ulg)output_start + ksize + 0x200000; + /* FIXME FIXME FIXME */ + + /* put in temp area to reduce initial footprint */ + window = malloc(WSIZE); + + makecrc(); +/* puts("Uncompressing Linux..."); */ + gunzip(); +/* puts(" done, booting the kernel.\n"); */ + return output_ptr; +} diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/alpha/boot/tools/objstrip.c linux-2.4.23-pre8/arch/alpha/boot/tools/objstrip.c --- linux-2.4.22/arch/alpha/boot/tools/objstrip.c 2001-05-21 20:41:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/alpha/boot/tools/objstrip.c 2003-10-22 22:49:56.000000000 +0000 @@ -27,7 +27,6 @@ #include #include #ifdef __ELF__ -# include # include #endif diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/alpha/config.in linux-2.4.23-pre8/arch/alpha/config.in --- linux-2.4.22/arch/alpha/config.in 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/alpha/config.in 2003-10-22 22:48:12.000000000 +0000 @@ -269,6 +269,7 @@ if [ "$CONFIG_SMP" = "y" ]; then define_bool CONFIG_HAVE_DEC_LOCK y + int 'Maximum number of CPUs (2-32)' CONFIG_NR_CPUS 32 fi if [ "$CONFIG_ALPHA_GENERIC" = "y" -o "$CONFIG_ALPHA_SRM" = "y" ]; then @@ -439,7 +440,16 @@ mainmenu_option next_comment comment 'Kernel hacking' -bool 'Legacy kernel start address' CONFIG_ALPHA_LEGACY_START_ADDRESS +if [ "$CONFIG_ALPHA_TITAN" = "y" -o "$CONFIG_ALPHA_WILDFIRE" = "y" -o \ + "$CONFIG_ALPHA_MARVEL" = "y" ]; then + define_bool CONFIG_ALPHA_LEGACY_START_ADDRESS n +else + if [ "$CONFIG_ALPHA_GENERIC" = "y" ]; then + bool 'Legacy kernel start address' CONFIG_ALPHA_LEGACY_START_ADDRESS + else + define_bool CONFIG_ALPHA_LEGACY_START_ADDRESS y + fi +fi bool 'Kernel debugging' CONFIG_DEBUG_KERNEL if [ "$CONFIG_DEBUG_KERNEL" != "n" ]; then @@ -453,6 +463,8 @@ define_tristate CONFIG_MATHEMU y fi +int 'Kernel messages buffer length shift (0 = default)' CONFIG_LOG_BUF_SHIFT 0 + endmenu source crypto/Config.in diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/alpha/kernel/Makefile linux-2.4.23-pre8/arch/alpha/kernel/Makefile --- linux-2.4.22/arch/alpha/kernel/Makefile 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/alpha/kernel/Makefile 2003-10-22 22:48:39.000000000 +0000 @@ -37,17 +37,21 @@ ifdef CONFIG_ALPHA_GENERIC obj-y += core_apecs.o core_cia.o core_irongate.o core_lca.o core_mcpcia.o \ - core_polaris.o core_t2.o core_tsunami.o core_titan.o \ - core_wildfire.o core_marvel.o \ + core_polaris.o core_t2.o core_tsunami.o \ sys_alcor.o sys_cabriolet.o sys_dp264.o sys_eb64p.o sys_eiger.o \ - sys_jensen.o sys_miata.o sys_mikasa.o sys_nautilus.o sys_titan.o \ + sys_jensen.o sys_miata.o sys_mikasa.o sys_nautilus.o \ sys_noritake.o sys_rawhide.o sys_ruffian.o sys_rx164.o \ sys_sable.o sys_sio.o sys_sx164.o sys_takara.o sys_rx164.o \ - sys_wildfire.o sys_marvel.o \ - err_titan.o err_marvel.o \ irq_pyxis.o srmcons.o gct.o \ es1888.o smc37c669.o smc37c93x.o ns87312.o +ifndef CONFIG_ALPHA_LEGACY_START_ADDRESS +obj-y += core_titan.o core_wildfire.o core_marvel.o \ + sys_titan.o sys_wildfire.o sys_marvel.o \ + err_titan.o err_marvel.o + +endif + else # Misc support diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/alpha/kernel/irq.c linux-2.4.23-pre8/arch/alpha/kernel/irq.c --- linux-2.4.22/arch/alpha/kernel/irq.c 2003-06-13 14:51:29.000000000 +0000 +++ linux-2.4.23-pre8/arch/alpha/kernel/irq.c 2003-10-22 22:49:16.000000000 +0000 @@ -214,7 +214,7 @@ if (!shared) { desc->depth = 0; - desc->status &= ~IRQ_DISABLED; + desc->status &= ~(IRQ_DISABLED | IRQ_INPROGRESS); desc->handler->startup(irq); } spin_unlock_irqrestore(&desc->lock,flags); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/alpha/kernel/setup.c linux-2.4.23-pre8/arch/alpha/kernel/setup.c --- linux-2.4.22/arch/alpha/kernel/setup.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/alpha/kernel/setup.c 2003-10-22 22:47:56.000000000 +0000 @@ -583,6 +583,35 @@ var_name, alpha_mv.vector_name, (alpha_using_srm ? "SRM" : "MILO")); + printk("Major Options: " +#ifdef CONFIG_SMP + "SMP " +#endif +#ifdef CONFIG_ALPHA_EV56 + "EV56 " +#endif +#ifdef CONFIG_ALPHA_EV67 + "EV67 " +#endif +#ifdef CONFIG_ALPHA_LEGACY_START_ADDRESS + "LEGACY_START " +#endif + +#ifdef CONFIG_DISCONTIGMEM + "DISCONTIGMEM " +#ifdef CONFIG_NUMA + "NUMA " +#endif +#endif + +#ifdef CONFIG_DEBUG_SPINLOCK + "DEBUG_SPINLOCK " +#endif +#ifdef CONFIG_MAGIC_SYSRQ + "MAGIC_SYSRQ " +#endif + "\n"); + printk("Command line: %s\n", command_line); /* diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/alpha/kernel/sys_nautilus.c linux-2.4.23-pre8/arch/alpha/kernel/sys_nautilus.c --- linux-2.4.22/arch/alpha/kernel/sys_nautilus.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/alpha/kernel/sys_nautilus.c 2003-10-22 22:48:31.000000000 +0000 @@ -226,11 +226,13 @@ if (request_resource(&iomem_resource, bus->resource[1]) < 0) printk(KERN_ERR "Failed to request MEM on hose 0\n"); - if (pci_mem < memtop && pci_mem > alpha_mv.min_mem_address) { + if (pci_mem < memtop) + memtop = pci_mem; + if (memtop > alpha_mv.min_mem_address) { free_reserved_mem(__va(alpha_mv.min_mem_address), - __va(pci_mem)); + __va(memtop)); printk("nautilus_init_pci: %ldk freed\n", - (pci_mem - alpha_mv.min_mem_address) >> 10); + (memtop - alpha_mv.min_mem_address) >> 10); } if ((IRONGATE0->dev_vendor >> 16) > 0x7006) /* Albacore? */ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/alpha/mm/init.c linux-2.4.23-pre8/arch/alpha/mm/init.c --- linux-2.4.22/arch/alpha/mm/init.c 2003-06-13 14:51:29.000000000 +0000 +++ linux-2.4.23-pre8/arch/alpha/mm/init.c 2003-10-22 22:48:29.000000000 +0000 @@ -234,7 +234,8 @@ /* Allocate one PGD and one PMD. In the case of SRM, we'll need these to actually remap the console. There is an assumption here that only one of each is needed, and this allows for 8MB. - Currently (late 1999), big consoles are still under 4MB. + On systems with larger consoles, additional pages will be + allocated as needed during the mapping process. In the case of not SRM, but not CONFIG_ALPHA_LARGE_VMALLOC, we need to allocate the PGD we use for vmalloc before we start @@ -261,6 +262,15 @@ unsigned long paddr = crb->map[i].pa; crb->map[i].va = vaddr; for (j = 0; j < crb->map[i].count; ++j) { + /* Newer console's (especially on larger + systems) may require more pages of + PTEs. Grab additional pages as needed. */ + if (pmd != pmd_offset(pgd, vaddr)) { + memset(kernel_end, 0, PAGE_SIZE); + pmd = pmd_offset(pgd, vaddr); + pmd_set(pmd, (pte_t *)kernel_end); + kernel_end += PAGE_SIZE; + } set_pte(pte_offset(pmd, vaddr), mk_pte_phys(paddr, PAGE_KERNEL)); paddr += PAGE_SIZE; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/arm/config.in linux-2.4.23-pre8/arch/arm/config.in --- linux-2.4.22/arch/arm/config.in 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/arm/config.in 2003-10-22 22:47:59.000000000 +0000 @@ -730,6 +730,9 @@ dep_bool ' Kernel low-level debugging functions' CONFIG_DEBUG_LL $CONFIG_DEBUG_KERNEL dep_bool ' Kernel low-level debugging messages via footbridge serial port' CONFIG_DEBUG_DC21285_PORT $CONFIG_DEBUG_LL $CONFIG_FOOTBRIDGE dep_bool ' Kernel low-level debugging messages via UART2' CONFIG_DEBUG_CLPS711X_UART2 $CONFIG_DEBUG_LL $CONFIG_ARCH_CLPS711X + +int 'Kernel messages buffer length shift (0 = default)' CONFIG_LOG_BUF_SHIFT 0 + endmenu source crypto/Config.in diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/arm/mm/mm-armo.c linux-2.4.23-pre8/arch/arm/mm/mm-armo.c --- linux-2.4.22/arch/arm/mm/mm-armo.c 2001-04-12 19:20:31.000000000 +0000 +++ linux-2.4.23-pre8/arch/arm/mm/mm-armo.c 2003-10-22 22:48:39.000000000 +0000 @@ -104,6 +104,7 @@ no_pte: spin_unlock(&mm->page_table_lock); pmd_free(new_pmd); + check_pgt_cache(); free_pgd_slow(new_pgd); return NULL; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/arm/mm/mm-armv.c linux-2.4.23-pre8/arch/arm/mm/mm-armv.c --- linux-2.4.22/arch/arm/mm/mm-armv.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/arm/mm/mm-armv.c 2003-10-22 22:49:08.000000000 +0000 @@ -123,6 +123,7 @@ no_pte: spin_unlock(&mm->page_table_lock); pmd_free(new_pmd); + check_pgt_cache(); free_pages((unsigned long)new_pgd, 2); return NULL; @@ -157,6 +158,7 @@ pmd_clear(pmd); pte_free(pte); pmd_free(pmd); + check_pgt_cache(); free: free_pages((unsigned long) pgd, 2); } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/cris/config.in linux-2.4.23-pre8/arch/cris/config.in --- linux-2.4.22/arch/cris/config.in 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/cris/config.in 2003-10-22 22:49:01.000000000 +0000 @@ -272,6 +272,8 @@ int ' Profile shift count' CONFIG_PROFILE_SHIFT 2 fi +int 'Kernel messages buffer length shift (0 = default)' CONFIG_LOG_BUF_SHIFT 0 + source crypto/Config.in source lib/Config.in endmenu diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/i386/boot/setup.S linux-2.4.23-pre8/arch/i386/boot/setup.S --- linux-2.4.22/arch/i386/boot/setup.S 2002-08-03 00:39:42.000000000 +0000 +++ linux-2.4.23-pre8/arch/i386/boot/setup.S 2003-10-22 22:47:30.000000000 +0000 @@ -45,6 +45,10 @@ * New A20 code ported from SYSLINUX by H. Peter Anvin. AMD Elan bugfixes * by Robert Schwebel, December 2001 * + * BIOS Enhanced Disk Drive support + * by Matt Domsch October 2002 + * conformant to T13 Committee www.t13.org + * projects 1572D, 1484D, 1386D, 1226DT */ #include @@ -53,6 +57,7 @@ #include #include #include +#include #include /* Signature words to ensure LILO loaded us right */ @@ -543,6 +548,70 @@ done_apm_bios: #endif +#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE) +# Do the BIOS Enhanced Disk Drive calls +# This consists of two calls: +# int 13h ah=41h "Check Extensions Present" +# int 13h ah=48h "Get Device Parameters" +# +# A buffer of size EDDMAXNR*(EDDEXTSIZE+EDDPARMSIZE) is reserved for our use +# in the empty_zero_page at EDDBUF. The first four bytes of which are +# used to store the device number, interface support map and version +# results from fn41. The following 74 bytes are used to store +# the results from fn48. Starting from device 80h, fn41, then fn48 +# are called and their results stored in EDDBUF+n*(EDDEXTSIZE+EDDPARMIZE). +# Then the pointer is incremented to store the data for the next call. +# This repeats until either a device doesn't exist, or until EDDMAXNR +# devices have been stored. +# The one tricky part is that ds:si always points four bytes into +# the structure, and the fn41 results are stored at offsets +# from there. This removes the need to increment the pointer for +# every store, and leaves it ready for the fn48 call. +# A second one-byte buffer, EDDNR, in the empty_zero_page stores +# the number of BIOS devices which exist, up to EDDMAXNR. +# In setup.c, copy_edd() stores both empty_zero_page buffers away +# for later use, as they would get overwritten otherwise. +# This code is sensitive to the size of the structs in edd.h +edd_start: + # %ds points to the bootsector + # result buffer for fn48 + movw $EDDBUF+EDDEXTSIZE, %si # in ds:si, fn41 results + # kept just before that + movb $0, (EDDNR) # zero value at EDDNR + movb $0x80, %dl # BIOS device 0x80 + +edd_check_ext: + movb $CHECKEXTENSIONSPRESENT, %ah # Function 41 + movw $EDDMAGIC1, %bx # magic + int $0x13 # make the call + jc edd_done # no more BIOS devices + + cmpw $EDDMAGIC2, %bx # is magic right? + jne edd_next # nope, next... + + movb %dl, %ds:-4(%si) # store device number + movb %ah, %ds:-3(%si) # store version + movw %cx, %ds:-2(%si) # store extensions + incb (EDDNR) # note that we stored something + +edd_get_device_params: + movw $EDDPARMSIZE, %ds:(%si) # put size + movb $GETDEVICEPARAMETERS, %ah # Function 48 + int $0x13 # make the call + # Don't check for fail return + # it doesn't matter. + movw %si, %ax # increment si + addw $EDDPARMSIZE+EDDEXTSIZE, %ax + movw %ax, %si + +edd_next: + incb %dl # increment to next device + cmpb $EDDMAXNR, (EDDNR) # Out of space? + jb edd_check_ext # keep looping + +edd_done: +#endif + # Now we want to move to protected mode ... cmpw $0, %cs:realmode_swtch jz rmodeswtch_normal diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/i386/config.in linux-2.4.23-pre8/arch/i386/config.in --- linux-2.4.22/arch/i386/config.in 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/i386/config.in 2003-10-22 22:48:24.000000000 +0000 @@ -201,6 +201,10 @@ tristate '/dev/cpu/*/msr - Model-specific register support' CONFIG_X86_MSR tristate '/dev/cpu/*/cpuid - CPU information support' CONFIG_X86_CPUID +if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then + tristate 'BIOS Enhanced Disk Drive calls determine boot disk (EXPERIMENTAL)' CONFIG_EDD +fi + choice 'High Memory Support' \ "off CONFIG_NOHIGHMEM \ 4GB CONFIG_HIGHMEM4G \ @@ -231,6 +235,7 @@ define_bool CONFIG_X86_IO_APIC y fi else + int 'Maximum number of CPUs (2-32)' CONFIG_NR_CPUS 32 bool 'Multi-node NUMA system support' CONFIG_X86_NUMA if [ "$CONFIG_X86_NUMA" = "y" ]; then #Platform Choices @@ -476,6 +481,8 @@ bool ' Compile the kernel with frame pointers' CONFIG_FRAME_POINTER fi +int 'Kernel messages buffer length shift (0 = default)' CONFIG_LOG_BUF_SHIFT 0 + endmenu source crypto/Config.in diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/i386/defconfig linux-2.4.23-pre8/arch/i386/defconfig --- linux-2.4.22/arch/i386/defconfig 2002-11-28 23:53:09.000000000 +0000 +++ linux-2.4.23-pre8/arch/i386/defconfig 2003-10-22 22:47:46.000000000 +0000 @@ -56,6 +56,7 @@ # CONFIG_MICROCODE is not set # CONFIG_X86_MSR is not set # CONFIG_X86_CPUID is not set +# CONFIG_EDD is not set CONFIG_NOHIGHMEM=y # CONFIG_HIGHMEM4G is not set # CONFIG_HIGHMEM64G is not set @@ -64,6 +65,7 @@ CONFIG_SMP=y # CONFIG_MULTIQUAD is not set CONFIG_HAVE_DEC_LOCK=y +CONFIG_NR_CPUS=32 # # General setup diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/i386/kernel/Makefile linux-2.4.23-pre8/arch/i386/kernel/Makefile --- linux-2.4.22/arch/i386/kernel/Makefile 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/i386/kernel/Makefile 2003-10-22 22:47:56.000000000 +0000 @@ -38,10 +38,10 @@ obj-$(CONFIG_APM) += apm.o obj-$(CONFIG_ACPI_BOOT) += acpi.o obj-$(CONFIG_ACPI_SLEEP) += acpi_wakeup.o -obj-$(CONFIG_ACPI_HT_ONLY) += acpitable.o obj-$(CONFIG_SMP) += smp.o smpboot.o trampoline.o obj-$(CONFIG_X86_LOCAL_APIC) += mpparse.o apic.o nmi.o obj-$(CONFIG_X86_IO_APIC) += io_apic.o obj-$(CONFIG_X86_VISWS_APIC) += visws_apic.o +obj-$(CONFIG_EDD) += edd.o include $(TOPDIR)/Rules.make diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/i386/kernel/acpi.c linux-2.4.23-pre8/arch/i386/kernel/acpi.c --- linux-2.4.22/arch/i386/kernel/acpi.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/i386/kernel/acpi.c 2003-10-22 22:49:19.000000000 +0000 @@ -355,7 +355,6 @@ result = acpi_table_parse(ACPI_APIC, acpi_parse_madt); if (!result) { - printk(KERN_WARNING PREFIX "MADT not present\n"); return 0; } else if (result < 0) { @@ -471,6 +470,34 @@ #endif /*CONFIG_ACPI_BOOT*/ +#ifdef CONFIG_ACPI_BUS +/* + * Set specified PIC IRQ to level triggered mode. + * + * Port 0x4d0-4d1 are ECLR1 and ECLR2, the Edge/Level Control Registers + * for the 8259 PIC. bit[n] = 1 means irq[n] is Level, otherwise Edge. + * ECLR1 is IRQ's 0-7 (IRQ 0, 1, 2 must be 0) + * ECLR2 is IRQ's 8-15 (IRQ 8, 13 must be 0) + * + * As the BIOS should have done this for us, + * print a warning if the IRQ wasn't already set to level. + */ + +void acpi_pic_set_level_irq(unsigned int irq) +{ + unsigned char mask = 1 << (irq & 7); + unsigned int port = 0x4d0 + (irq >> 3); + unsigned char val = inb(port); + + if (!(val & mask)) { + printk(KERN_WARNING PREFIX "IRQ %d was Edge Triggered, " + "setting to Level Triggerd\n", irq); + outb(val | mask, port); + } +} +#endif /* CONFIG_ACPI_BUS */ + + /* -------------------------------------------------------------------------- Low-Level Sleep Support diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/i386/kernel/acpitable.c linux-2.4.23-pre8/arch/i386/kernel/acpitable.c --- linux-2.4.22/arch/i386/kernel/acpitable.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/i386/kernel/acpitable.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,553 +0,0 @@ -/* - * acpitable.c - IA32-specific ACPI boot-time initialization (Revision: 1) - * - * Copyright (C) 1999 Andrew Henroid - * Copyright (C) 2001 Richard Schaal - * Copyright (C) 2001 Paul Diefenbaugh - * Copyright (C) 2001 Jun Nakajima - * Copyright (C) 2001 Arjan van de Ven - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * $Id: acpitable.c,v 1.7 2001/11/04 12:21:18 fenrus Exp $ - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "acpitable.h" - -static acpi_table_handler acpi_boot_ops[ACPI_TABLE_COUNT]; - -int acpi_lapic; - -static unsigned char __init -acpi_checksum(void *buffer, int length) -{ - int i; - unsigned char *bytebuffer; - unsigned char sum = 0; - - if (!buffer || length <= 0) - return 0; - - bytebuffer = (unsigned char *) buffer; - - for (i = 0; i < length; i++) - sum += *(bytebuffer++); - - return sum; -} - -static void __init -acpi_print_table_header(acpi_table_header * header) -{ - if (!header) - return; - - printk(KERN_INFO "ACPI table found: %.4s v%d [%.6s %.8s %d.%d]\n", - header->signature, header->revision, header->oem_id, - header->oem_table_id, header->oem_revision >> 16, - header->oem_revision & 0xffff); - - return; -} - -/******************************************************************************* - * - * FUNCTION: acpi_tb_scan_memory_for_rsdp - * - * PARAMETERS: address - Starting pointer for search - * length - Maximum length to search - * - * RETURN: Pointer to the RSDP if found and valid, otherwise NULL. - * - * DESCRIPTION: Search a block of memory for the RSDP signature - * - ******************************************************************************/ - -static void *__init -acpi_tb_scan_memory_for_rsdp(void *address, int length) -{ - int offset; - - if (length <= 0) - return NULL; - - /* Search from given start addr for the requested length */ - - offset = 0; - - while (offset < length) { - /* The signature must match and the checksum must be correct */ - if (strncmp(address, RSDP_SIG, sizeof(RSDP_SIG) - 1) == 0 && - acpi_checksum(address, RSDP_CHECKSUM_LENGTH) == 0) { - /* If so, we have found the RSDP */ - printk(KERN_INFO "ACPI: RSDP located at physical address %p\n", - address); - return address; - } - offset += RSDP_SCAN_STEP; - address += RSDP_SCAN_STEP; - } - - /* Searched entire block, no RSDP was found */ - dprintk(KERN_INFO "ACPI: Searched entire block 0x%x:0x%x, no RSDP was found.\n", - (int)address, (int)address + length); - return NULL; -} - -/******************************************************************************* - * - * FUNCTION: acpi_find_root_pointer - * - * PARAMETERS: none - * - * RETURN: physical address of the RSDP - * - * DESCRIPTION: Search lower 1_mbyte of memory for the root system descriptor - * pointer structure. If it is found, set *RSDP to point to it. - * - * NOTE: The RSDP must be either in the first 1_k of the Extended - * BIOS Data Area or between E0000 and FFFFF (ACPI 1.0 section - * 5.2.2; assertion #421). - * - ******************************************************************************/ - -static struct acpi_table_rsdp * __init -acpi_find_root_pointer(void) -{ - struct acpi_table_rsdp * rsdp; - - /* - * Physical address is given - */ - /* - * Region 1) Search EBDA (low memory) paragraphs - */ - rsdp = acpi_tb_scan_memory_for_rsdp(__va(LO_RSDP_WINDOW_BASE), - LO_RSDP_WINDOW_SIZE); - - if (rsdp) - return rsdp; - - /* - * Region 2) Search upper memory: 16-byte boundaries in E0000h-F0000h - */ - rsdp = acpi_tb_scan_memory_for_rsdp(__va(HI_RSDP_WINDOW_BASE), - HI_RSDP_WINDOW_SIZE); - - - - if (rsdp) - return rsdp; - - printk(KERN_ERR "ACPI: System description tables not found\n"); - return NULL; -} - - -/* - * Temporarily use the virtual area starting from FIX_IO_APIC_BASE_END, - * to map the target physical address. The problem is that set_fixmap() - * provides a single page, and it is possible that the page is not - * sufficient. - * By using this area, we can map up to MAX_IO_APICS pages temporarily, - * i.e. until the next __va_range() call. - * - * Important Safety Note: The fixed I/O APIC page numbers are *subtracted* - * from the fixed base. That's why we start at FIX_IO_APIC_BASE_END and - * count idx down while incrementing the phys address. - */ -static __init char * -__va_range(unsigned long phys, unsigned long size) -{ - unsigned long base, offset, mapped_size; - int idx; - - offset = phys & (PAGE_SIZE - 1); - mapped_size = PAGE_SIZE - offset; - set_fixmap(FIX_IO_APIC_BASE_END, phys); - base = fix_to_virt(FIX_IO_APIC_BASE_END); - dprintk("__va_range(0x%lx, 0x%lx): idx=%d mapped at %lx\n", phys, size, - FIX_IO_APIC_BASE_END, base); - - /* - * Most cases can be covered by the below. - */ - idx = FIX_IO_APIC_BASE_END; - while (mapped_size < size) { - if (--idx < FIX_IO_APIC_BASE_0) - return 0; /* cannot handle this */ - phys += PAGE_SIZE; - set_fixmap(idx, phys); - mapped_size += PAGE_SIZE; - } - - return ((unsigned char *) base + offset); -} - -static int __init acpi_tables_init(void) -{ - int result = -ENODEV; - acpi_table_header *header = NULL; - struct acpi_table_rsdp *rsdp = NULL; - struct acpi_table_rsdt *rsdt = NULL; - struct acpi_table_rsdt saved_rsdt; - int tables = 0; - int type = 0; - int i = 0; - - - rsdp = (struct acpi_table_rsdp *) acpi_find_root_pointer(); - - if (!rsdp) - return -ENODEV; - - printk(KERN_INFO "%.8s v%d [%.6s]\n", rsdp->signature, rsdp->revision, - rsdp->oem_id); - - if (strncmp(rsdp->signature, RSDP_SIG,strlen(RSDP_SIG))) { - printk(KERN_WARNING "RSDP table signature incorrect\n"); - return -EINVAL; - } - - rsdt = (struct acpi_table_rsdt *) - __va_range(rsdp->rsdt_address, sizeof(struct acpi_table_rsdt)); - - if (!rsdt) { - printk(KERN_WARNING "ACPI: Invalid root system description tables (RSDT)\n"); - return -ENODEV; - } - - header = & rsdt->header; - acpi_print_table_header(header); - - if (strncmp(header->signature, RSDT_SIG, strlen(RSDT_SIG))) { - printk(KERN_WARNING "ACPI: RSDT signature incorrect\n"); - return -ENODEV; - } - - /* - * The number of tables is computed by taking the - * size of all entries (header size minus total - * size of RSDT) divided by the size of each entry - * (4-byte table pointers). - */ - tables = (header->length - sizeof(acpi_table_header)) / 4; - - memcpy(&saved_rsdt, rsdt, sizeof(saved_rsdt)); - - if (saved_rsdt.header.length > sizeof(saved_rsdt)) { - printk(KERN_WARNING "ACPI: Too big length in RSDT: %d\n", saved_rsdt.header.length); - return -ENODEV; - } - - for (i = 0; i < tables; i++) { - /* Map in header, then map in full table length. */ - header = (acpi_table_header *) - __va_range(saved_rsdt.entry[i], - sizeof(acpi_table_header)); - if (!header) - break; - header = (acpi_table_header *) - __va_range(saved_rsdt.entry[i], header->length); - if (!header) - break; - - acpi_print_table_header(header); - - if (acpi_checksum(header,header->length)) { - printk(KERN_WARNING "ACPI %s has invalid checksum\n", - acpi_table_signatures[i]); - continue; - } - - for (type = 0; type < ACPI_TABLE_COUNT; type++) - if (!strncmp((char *) &header->signature, - acpi_table_signatures[type],strlen(acpi_table_signatures[type]))) - break; - - if (type >= ACPI_TABLE_COUNT) { - printk(KERN_WARNING "ACPI: Unsupported table %.4s\n", - header->signature); - continue; - } - - - if (!acpi_boot_ops[type]) - continue; - - result = acpi_boot_ops[type] (header, - (unsigned long) saved_rsdt. - entry[i]); - } - - return result; -} - -static int total_cpus __initdata = 0; -int have_acpi_tables; - -extern void __init MP_processor_info(struct mpc_config_processor *); - -static void __init -acpi_parse_lapic(struct acpi_table_lapic *local_apic) -{ - struct mpc_config_processor proc_entry; - int ix = 0; - - if (!local_apic) - return; - - printk(KERN_INFO "LAPIC (acpi_id[0x%04x] id[0x%x] enabled[%d])\n", - local_apic->acpi_id, local_apic->id, local_apic->flags.enabled); - - printk(KERN_INFO "CPU %d (0x%02x00)", total_cpus, local_apic->id); - - if (local_apic->flags.enabled) { - printk(" enabled\n"); - ix = local_apic->id; - if (ix >= MAX_APICS) { - printk(KERN_WARNING - "Processor #%d INVALID - (Max ID: %d).\n", ix, - MAX_APICS); - return; - } - /* - * Fill in the info we want to save. Not concerned about - * the processor ID. Processor features aren't present in - * the table. - */ - proc_entry.mpc_type = MP_PROCESSOR; - proc_entry.mpc_apicid = local_apic->id; - proc_entry.mpc_cpuflag = CPU_ENABLED; - if (proc_entry.mpc_apicid == boot_cpu_physical_apicid) { - printk(" (BSP)"); - proc_entry.mpc_cpuflag |= CPU_BOOTPROCESSOR; - } - proc_entry.mpc_cpufeature = - (boot_cpu_data.x86 << 8) | - (boot_cpu_data.x86_model << 4) | - boot_cpu_data.x86_mask; - proc_entry.mpc_featureflag = boot_cpu_data.x86_capability[0]; - proc_entry.mpc_reserved[0] = 0; - proc_entry.mpc_reserved[1] = 0; - proc_entry.mpc_apicver = 0x10; /* integrated APIC */ - MP_processor_info(&proc_entry); - } else { - printk(" disabled\n"); - } - - total_cpus++; - return; -} - -static void __init -acpi_parse_ioapic(struct acpi_table_ioapic *ioapic) -{ - - if (!ioapic) - return; - - printk(KERN_INFO - "IOAPIC (id[0x%x] address[0x%x] global_irq_base[0x%x])\n", - ioapic->id, ioapic->address, ioapic->global_irq_base); - - if (nr_ioapics >= MAX_IO_APICS) { - printk(KERN_WARNING - "Max # of I/O APICs (%d) exceeded (found %d).\n", - MAX_IO_APICS, nr_ioapics); -/* panic("Recompile kernel with bigger MAX_IO_APICS!\n"); */ - } -} - - -/* Interrupt source overrides inform the machine about exceptions - to the normal "PIC" mode interrupt routing */ - -static void __init -acpi_parse_int_src_ovr(struct acpi_table_int_src_ovr *intsrc) -{ - if (!intsrc) - return; - - printk(KERN_INFO - "INT_SRC_OVR (bus[%d] irq[0x%x] global_irq[0x%x] polarity[0x%x] trigger[0x%x])\n", - intsrc->bus, intsrc->bus_irq, intsrc->global_irq, - intsrc->flags.polarity, intsrc->flags.trigger); -} - -/* - * At this point, we look at the interrupt assignment entries in the MPS - * table. - */ - -static void __init acpi_parse_nmi_src(struct acpi_table_nmi_src *nmisrc) -{ - if (!nmisrc) - return; - - printk(KERN_INFO - "NMI_SRC (polarity[0x%x] trigger[0x%x] global_irq[0x%x])\n", - nmisrc->flags.polarity, nmisrc->flags.trigger, - nmisrc->global_irq); - -} -static void __init -acpi_parse_lapic_nmi(struct acpi_table_lapic_nmi *localnmi) -{ - if (!localnmi) - return; - - printk(KERN_INFO - "LAPIC_NMI (acpi_id[0x%04x] polarity[0x%x] trigger[0x%x] lint[0x%x])\n", - localnmi->acpi_id, localnmi->flags.polarity, - localnmi->flags.trigger, localnmi->lint); -} -static void __init -acpi_parse_lapic_addr_ovr(struct acpi_table_lapic_addr_ovr *lapic_addr_ovr) -{ - if (!lapic_addr_ovr) - return; - - printk(KERN_INFO "LAPIC_ADDR_OVR (address[0x%lx])\n", - (unsigned long) lapic_addr_ovr->address); - -} - -static void __init -acpi_parse_plat_int_src(struct acpi_table_plat_int_src *plintsrc) -{ - if (!plintsrc) - return; - - printk(KERN_INFO - "PLAT_INT_SRC (polarity[0x%x] trigger[0x%x] type[0x%x] id[0x%04x] eid[0x%x] iosapic_vector[0x%x] global_irq[0x%x]\n", - plintsrc->flags.polarity, plintsrc->flags.trigger, - plintsrc->type, plintsrc->id, plintsrc->eid, - plintsrc->iosapic_vector, plintsrc->global_irq); -} -static int __init -acpi_parse_madt(acpi_table_header * header, unsigned long phys) -{ - - struct acpi_table_madt *madt; - acpi_madt_entry_header *entry_header; - int table_size; - - madt = (struct acpi_table_madt *) __va_range(phys, header->length); - - if (!madt) - return -EINVAL; - - table_size = (int) (header->length - sizeof(*madt)); - entry_header = - (acpi_madt_entry_header *) ((void *) madt + sizeof(*madt)); - - while (entry_header && (table_size > 0)) { - switch (entry_header->type) { - case ACPI_MADT_LAPIC: - acpi_parse_lapic((struct acpi_table_lapic *) - entry_header); - break; - case ACPI_MADT_IOAPIC: - acpi_parse_ioapic((struct acpi_table_ioapic *) - entry_header); - break; - case ACPI_MADT_INT_SRC_OVR: - acpi_parse_int_src_ovr((struct acpi_table_int_src_ovr *) - entry_header); - break; - case ACPI_MADT_NMI_SRC: - acpi_parse_nmi_src((struct acpi_table_nmi_src *) - entry_header); - break; - case ACPI_MADT_LAPIC_NMI: - acpi_parse_lapic_nmi((struct acpi_table_lapic_nmi *) - entry_header); - break; - case ACPI_MADT_LAPIC_ADDR_OVR: - acpi_parse_lapic_addr_ovr((struct - acpi_table_lapic_addr_ovr *) - entry_header); - break; - case ACPI_MADT_PLAT_INT_SRC: - acpi_parse_plat_int_src((struct acpi_table_plat_int_src - *) entry_header); - break; - default: - printk(KERN_WARNING - "Unsupported MADT entry type 0x%x\n", - entry_header->type); - break; - } - table_size -= entry_header->length; - entry_header = - (acpi_madt_entry_header *) ((void *) entry_header + - entry_header->length); - } - - if (!total_cpus) { - printk("ACPI: No Processors found in the APCI table.\n"); - return -EINVAL; - } - - printk(KERN_INFO "%d CPUs total\n", total_cpus); - - if (madt->lapic_address) - mp_lapic_addr = madt->lapic_address; - else - mp_lapic_addr = APIC_DEFAULT_PHYS_BASE; - - printk(KERN_INFO "Local APIC address %x\n", madt->lapic_address); - - return 0; -} - - -/* - * Configure the processor info using MADT in the ACPI tables. If we fail to - * configure that, then we use the MPS tables. - */ -void __init -acpi_boot_init(void) -{ - - memset(&acpi_boot_ops, 0, sizeof(acpi_boot_ops)); - acpi_boot_ops[ACPI_APIC] = acpi_parse_madt; - - /* - * Only do this when requested, either because of CPU/Bios type or from the command line - */ - - if (!acpi_tables_init()) - acpi_lapic = 1; -} - diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/i386/kernel/acpitable.h linux-2.4.23-pre8/arch/i386/kernel/acpitable.h --- linux-2.4.22/arch/i386/kernel/acpitable.h 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/i386/kernel/acpitable.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,262 +0,0 @@ -/* - * acpitable.c - IA32-specific ACPI boot-time initialization (Revision: 1) - * - * Copyright (C) 1999 Andrew Henroid - * Copyright (C) 2001 Richard Schaal - * Copyright (C) 2001 Paul Diefenbaugh - * Copyright (C) 2001 Jun Nakajima - * Copyright (C) 2001 Arjan van de Ven - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - * - * $Id: acpitable.h,v 1.3 2001/11/03 22:41:34 fenrus Exp $ - */ - -/* - * The following codes are cut&pasted from drivers/acpi. Part of the code - * there can be not updated or delivered yet. - * To avoid conflicts when CONFIG_ACPI is defined, the following codes are - * modified so that they are self-contained in this file. - * -- jun - */ - -#ifndef _HEADER_ACPITABLE_H_ -#define _HEADER_ACPITABLE_H_ - -//#define dprintk(s, args...) printk(s, ## args) -#define dprintk(s, args...) - -typedef unsigned int ACPI_TBLPTR; - -typedef struct { /* ACPI common table header */ - char signature[4]; /* identifies type of table */ - u32 length; /* length of table, - in bytes, * including header */ - u8 revision; /* specification minor version # */ - u8 checksum; /* to make sum of entire table == 0 */ - char oem_id[6]; /* OEM identification */ - char oem_table_id[8]; /* OEM table identification */ - u32 oem_revision; /* OEM revision number */ - char asl_compiler_id[4]; /* ASL compiler vendor ID */ - u32 asl_compiler_revision; /* ASL compiler revision number */ -} acpi_table_header __attribute__ ((packed));; - -enum { - ACPI_APIC = 0, - ACPI_BOOT, - ACPI_DBGP, - ACPI_DSDT, - ACPI_ECDT, - ACPI_ETDT, - ACPI_FACP, - ACPI_FACS, - ACPI_OEMX, - ACPI_PSDT, - ACPI_SBST, - ACPI_SLIT, - ACPI_SPCR, - ACPI_SRAT, - ACPI_SSDT, - ACPI_SPMI, - ACPI_XSDT, - ACPI_TABLE_COUNT -}; - -static char *acpi_table_signatures[ACPI_TABLE_COUNT] = { - "APIC", - "BOOT", - "DBGP", - "DSDT", - "ECDT", - "ETDT", - "FACP", - "FACS", - "OEM", - "PSDT", - "SBST", - "SLIT", - "SPCR", - "SRAT", - "SSDT", - "SPMI", - "XSDT" -}; - -struct acpi_table_madt { - acpi_table_header header; - u32 lapic_address; - struct { - u32 pcat_compat:1; - u32 reserved:31; - } flags __attribute__ ((packed)); -} __attribute__ ((packed));; - -enum { - ACPI_MADT_LAPIC = 0, - ACPI_MADT_IOAPIC, - ACPI_MADT_INT_SRC_OVR, - ACPI_MADT_NMI_SRC, - ACPI_MADT_LAPIC_NMI, - ACPI_MADT_LAPIC_ADDR_OVR, - ACPI_MADT_IOSAPIC, - ACPI_MADT_LSAPIC, - ACPI_MADT_PLAT_INT_SRC, - ACPI_MADT_ENTRY_COUNT -}; - -#define RSDP_SIG "RSD PTR " -#define RSDT_SIG "RSDT" - -#define ACPI_DEBUG_PRINT(pl) - -#define ACPI_MEMORY_MODE 0x01 -#define ACPI_LOGICAL_ADDRESSING 0x00 -#define ACPI_PHYSICAL_ADDRESSING 0x01 - -#define LO_RSDP_WINDOW_BASE 0 /* Physical Address */ -#define HI_RSDP_WINDOW_BASE 0xE0000 /* Physical Address */ -#define LO_RSDP_WINDOW_SIZE 0x400 -#define HI_RSDP_WINDOW_SIZE 0x20000 -#define RSDP_SCAN_STEP 16 -#define RSDP_CHECKSUM_LENGTH 20 - -typedef int (*acpi_table_handler) (acpi_table_header * header, unsigned long); - -struct acpi_table_rsdp { - char signature[8]; - u8 checksum; - char oem_id[6]; - u8 revision; - u32 rsdt_address; -} __attribute__ ((packed)); - -struct acpi_table_rsdt { - acpi_table_header header; - u32 entry[ACPI_TABLE_COUNT]; -} __attribute__ ((packed)); - -typedef struct { - u8 type; - u8 length; -} acpi_madt_entry_header __attribute__ ((packed)); - -typedef struct { - u16 polarity:2; - u16 trigger:2; - u16 reserved:12; -} acpi_madt_int_flags __attribute__ ((packed)); - -struct acpi_table_lapic { - acpi_madt_entry_header header; - u8 acpi_id; - u8 id; - struct { - u32 enabled:1; - u32 reserved:31; - } flags __attribute__ ((packed)); -} __attribute__ ((packed)); - -struct acpi_table_ioapic { - acpi_madt_entry_header header; - u8 id; - u8 reserved; - u32 address; - u32 global_irq_base; -} __attribute__ ((packed)); - -struct acpi_table_int_src_ovr { - acpi_madt_entry_header header; - u8 bus; - u8 bus_irq; - u32 global_irq; - acpi_madt_int_flags flags; -} __attribute__ ((packed)); - -struct acpi_table_nmi_src { - acpi_madt_entry_header header; - acpi_madt_int_flags flags; - u32 global_irq; -} __attribute__ ((packed)); - -struct acpi_table_lapic_nmi { - acpi_madt_entry_header header; - u8 acpi_id; - acpi_madt_int_flags flags; - u8 lint; -} __attribute__ ((packed)); - -struct acpi_table_lapic_addr_ovr { - acpi_madt_entry_header header; - u8 reserved[2]; - u64 address; -} __attribute__ ((packed)); - -struct acpi_table_iosapic { - acpi_madt_entry_header header; - u8 id; - u8 reserved; - u32 global_irq_base; - u64 address; -} __attribute__ ((packed)); - -struct acpi_table_lsapic { - acpi_madt_entry_header header; - u8 acpi_id; - u8 id; - u8 eid; - u8 reserved[3]; - struct { - u32 enabled:1; - u32 reserved:31; - } flags; -} __attribute__ ((packed)); - -struct acpi_table_plat_int_src { - acpi_madt_entry_header header; - acpi_madt_int_flags flags; - u8 type; - u8 id; - u8 eid; - u8 iosapic_vector; - u32 global_irq; - u32 reserved; -} __attribute__ ((packed)); - -/* - * ACPI Table Descriptor. One per ACPI table - */ -typedef struct acpi_table_desc { - struct acpi_table_desc *prev; - struct acpi_table_desc *next; - struct acpi_table_desc *installed_desc; - acpi_table_header *pointer; - void *base_pointer; - u8 *aml_pointer; - u64 physical_address; - u32 aml_length; - u32 length; - u32 count; - u16 table_id; - u8 type; - u8 allocation; - u8 loaded_into_namespace; - -} acpi_table_desc __attribute__ ((packed));; - -#endif diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/i386/kernel/apic.c linux-2.4.23-pre8/arch/i386/kernel/apic.c --- linux-2.4.22/arch/i386/kernel/apic.c 2003-06-13 14:51:29.000000000 +0000 +++ linux-2.4.23-pre8/arch/i386/kernel/apic.c 2003-10-22 22:49:54.000000000 +0000 @@ -38,6 +38,8 @@ int prof_old_multiplier[NR_CPUS] = { 1, }; int prof_counter[NR_CPUS] = { 1, }; +static int enabled_via_apicbase; + int get_maxlvt(void) { unsigned int v, ver, maxlvt; @@ -142,6 +144,13 @@ value = apic_read(APIC_SPIV); value &= ~APIC_SPIV_APIC_ENABLED; apic_write_around(APIC_SPIV, value); + + if (enabled_via_apicbase) { + unsigned int l, h; + rdmsr(MSR_IA32_APICBASE, l, h); + l &= ~MSR_IA32_APICBASE_ENABLE; + wrmsr(MSR_IA32_APICBASE, l, h); + } } /* @@ -464,7 +473,6 @@ static void apic_pm_suspend(void *data) { - unsigned int l, h; unsigned long flags; if (apic_pm_state.perfctr_pmdev) @@ -484,9 +492,6 @@ __save_flags(flags); __cli(); disable_local_APIC(); - rdmsr(MSR_IA32_APICBASE, l, h); - l &= ~MSR_IA32_APICBASE_ENABLE; - wrmsr(MSR_IA32_APICBASE, l, h); __restore_flags(flags); } @@ -497,10 +502,18 @@ __save_flags(flags); __cli(); + + /* + * Make sure the APICBASE points to the right address + * + * FIXME! This will be wrong if we ever support suspend on + * SMP! We'll need to do this as part of the CPU restore! + */ rdmsr(MSR_IA32_APICBASE, l, h); l &= ~MSR_IA32_APICBASE_BASE; - l |= MSR_IA32_APICBASE_ENABLE | APIC_DEFAULT_PHYS_BASE; + l |= MSR_IA32_APICBASE_ENABLE | mp_lapic_addr; wrmsr(MSR_IA32_APICBASE, l, h); + apic_write(APIC_LVTERR, ERROR_APIC_VECTOR | APIC_LVT_MASKED); apic_write(APIC_ID, apic_pm_state.apic_id); apic_write(APIC_DFR, apic_pm_state.apic_dfr); @@ -593,7 +606,26 @@ * Detect and enable local APICs on non-SMP boards. * Original code written by Keir Fraser. */ -int dont_enable_local_apic __initdata = 0; + +/* + * Knob to control our willingness to enable the local APIC. + */ +int enable_local_apic __initdata = 0; /* -1=force-disable, +1=force-enable */ + +static int __init lapic_disable(char *str) +{ + enable_local_apic = -1; + clear_bit(X86_FEATURE_APIC, boot_cpu_data.x86_capability); + return 0; +} +__setup("nolapic", lapic_disable); + +static int __init lapic_enable(char *str) +{ + enable_local_apic = 1; + return 0; +} +__setup("lapic", lapic_enable); static int __init detect_init_APIC (void) { @@ -601,7 +633,7 @@ extern void get_cpu_vendor(struct cpuinfo_x86*); /* Disabled by DMI scan or kernel option? */ - if (dont_enable_local_apic) + if (enable_local_apic < 0) return -1; /* Workaround for us being called before identify_cpu(). */ @@ -616,7 +648,7 @@ goto no_apic; case X86_VENDOR_INTEL: if (boot_cpu_data.x86 == 6 || - (boot_cpu_data.x86 == 15 && cpu_has_apic) || + (boot_cpu_data.x86 == 15 && (cpu_has_apic || enable_local_apic > 0)) || (boot_cpu_data.x86 == 5 && cpu_has_apic)) break; goto no_apic; @@ -636,6 +668,7 @@ l &= ~MSR_IA32_APICBASE_BASE; l |= MSR_IA32_APICBASE_ENABLE | APIC_DEFAULT_PHYS_BASE; wrmsr(MSR_IA32_APICBASE, l, h); + enabled_via_apicbase = 1; } } /* @@ -649,6 +682,12 @@ } set_bit(X86_FEATURE_APIC, &boot_cpu_data.x86_capability); mp_lapic_addr = APIC_DEFAULT_PHYS_BASE; + + /* The BIOS may have set up the APIC at some other address */ + rdmsr(MSR_IA32_APICBASE, l, h); + if (l & MSR_IA32_APICBASE_ENABLE) + mp_lapic_addr = l & MSR_IA32_APICBASE_BASE; + if (nmi_watchdog != NMI_NONE) nmi_watchdog = NMI_LOCAL_APIC; @@ -928,14 +967,8 @@ static unsigned int calibration_result; -int dont_use_local_apic_timer __initdata = 0; - void __init setup_APIC_clocks (void) { - /* Disabled by DMI scan or kernel option? */ - if (dont_use_local_apic_timer) - return; - printk("Using local APIC timer interrupts.\n"); using_apic_timer = 1; @@ -1152,6 +1185,9 @@ */ int __init APIC_init_uniprocessor (void) { + if (enable_local_apic < 0) + clear_bit(X86_FEATURE_APIC, boot_cpu_data.x86_capability); + if (!smp_found_config && !cpu_has_apic) return -1; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/i386/kernel/dmi_scan.c linux-2.4.23-pre8/arch/i386/kernel/dmi_scan.c --- linux-2.4.22/arch/i386/kernel/dmi_scan.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/i386/kernel/dmi_scan.c 2003-10-22 22:48:31.000000000 +0000 @@ -335,9 +335,9 @@ static int __init local_apic_kills_bios(struct dmi_blacklist *d) { #ifdef CONFIG_X86_LOCAL_APIC - extern int dont_enable_local_apic; - if (!dont_enable_local_apic) { - dont_enable_local_apic = 1; + extern int enable_local_apic; + if (enable_local_apic == 0) { + enable_local_apic = -1; printk(KERN_WARNING "%s with broken BIOS detected. " "Refusing to enable the local APIC.\n", d->ident); @@ -347,43 +347,6 @@ } /* - * The Microstar 6163-2 (a.k.a Pro) mainboard will hang shortly after - * resumes, and also at what appears to be asynchronous APM events, - * if the local APIC is enabled. - */ -static int __init apm_kills_local_apic(struct dmi_blacklist *d) -{ -#ifdef CONFIG_X86_LOCAL_APIC - extern int dont_enable_local_apic; - if (apm_info.bios.version && !dont_enable_local_apic) { - dont_enable_local_apic = 1; - printk(KERN_WARNING "%s with broken BIOS detected. " - "Refusing to enable the local APIC.\n", - d->ident); - } -#endif - return 0; -} - -/* - * The Intel AL440LX mainboard will hang randomly if the local APIC - * timer is running and the APM BIOS hasn't been disabled. - */ -static int __init apm_kills_local_apic_timer(struct dmi_blacklist *d) -{ -#ifdef CONFIG_X86_LOCAL_APIC - extern int dont_use_local_apic_timer; - if (apm_info.bios.version && !dont_use_local_apic_timer) { - dont_use_local_apic_timer = 1; - printk(KERN_WARNING "%s with broken BIOS detected. " - "The local APIC timer will not be used.\n", - d->ident); - } -#endif - return 0; -} - -/* * Check for clue free BIOS implementations who use * the following QA technique * @@ -437,37 +400,6 @@ } /* - * The Intel 440GX hall of shame. - * - * On many (all we have checked) of these boxes the $PIRQ table is wrong. - * The MP1.4 table is right however and so SMP kernels tend to work. - */ - -#ifdef CONFIG_PCI -extern int broken_440gx_bios; -extern unsigned int pci_probe; -#endif -static __init int broken_pirq(struct dmi_blacklist *d) -{ - printk(KERN_INFO " *** Possibly defective BIOS detected (irqtable)\n"); - printk(KERN_INFO " *** Many BIOSes matching this signature have incorrect IRQ routing tables.\n"); - printk(KERN_INFO " *** If you see IRQ problems, in paticular SCSI resets and hangs at boot\n"); - printk(KERN_INFO " *** contact your hardware vendor and ask about updates.\n"); - printk(KERN_INFO " *** Building an SMP kernel may evade the bug some of the time.\n"); -#ifdef CONFIG_X86_IO_APIC - { - extern int skip_ioapic_setup; - skip_ioapic_setup = 0; - } -#endif -#ifdef CONFIG_PCI - broken_440gx_bios = 1; - pci_probe |= PCI_BIOS_IRQ_SCAN; -#endif - return 0; -} - -/* * ASUS K7V-RM has broken ACPI table defining sleep modes */ @@ -549,7 +481,7 @@ #ifdef CONFIG_ACPI_BOOT -extern int acpi_disabled, use_acpi_pci, acpi_force, acpi_ht; +extern int acpi_disabled, acpi_force, acpi_ht; static __init __attribute__((unused)) int acpi_disable(struct dmi_blacklist *d) { @@ -579,14 +511,18 @@ } return 0; } +#endif /* CONFIG_ACPI_BOOT */ +#ifdef CONFIG_ACPI_PCI static __init int disable_acpi_pci(struct dmi_blacklist *d) { - printk(KERN_NOTICE "%s detected: force use of pci=noacpi\n", d->ident); - use_acpi_pci = 0; + extern __init void pci_disable_acpi(void) ; + + printk(KERN_NOTICE "%s detected: force use of pci=noacpi\n", d->ident); + pci_disable_acpi(); return 0; } -#endif +#endif /* CONFIG_ACPI_PCI */ /* * Process the DMI blacklists @@ -861,87 +797,17 @@ NO_MATCH, NO_MATCH } }, - { apm_kills_local_apic, "Microstar 6163", { - MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"), - MATCH(DMI_BOARD_NAME, "MS-6163"), - NO_MATCH, NO_MATCH } }, - - { apm_kills_local_apic_timer, "Intel AL440LX", { - MATCH(DMI_BOARD_VENDOR, "Intel Corporation"), - MATCH(DMI_BOARD_NAME, "AL440LX"), - NO_MATCH, NO_MATCH } }, - - /* Problem Intel 440GX bioses */ - - { broken_pirq, "SABR1 Bios", { /* Bad $PIR */ - MATCH(DMI_BIOS_VENDOR, "Intel Corporation"), - MATCH(DMI_BIOS_VERSION,"SABR1"), - NO_MATCH, NO_MATCH - } }, - { broken_pirq, "l44GX Bios", { /* Bad $PIR */ - MATCH(DMI_BIOS_VENDOR, "Intel Corporation"), - MATCH(DMI_BIOS_VERSION,"L440GX0.86B.0066.P07"), - NO_MATCH, NO_MATCH - } }, - { broken_pirq, "IBM xseries 370", { /* Bad $PIR */ - MATCH(DMI_BIOS_VENDOR, "IBM"), - MATCH(DMI_BIOS_VERSION,"MMKT33AUS"), - NO_MATCH, NO_MATCH - } }, - { broken_pirq, "l44GX Bios", { /* Bad $PIR */ - MATCH(DMI_BIOS_VENDOR, "Intel Corporation"), - MATCH(DMI_BIOS_VERSION,"L440GX0.86B.0094.P10"), - NO_MATCH, NO_MATCH - } }, - { broken_pirq, "l44GX Bios", { /* Bad $PIR */ - MATCH(DMI_BIOS_VENDOR, "Intel Corporation"), - MATCH(DMI_BIOS_VERSION,"L440GX0.86B.0115.P12"), - NO_MATCH, NO_MATCH - } }, - { broken_pirq, "l44GX Bios", { /* Bad $PIR */ - MATCH(DMI_BIOS_VENDOR, "Intel Corporation"), - MATCH(DMI_BIOS_VERSION,"L440GX0.86B.0120.P12"), - NO_MATCH, NO_MATCH - } }, - { broken_pirq, "l44GX Bios", { /* Bad $PIR */ - MATCH(DMI_BIOS_VENDOR, "Intel Corporation"), - MATCH(DMI_BIOS_VERSION,"L440GX0.86B.0125.P13"), - NO_MATCH, NO_MATCH - } }, - { broken_pirq, "l44GX Bios", { /* Bad $PIR */ - MATCH(DMI_BIOS_VENDOR, "Intel Corporation"), - MATCH(DMI_BIOS_VERSION,"C440GX0.86B"), - NO_MATCH, NO_MATCH - } }, - { broken_pirq, "l44GX Bios", { /* Bad $PIR */ - MATCH(DMI_BIOS_VENDOR, "Intel Corporation"), - MATCH(DMI_BIOS_VERSION,"L440GX0.86B.0133.P14"), - NO_MATCH, NO_MATCH - } }, - { broken_pirq, "l44GX Bios", { /* Bad $PIR */ - MATCH(DMI_BIOS_VENDOR, "Intel Corporation"), - MATCH(DMI_BIOS_VERSION,"L440GX0"), - NO_MATCH, NO_MATCH - } }, - - /* Intel in disgiuse - In this case they can't hide and they don't run - too well either... */ - { broken_pirq, "Dell PowerEdge 8450", { /* Bad $PIR */ - MATCH(DMI_PRODUCT_NAME, "Dell PowerEdge 8450"), + { init_ints_after_s1, "Toshiba Satellite 4030cdt", { /* Reinitialization of 8259 is needed after S1 resume */ + MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"), NO_MATCH, NO_MATCH, NO_MATCH } }, - + { broken_acpi_Sx, "ASUS K7V-RM", { /* Bad ACPI Sx table */ MATCH(DMI_BIOS_VERSION,"ASUS K7V-RM ACPI BIOS Revision 1003A"), MATCH(DMI_BOARD_NAME, ""), NO_MATCH, NO_MATCH } }, - { init_ints_after_s1, "Toshiba Satellite 4030cdt", { /* Reinitialization of 8259 is needed after S1 resume */ - MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"), - NO_MATCH, NO_MATCH, NO_MATCH - } }, - { print_if_true, KERN_WARNING "IBM T23 - BIOS 1.03b+ and controller firmware 1.02+ may be needed for Linux APM.", { MATCH(DMI_SYS_VENDOR, "IBM"), MATCH(DMI_BIOS_VERSION, "1AET38WW (1.01b)"), @@ -1033,11 +899,6 @@ MATCH(DMI_BOARD_NAME, "CUR-DLS"), NO_MATCH, NO_MATCH }}, - { force_acpi_ht, "ASUS A7V", { - MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC"), - MATCH(DMI_BOARD_NAME, ""), - MATCH(DMI_BIOS_VERSION, "ASUS A7V ACPI BIOS Revision 1011"), NO_MATCH }}, - { force_acpi_ht, "ABIT i440BX-W83977", { MATCH(DMI_BOARD_VENDOR, "ABIT "), MATCH(DMI_BOARD_NAME, "i440BX-W83977 (BP6)"), @@ -1063,6 +924,8 @@ MATCH(DMI_PRODUCT_NAME, "eserver xSeries 440"), NO_MATCH, NO_MATCH }}, +#endif /* CONFIG_ACPI_BOOT */ +#ifdef CONFIG_ACPI_PCI /* * Boxes that need ACPI PCI IRQ routing disabled */ @@ -1070,8 +933,10 @@ { disable_acpi_pci, "ASUS A7V", { MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC"), MATCH(DMI_BOARD_NAME, ""), - MATCH(DMI_BIOS_VERSION, "ASUS A7V ACPI BIOS Revision 1007"), NO_MATCH }}, -#endif // CONFIG_ACPI_BOOT + /* newer BIOS, Revision 1011, does work */ + MATCH(DMI_BIOS_VERSION, "ASUS A7V ACPI BIOS Revision 1007"), + NO_MATCH }}, +#endif /* CONFIG_ACPI_PCI */ { NULL, } }; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/i386/kernel/edd.c linux-2.4.23-pre8/arch/i386/kernel/edd.c --- linux-2.4.22/arch/i386/kernel/edd.c 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/i386/kernel/edd.c 2003-10-22 22:47:59.000000000 +0000 @@ -0,0 +1,672 @@ +/* + * linux/arch/i386/kernel/edd.c + * Copyright (C) 2002 Dell Computer Corporation + * by Matt Domsch + * + * BIOS Enhanced Disk Drive Services (EDD) + * conformant to T13 Committee www.t13.org + * projects 1572D, 1484D, 1386D, 1226DT + * + * This code takes information provided by BIOS EDD calls + * fn41 - Check Extensions Present and + * fn48 - Get Device Parametes with EDD extensions + * made in setup.S, copied to safe structures in setup.c, + * and presents it in /proc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License v2.0 as published by + * the Free Software Foundation + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +/* + * TODO: + * - move edd.[ch] to better locations if/when one is decided + * - keep current with 2.5 EDD code changes + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +MODULE_AUTHOR("Matt Domsch "); +MODULE_DESCRIPTION("proc interface to BIOS EDD information"); +MODULE_LICENSE("GPL"); + +#define EDD_VERSION "0.09 2003-Jan-21" +#define EDD_DEVICE_NAME_SIZE 16 +#define REPORT_URL "http://domsch.com/linux/edd30/results.html" + +#define left (count - (p - page) - 1) + +static struct proc_dir_entry *bios_dir; + +struct attr_entry { + struct proc_dir_entry *entry; + struct list_head node; +}; + +struct edd_device { + char name[EDD_DEVICE_NAME_SIZE]; + struct edd_info *info; + struct proc_dir_entry *dir; + struct list_head attr_list; +}; + +static struct edd_device *edd_devices[EDDMAXNR]; + +struct edd_attribute { + char *name; + int (*show)(char *page, char **start, off_t off, + int count, int *eof, void *data); + int (*test) (struct edd_device * edev); +}; + +#define EDD_DEVICE_ATTR(_name,_show,_test) \ +struct edd_attribute edd_attr_##_name = { \ + .name = __stringify(_name), \ + .show = _show, \ + .test = _test, \ +}; + +static inline struct edd_info * +edd_dev_get_info(struct edd_device *edev) +{ + return edev->info; +} + +static inline void +edd_dev_set_info(struct edd_device *edev, struct edd_info *info) +{ + edev->info = info; +} + +static int +proc_calc_metrics(char *page, char **start, off_t off, + int count, int *eof, int len) +{ + if (len <= off+count) *eof = 1; + *start = page + off; + len -= off; + if (len>count) len = count; + if (len<0) len = 0; + return len; +} + +static int +edd_dump_raw_data(char *b, int count, void *data, int length) +{ + char *orig_b = b; + char hexbuf[80], ascbuf[20], *h, *a, c; + unsigned char *p = data; + unsigned long column = 0; + int length_printed = 0, d; + const char maxcolumn = 16; + while (length_printed < length && count > 0) { + h = hexbuf; + a = ascbuf; + for (column = 0; + column < maxcolumn && length_printed < length; column++) { + h += sprintf(h, "%02x ", (unsigned char) *p); + if (!isprint(*p)) + c = '.'; + else + c = *p; + a += sprintf(a, "%c", c); + p++; + length_printed++; + } + /* pad out the line */ + for (; column < maxcolumn; column++) { + h += sprintf(h, " "); + a += sprintf(a, " "); + } + d = snprintf(b, count, "%s\t%s\n", hexbuf, ascbuf); + b += d; + count -= d; + } + return (b - orig_b); +} + +static int +edd_show_host_bus(char *page, char **start, off_t off, int count, int *eof, void *data) +{ + struct edd_info *info = data; + char *p = page; + int i; + + if (!info || !page || off) { + return proc_calc_metrics(page, start, off, count, eof, 0); + } + + for (i = 0; i < 4; i++) { + if (isprint(info->params.host_bus_type[i])) { + p += snprintf(p, left, "%c", info->params.host_bus_type[i]); + } else { + p += snprintf(p, left, " "); + } + } + + if (!strncmp(info->params.host_bus_type, "ISA", 3)) { + p += snprintf(p, left, "\tbase_address: %x\n", + info->params.interface_path.isa.base_address); + } else if (!strncmp(info->params.host_bus_type, "PCIX", 4) || + !strncmp(info->params.host_bus_type, "PCI", 3)) { + p += snprintf(p, left, + "\t%02x:%02x.%d channel: %u\n", + info->params.interface_path.pci.bus, + info->params.interface_path.pci.slot, + info->params.interface_path.pci.function, + info->params.interface_path.pci.channel); + } else if (!strncmp(info->params.host_bus_type, "IBND", 4) || + !strncmp(info->params.host_bus_type, "XPRS", 4) || + !strncmp(info->params.host_bus_type, "HTPT", 4)) { + p += snprintf(p, left, + "\tTBD: %llx\n", + info->params.interface_path.ibnd.reserved); + + } else { + p += snprintf(p, left, "\tunknown: %llx\n", + info->params.interface_path.unknown.reserved); + } + return proc_calc_metrics(page, start, off, count, eof, (p - page)); +} + +static int +edd_show_interface(char *page, char **start, off_t off, int count, int *eof, void *data) +{ + struct edd_info *info = data; + char *p = page; + int i; + + if (!info || !page || off) { + return proc_calc_metrics(page, start, off, count, eof, 0); + } + + for (i = 0; i < 8; i++) { + if (isprint(info->params.interface_type[i])) { + p += snprintf(p, left, "%c", info->params.interface_type[i]); + } else { + p += snprintf(p, left, " "); + } + } + if (!strncmp(info->params.interface_type, "ATAPI", 5)) { + p += snprintf(p, left, "\tdevice: %u lun: %u\n", + info->params.device_path.atapi.device, + info->params.device_path.atapi.lun); + } else if (!strncmp(info->params.interface_type, "ATA", 3)) { + p += snprintf(p, left, "\tdevice: %u\n", + info->params.device_path.ata.device); + } else if (!strncmp(info->params.interface_type, "SCSI", 4)) { + p += snprintf(p, left, "\tid: %u lun: %llu\n", + info->params.device_path.scsi.id, + info->params.device_path.scsi.lun); + } else if (!strncmp(info->params.interface_type, "USB", 3)) { + p += snprintf(p, left, "\tserial_number: %llx\n", + info->params.device_path.usb.serial_number); + } else if (!strncmp(info->params.interface_type, "1394", 4)) { + p += snprintf(p, left, "\teui: %llx\n", + info->params.device_path.i1394.eui); + } else if (!strncmp(info->params.interface_type, "FIBRE", 5)) { + p += snprintf(p, left, "\twwid: %llx lun: %llx\n", + info->params.device_path.fibre.wwid, + info->params.device_path.fibre.lun); + } else if (!strncmp(info->params.interface_type, "I2O", 3)) { + p += snprintf(p, left, "\tidentity_tag: %llx\n", + info->params.device_path.i2o.identity_tag); + } else if (!strncmp(info->params.interface_type, "RAID", 4)) { + p += snprintf(p, left, "\tidentity_tag: %x\n", + info->params.device_path.raid.array_number); + } else if (!strncmp(info->params.interface_type, "SATA", 4)) { + p += snprintf(p, left, "\tdevice: %u\n", + info->params.device_path.sata.device); + } else { + p += snprintf(p, left, "\tunknown: %llx %llx\n", + info->params.device_path.unknown.reserved1, + info->params.device_path.unknown.reserved2); + } + + return proc_calc_metrics(page, start, off, count, eof, (p - page)); +} + +/** + * edd_show_raw_data() - unparses EDD information, returned to user-space + * + * Returns: number of bytes written, or 0 on failure + */ +static int +edd_show_raw_data(char *page, char **start, off_t off, int count, int *eof, void *data) +{ + struct edd_info *info = data; + char *p = page; + int i, warn_padding = 0, nonzero_path = 0, + len = sizeof (*info) - 4; + uint8_t checksum = 0, c = 0; + if (!info || !page || off) { + return proc_calc_metrics(page, start, off, count, eof, 0); + } + + if (!(info->params.key == 0xBEDD || info->params.key == 0xDDBE)) + len = info->params.length; + + p += snprintf(p, left, "int13 fn48 returned data:\n\n"); + p += edd_dump_raw_data(p, left, ((char *) info) + 4, len); + + /* Spec violation. Adaptec AIC7899 returns 0xDDBE + here, when it should be 0xBEDD. + */ + p += snprintf(p, left, "\n"); + if (info->params.key == 0xDDBE) { + p += snprintf(p, left, + "Warning: Spec violation. Key should be 0xBEDD, is 0xDDBE\n"); + } + + if (!(info->params.key == 0xBEDD || info->params.key == 0xDDBE)) { + goto out; + } + + for (i = 30; i <= 73; i++) { + c = *(((uint8_t *) info) + i + 4); + if (c) + nonzero_path++; + checksum += c; + } + + if (checksum) { + p += snprintf(p, left, + "Warning: Spec violation. Device Path checksum invalid.\n"); + } + + if (!nonzero_path) { + p += snprintf(p, left, "Error: Spec violation. Empty device path.\n"); + goto out; + } + + for (i = 0; i < 4; i++) { + if (!isprint(info->params.host_bus_type[i])) { + warn_padding++; + } + } + for (i = 0; i < 8; i++) { + if (!isprint(info->params.interface_type[i])) { + warn_padding++; + } + } + + if (warn_padding) { + p += snprintf(p, left, + "Warning: Spec violation. Padding should be 0x20.\n"); + } + +out: + p += snprintf(p, left, "\nPlease check %s\n", REPORT_URL); + p += snprintf(p, left, "to see if this device has been reported. If not,\n"); + p += snprintf(p, left, "please send the information requested there.\n"); + + return proc_calc_metrics(page, start, off, count, eof, (p - page)); +} + +static int +edd_show_version(char *page, char **start, off_t off, int count, int *eof, void *data) +{ + struct edd_info *info = data; + char *p = page; + if (!info || !page || off) { + return proc_calc_metrics(page, start, off, count, eof, 0); + } + + p += snprintf(p, left, "0x%02x\n", info->version); + return proc_calc_metrics(page, start, off, count, eof, (p - page)); +} + +static int +edd_show_extensions(char *page, char **start, off_t off, int count, int *eof, void *data) +{ + struct edd_info *info = data; + char *p = page; + if (!info || !page || off) { + return proc_calc_metrics(page, start, off, count, eof, 0); + } + + if (info->interface_support & EDD_EXT_FIXED_DISK_ACCESS) { + p += snprintf(p, left, "Fixed disk access\n"); + } + if (info->interface_support & EDD_EXT_DEVICE_LOCKING_AND_EJECTING) { + p += snprintf(p, left, "Device locking and ejecting\n"); + } + if (info->interface_support & EDD_EXT_ENHANCED_DISK_DRIVE_SUPPORT) { + p += snprintf(p, left, "Enhanced Disk Drive support\n"); + } + if (info->interface_support & EDD_EXT_64BIT_EXTENSIONS) { + p += snprintf(p, left, "64-bit extensions\n"); + } + return proc_calc_metrics(page, start, off, count, eof, (p - page)); +} + +static int +edd_show_info_flags(char *page, char **start, off_t off, int count, int *eof, void *data) +{ + struct edd_info *info = data; + char *p = page; + if (!info || !page || off) { + return proc_calc_metrics(page, start, off, count, eof, 0); + } + + if (info->params.info_flags & EDD_INFO_DMA_BOUNDRY_ERROR_TRANSPARENT) + p += snprintf(p, left, "DMA boundry error transparent\n"); + if (info->params.info_flags & EDD_INFO_GEOMETRY_VALID) + p += snprintf(p, left, "geometry valid\n"); + if (info->params.info_flags & EDD_INFO_REMOVABLE) + p += snprintf(p, left, "removable\n"); + if (info->params.info_flags & EDD_INFO_WRITE_VERIFY) + p += snprintf(p, left, "write verify\n"); + if (info->params.info_flags & EDD_INFO_MEDIA_CHANGE_NOTIFICATION) + p += snprintf(p, left, "media change notification\n"); + if (info->params.info_flags & EDD_INFO_LOCKABLE) + p += snprintf(p, left, "lockable\n"); + if (info->params.info_flags & EDD_INFO_NO_MEDIA_PRESENT) + p += snprintf(p, left, "no media present\n"); + if (info->params.info_flags & EDD_INFO_USE_INT13_FN50) + p += snprintf(p, left, "use int13 fn50\n"); + return proc_calc_metrics(page, start, off, count, eof, (p - page)); +} + +static int +edd_show_default_cylinders(char *page, char **start, off_t off, int count, int *eof, void *data) +{ + struct edd_info *info = data; + char *p = page; + if (!info || !page || off) { + return proc_calc_metrics(page, start, off, count, eof, 0); + } + + p += snprintf(p, left, "0x%x\n", info->params.num_default_cylinders); + return proc_calc_metrics(page, start, off, count, eof, (p - page)); +} + +static int +edd_show_default_heads(char *page, char **start, off_t off, int count, int *eof, void *data) +{ + struct edd_info *info = data; + char *p = page; + if (!info || !page || off) { + return proc_calc_metrics(page, start, off, count, eof, 0); + } + + p += snprintf(p, left, "0x%x\n", info->params.num_default_heads); + return proc_calc_metrics(page, start, off, count, eof, (p - page)); +} + +static int +edd_show_default_sectors_per_track(char *page, char **start, off_t off, int count, int *eof, void *data) +{ + struct edd_info *info = data; + char *p = page; + if (!info || !page || off) { + return proc_calc_metrics(page, start, off, count, eof, 0); + } + + p += snprintf(p, left, "0x%x\n", info->params.sectors_per_track); + return proc_calc_metrics(page, start, off, count, eof, (p - page)); +} + +static int +edd_show_sectors(char *page, char **start, off_t off, int count, int *eof, void *data) +{ + struct edd_info *info = data; + char *p = page; + if (!info || !page || off) { + return proc_calc_metrics(page, start, off, count, eof, 0); + } + + p += snprintf(p, left, "0x%llx\n", info->params.number_of_sectors); + return proc_calc_metrics(page, start, off, count, eof, (p - page)); +} + +static int +edd_has_default_cylinders(struct edd_device *edev) +{ + struct edd_info *info = edd_dev_get_info(edev); + if (!edev || !info) + return 0; + return info->params.num_default_cylinders > 0; +} + +static int +edd_has_default_heads(struct edd_device *edev) +{ + struct edd_info *info = edd_dev_get_info(edev); + if (!edev || !info) + return 0; + return info->params.num_default_heads > 0; +} + +static int +edd_has_default_sectors_per_track(struct edd_device *edev) +{ + struct edd_info *info = edd_dev_get_info(edev); + if (!edev || !info) + return 0; + return info->params.sectors_per_track > 0; +} + +static int +edd_has_edd30(struct edd_device *edev) +{ + struct edd_info *info = edd_dev_get_info(edev); + int i, nonzero_path = 0; + char c; + + if (!edev || !info) + return 0; + + if (!(info->params.key == 0xBEDD || info->params.key == 0xDDBE)) { + return 0; + } + + for (i = 30; i <= 73; i++) { + c = *(((uint8_t *) info) + i + 4); + if (c) { + nonzero_path++; + break; + } + } + if (!nonzero_path) { + return 0; + } + + return 1; +} + +static EDD_DEVICE_ATTR(raw_data, edd_show_raw_data, NULL); +static EDD_DEVICE_ATTR(version, edd_show_version, NULL); +static EDD_DEVICE_ATTR(extensions, edd_show_extensions, NULL); +static EDD_DEVICE_ATTR(info_flags, edd_show_info_flags, NULL); +static EDD_DEVICE_ATTR(sectors, edd_show_sectors, NULL); +static EDD_DEVICE_ATTR(default_cylinders, edd_show_default_cylinders, + edd_has_default_cylinders); +static EDD_DEVICE_ATTR(default_heads, edd_show_default_heads, + edd_has_default_heads); +static EDD_DEVICE_ATTR(default_sectors_per_track, + edd_show_default_sectors_per_track, + edd_has_default_sectors_per_track); +static EDD_DEVICE_ATTR(interface, edd_show_interface,edd_has_edd30); +static EDD_DEVICE_ATTR(host_bus, edd_show_host_bus, edd_has_edd30); + +static struct edd_attribute *def_attrs[] = { + &edd_attr_raw_data, + &edd_attr_version, + &edd_attr_extensions, + &edd_attr_info_flags, + &edd_attr_sectors, + &edd_attr_default_cylinders, + &edd_attr_default_heads, + &edd_attr_default_sectors_per_track, + &edd_attr_interface, + &edd_attr_host_bus, + NULL, +}; + +static inline void +edd_device_unregister(struct edd_device *edev) +{ + struct list_head *pos, *next; + struct attr_entry *ae; + + list_for_each_safe(pos, next, &edev->attr_list) { + ae = list_entry(pos, struct attr_entry, node); + remove_proc_entry(ae->entry->name, edev->dir); + list_del(&ae->node); + kfree(ae); + } + + remove_proc_entry(edev->dir->name, bios_dir); +} + +static int +edd_populate_dir(struct edd_device *edev) +{ + struct edd_attribute *attr; + struct attr_entry *ae; + int i; + int error = 0; + + for (i = 0; (attr=def_attrs[i]); i++) { + if (!attr->test || (attr->test && attr->test(edev))) { + ae = kmalloc(sizeof (*ae), GFP_KERNEL); + if (ae == NULL) { + error = 1; + break; + } + INIT_LIST_HEAD(&ae->node); + ae->entry = + create_proc_read_entry(attr->name, 0444, + edev->dir, attr->show, + edd_dev_get_info(edev)); + if (ae->entry == NULL) { + error = 1; + break; + } + list_add(&ae->node, &edev->attr_list); + } + } + + if (error) + return error; + + return 0; +} + +static int +edd_make_dir(struct edd_device *edev) +{ + int error=1; + + edev->dir = proc_mkdir(edev->name, bios_dir); + if (edev->dir != NULL) { + edev->dir->mode = (S_IFDIR | S_IRWXU | S_IRUGO | S_IXUGO); + error = edd_populate_dir(edev); + } + return error; +} + +static int +edd_device_register(struct edd_device *edev, int i) +{ + int error; + + if (!edev) + return 1; + memset(edev, 0, sizeof (*edev)); + INIT_LIST_HEAD(&edev->attr_list); + edd_dev_set_info(edev, &edd[i]); + snprintf(edev->name, EDD_DEVICE_NAME_SIZE, "int13_dev%02x", + edd[i].device); + error = edd_make_dir(edev); + return error; +} + +/** + * edd_init() - creates /proc/bios tree of EDD data + * + * This assumes that eddnr and edd were + * assigned in setup.c already. + */ +static int __init +edd_init(void) +{ + unsigned int i; + int rc = 0; + struct edd_device *edev; + + printk(KERN_INFO "BIOS EDD facility v%s, %d devices found\n", + EDD_VERSION, eddnr); + + if (!eddnr) { + printk(KERN_INFO "EDD information not available.\n"); + return 1; + } + + bios_dir = proc_mkdir("bios", NULL); + if (bios_dir == NULL) + return 1; + + for (i = 0; i < eddnr && i < EDDMAXNR && !rc; i++) { + edev = kmalloc(sizeof (*edev), GFP_KERNEL); + if (!edev) { + rc = 1; + break; + } + + rc = edd_device_register(edev, i); + if (rc) { + break; + } + edd_devices[i] = edev; + } + + if (rc) { + for (i = 0; i < eddnr && i < EDDMAXNR; i++) { + if ((edev = edd_devices[i])) { + edd_device_unregister(edev); + kfree(edev); + } + } + + remove_proc_entry(bios_dir->name, NULL); + } + + return rc; +} + +static void __exit +edd_exit(void) +{ + int i; + struct edd_device *edev; + + for (i = 0; i < eddnr && i < EDDMAXNR; i++) { + if ((edev = edd_devices[i])) { + edd_device_unregister(edev); + kfree(edev); + } + } + + remove_proc_entry(bios_dir->name, NULL); +} + +module_init(edd_init); +module_exit(edd_exit); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/i386/kernel/head.S linux-2.4.23-pre8/arch/i386/kernel/head.S --- linux-2.4.22/arch/i386/kernel/head.S 2003-06-13 14:51:29.000000000 +0000 +++ linux-2.4.23-pre8/arch/i386/kernel/head.S 2003-10-22 22:47:41.000000000 +0000 @@ -34,7 +34,7 @@ #define X86_HARD_MATH CPU_PARAMS+6 #define X86_CPUID CPU_PARAMS+8 #define X86_CAPABILITY CPU_PARAMS+12 -#define X86_VENDOR_ID CPU_PARAMS+28 +#define X86_VENDOR_ID CPU_PARAMS+36 /* tied to NCAPINTS in cpufeature.h */ /* * swapper_pg_dir is the main page directory, address 0x00101000 @@ -113,7 +113,7 @@ popfl jmp checkCPUtype 1: -#endif CONFIG_SMP +#endif /* CONFIG_SMP */ /* * Clear BSS first so that there are no surprises... diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/i386/kernel/i386_ksyms.c linux-2.4.23-pre8/arch/i386/kernel/i386_ksyms.c --- linux-2.4.22/arch/i386/kernel/i386_ksyms.c 2003-06-13 14:51:29.000000000 +0000 +++ linux-2.4.23-pre8/arch/i386/kernel/i386_ksyms.c 2003-10-22 22:48:54.000000000 +0000 @@ -28,6 +28,7 @@ #include #include #include +#include extern void dump_thread(struct pt_regs *, struct user *); extern spinlock_t rtc_lock; @@ -180,3 +181,8 @@ #ifdef CONFIG_MULTIQUAD EXPORT_SYMBOL(xquad_portio); #endif + +#ifdef CONFIG_EDD_MODULE +EXPORT_SYMBOL(edd); +EXPORT_SYMBOL(eddnr); +#endif diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/i386/kernel/io_apic.c linux-2.4.23-pre8/arch/i386/kernel/io_apic.c --- linux-2.4.22/arch/i386/kernel/io_apic.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/i386/kernel/io_apic.c 2003-10-22 22:48:26.000000000 +0000 @@ -169,6 +169,14 @@ { struct IO_APIC_route_entry entry; unsigned long flags; + + /* Check delivery_mode to be sure we're not clearing an SMI pin */ + spin_lock_irqsave(&ioapic_lock, flags); + *(((int*)&entry) + 0) = io_apic_read(apic, 0x10 + 2 * pin); + *(((int*)&entry) + 1) = io_apic_read(apic, 0x11 + 2 * pin); + spin_unlock_irqrestore(&ioapic_lock, flags); + if (entry.delivery_mode == dest_SMI) + return; /* * Disable it in the IO-APIC irq-routing table: @@ -1365,6 +1373,13 @@ static void set_ioapic_affinity (unsigned int irq, unsigned long mask) { unsigned long flags; + + /* pick a single cpu for clustered xapics */ + if(clustered_apic_mode == CLUSTERED_APIC_XAPIC){ + int cpu = ffs(mask)-1; + mask = cpu_to_physical_apicid(cpu); + } + /* * Only the first 8 bits are valid. */ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/i386/kernel/irq.c linux-2.4.23-pre8/arch/i386/kernel/irq.c --- linux-2.4.22/arch/i386/kernel/irq.c 2002-11-28 23:53:09.000000000 +0000 +++ linux-2.4.23-pre8/arch/i386/kernel/irq.c 2003-10-22 22:47:39.000000000 +0000 @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -131,55 +132,55 @@ * Generic, controller-independent functions: */ -int get_irq_list(char *buf) +int show_interrupts(struct seq_file *p, void *v) { int i, j; struct irqaction * action; - char *p = buf; - p += sprintf(p, " "); + seq_printf(p, " "); for (j=0; jtypename); - p += sprintf(p, " %s", action->name); + seq_printf(p, " %14s", irq_desc[i].handler->typename); + seq_printf(p, " %s", action->name); for (action=action->next; action; action = action->next) - p += sprintf(p, ", %s", action->name); - *p++ = '\n'; + seq_printf(p, ", %s", action->name); + seq_putc(p,'\n'); } - p += sprintf(p, "NMI: "); + seq_printf(p, "NMI: "); for (j = 0; j < smp_num_cpus; j++) - p += sprintf(p, "%10u ", + seq_printf(p, "%10u ", nmi_count(cpu_logical_map(j))); - p += sprintf(p, "\n"); + seq_printf(p, "\n"); #if CONFIG_X86_LOCAL_APIC - p += sprintf(p, "LOC: "); + seq_printf(p, "LOC: "); for (j = 0; j < smp_num_cpus; j++) - p += sprintf(p, "%10u ", + seq_printf(p, "%10u ", apic_timer_irqs[cpu_logical_map(j)]); - p += sprintf(p, "\n"); + seq_printf(p, "\n"); #endif - p += sprintf(p, "ERR: %10u\n", atomic_read(&irq_err_count)); + seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count)); #ifdef CONFIG_X86_IO_APIC #ifdef APIC_MISMATCH_DEBUG - p += sprintf(p, "MIS: %10u\n", atomic_read(&irq_mis_count)); + seq_printf(p, "MIS: %10u\n", atomic_read(&irq_mis_count)); #endif #endif - return p - buf; + + return 0; } @@ -1035,7 +1036,7 @@ if (!shared) { desc->depth = 0; - desc->status &= ~(IRQ_DISABLED | IRQ_AUTODETECT | IRQ_WAITING); + desc->status &= ~(IRQ_DISABLED | IRQ_AUTODETECT | IRQ_WAITING | IRQ_INPROGRESS); desc->handler->startup(irq); } spin_unlock_irqrestore(&desc->lock,flags); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/i386/kernel/mpparse.c linux-2.4.23-pre8/arch/i386/kernel/mpparse.c --- linux-2.4.22/arch/i386/kernel/mpparse.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/i386/kernel/mpparse.c 2003-10-22 22:48:24.000000000 +0000 @@ -229,6 +229,11 @@ boot_cpu_logical_apicid = logical_apicid; } + if (num_processors >= NR_CPUS){ + printk(KERN_WARNING "NR_CPUS limit of %i reached. Cannot " + "boot CPU(apicid 0x%x).\n", NR_CPUS, m->mpc_apicid); + return; + } num_processors++; if (m->mpc_apicid > MAX_APICS) { @@ -683,6 +688,24 @@ struct mpc_config_lintsrc lintsrc; int linttypes[2] = { mp_ExtINT, mp_NMI }; int i; + struct { + int mp_bus_id_to_type[MAX_MP_BUSSES]; + int mp_bus_id_to_node[MAX_MP_BUSSES]; + int mp_bus_id_to_local[MAX_MP_BUSSES]; + int mp_bus_id_to_pci_bus[MAX_MP_BUSSES]; + struct mpc_config_intsrc mp_irqs[MAX_IRQ_SOURCES]; + } *bus_data; + + bus_data = alloc_bootmem(sizeof(*bus_data)); + if (!bus_data) + panic("SMP mptable: out of memory!\n"); + mp_bus_id_to_type = bus_data->mp_bus_id_to_type; + mp_bus_id_to_node = bus_data->mp_bus_id_to_node; + mp_bus_id_to_local = bus_data->mp_bus_id_to_local; + mp_bus_id_to_pci_bus = bus_data->mp_bus_id_to_pci_bus; + mp_irqs = bus_data->mp_irqs; + for (i = 0; i < MAX_MP_BUSSES; ++i) + mp_bus_id_to_pci_bus[i] = -1; /* * local APIC has default address @@ -977,7 +1000,14 @@ processor.mpc_type = MP_PROCESSOR; processor.mpc_apicid = id; - processor.mpc_apicver = 0x10; /* TBD: lapic version */ + + /* + * mp_register_lapic_address() which is called before the + * current function does the fixmap of FIX_APIC_BASE. + * Read in the correct APIC version from there + */ + processor.mpc_apicver = apic_read(APIC_LVR); + processor.mpc_cpuflag = (enabled ? CPU_ENABLED : 0); processor.mpc_cpuflag |= (boot_cpu ? CPU_BOOTPROCESSOR : 0); processor.mpc_cpufeature = (boot_cpu_data.x86 << 8) | @@ -1014,7 +1044,7 @@ return i; } - printk(KERN_ERR "ERROR: Unable to locate IOAPIC for IRQ %d/n", irq); + printk(KERN_ERR "ERROR: Unable to locate IOAPIC for IRQ %d\n", irq); return -1; } @@ -1199,8 +1229,6 @@ } } -/* Ensure the ACPI SCI interrupt level is active low, edge-triggered */ - extern FADT_DESCRIPTOR acpi_fadt; void __init mp_config_ioapic_for_sci(int irq) @@ -1209,6 +1237,7 @@ int ioapic_pin; struct acpi_table_madt* madt; struct acpi_table_int_src_ovr *entry = NULL; + acpi_interrupt_flags flags; void *madt_end; acpi_status status; @@ -1227,30 +1256,36 @@ while ((void *) entry < madt_end) { if (entry->header.type == ACPI_MADT_INT_SRC_OVR && - acpi_fadt.sci_int == entry->bus_irq) { - /* - * See the note at the end of ACPI 2.0b section - * 5.2.10.8 for what this is about. - */ - if (entry->bus_irq != entry->global_irq) { - acpi_fadt.sci_int = entry->global_irq; - irq = entry->global_irq; - break; - } - else - return; - } - + acpi_fadt.sci_int == entry->bus_irq) + goto found; + entry = (struct acpi_table_int_src_ovr *) ((unsigned long) entry + entry->header.length); } } + /* + * Although the ACPI spec says that the SCI should be level/low + * don't reprogram it unless there is an explicit MADT OVR entry + * instructing us to do so -- otherwise we break Tyan boards which + * have the SCI wired edge/high but no MADT OVR. + */ + return; +found: + /* + * See the note at the end of ACPI 2.0b section + * 5.2.10.8 for what this is about. + */ + flags = entry->flags; + acpi_fadt.sci_int = entry->global_irq; + irq = entry->global_irq; + ioapic = mp_find_ioapic(irq); ioapic_pin = irq - mp_ioapic_routing[ioapic].irq_start; - io_apic_set_pci_routing(ioapic, ioapic_pin, irq, 1, 1); // Active low, level triggered + io_apic_set_pci_routing(ioapic, ioapic_pin, irq, + (flags.trigger >> 1) , (flags.polarity >> 1)); } @@ -1288,8 +1323,10 @@ } /* Don't set up the ACPI SCI because it's already set up */ - if (acpi_fadt.sci_int == irq) + if (acpi_fadt.sci_int == irq) { + entry->irq = irq; /*we still need to set entry's irq*/ continue; + } ioapic = mp_find_ioapic(irq); if (ioapic < 0) diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/i386/kernel/pci-i386.c linux-2.4.23-pre8/arch/i386/kernel/pci-i386.c --- linux-2.4.22/arch/i386/kernel/pci-i386.c 2002-11-28 23:53:09.000000000 +0000 +++ linux-2.4.23-pre8/arch/i386/kernel/pci-i386.c 2003-10-22 22:48:14.000000000 +0000 @@ -295,6 +295,17 @@ } } +void __init pcibios_set_cacheline_size(void) +{ + struct cpuinfo_x86 *c = &boot_cpu_data; + + pci_cache_line_size = 32 >> 2; + if (c->x86 >= 6 && c->x86_vendor == X86_VENDOR_AMD) + pci_cache_line_size = 64 >> 2; /* K7 & K8 */ + else if (c->x86 > 6 && c->x86_vendor == X86_VENDOR_INTEL) + pci_cache_line_size = 128 >> 2; /* P4 */ +} + void __init pcibios_resource_survey(void) { DBG("PCI: Allocating resources\n"); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/i386/kernel/pci-i386.h linux-2.4.23-pre8/arch/i386/kernel/pci-i386.h --- linux-2.4.22/arch/i386/kernel/pci-i386.h 2002-11-28 23:53:09.000000000 +0000 +++ linux-2.4.23-pre8/arch/i386/kernel/pci-i386.h 2003-10-22 22:49:02.000000000 +0000 @@ -27,8 +27,10 @@ /* pci-i386.c */ extern unsigned int pcibios_max_latency; +extern u8 pci_cache_line_size; void pcibios_resource_survey(void); +void pcibios_set_cacheline_size(void); int pcibios_enable_resources(struct pci_dev *, int); /* pci-pc.c */ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/i386/kernel/pci-irq.c linux-2.4.23-pre8/arch/i386/kernel/pci-irq.c --- linux-2.4.22/arch/i386/kernel/pci-irq.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/i386/kernel/pci-irq.c 2003-10-22 22:49:52.000000000 +0000 @@ -23,7 +23,6 @@ #define PIRQ_VERSION 0x0100 int broken_hp_bios_irq9; -int broken_440gx_bios; static struct irq_routing_table *pirq_table; @@ -46,6 +45,11 @@ int (*set)(struct pci_dev *router, struct pci_dev *dev, int pirq, int new); }; +struct irq_router_handler { + u16 vendor; + int (*probe)(struct irq_router *r, struct pci_dev *router, u16 device); +}; + /* * Search 0xf0000 -- 0xfffff for the PCI IRQ Routing Table. */ @@ -257,111 +261,221 @@ } /* - * PIRQ routing for SiS 85C503 router used in several SiS chipsets - * According to the SiS 5595 datasheet (preliminary V1.0, 12/24/1997) - * the related registers work as follows: - * - * general: one byte per re-routable IRQ, + * PIRQ routing for SiS 85C503 router used in several SiS chipsets. + * We have to deal with the following issues here: + * - vendors have different ideas about the meaning of link values + * - some onboard devices (integrated in the chipset) have special + * links and are thus routed differently (i.e. not via PCI INTA-INTD) + * - different revision of the router have a different layout for + * the routing registers, particularly for the onchip devices + * + * For all routing registers the common thing is we have one byte + * per routeable link which is defined as: * bit 7 IRQ mapping enabled (0) or disabled (1) - * bits [6:4] reserved + * bits [6:4] reserved (sometimes used for onchip devices) * bits [3:0] IRQ to map to * allowed: 3-7, 9-12, 14-15 * reserved: 0, 1, 2, 8, 13 * - * individual registers in device config space: + * The config-space registers located at 0x41/0x42/0x43/0x44 are + * always used to route the normal PCI INT A/B/C/D respectively. + * Apparently there are systems implementing PCI routing table using + * link values 0x01-0x04 and others using 0x41-0x44 for PCI INTA..D. + * We try our best to handle both link mappings. + * + * Currently (2003-05-21) it appears most SiS chipsets follow the + * definition of routing registers from the SiS-5595 southbridge. + * According to the SiS 5595 datasheets the revision id's of the + * router (ISA-bridge) should be 0x01 or 0xb0. * - * 0x41/0x42/0x43/0x44: PCI INT A/B/C/D - bits as in general case + * Furthermore we've also seen lspci dumps with revision 0x00 and 0xb1. + * Looks like these are used in a number of SiS 5xx/6xx/7xx chipsets. + * They seem to work with the current routing code. However there is + * some concern because of the two USB-OHCI HCs (original SiS 5595 + * had only one). YMMV. * - * 0x61: IDEIRQ: bits as in general case - but: - * bits [6:5] must be written 01 - * bit 4 channel-select primary (0), secondary (1) + * Onchip routing for router rev-id 0x01/0xb0 and probably 0x00/0xb1: * - * 0x62: USBIRQ: bits as in general case - but: - * bit 4 OHCI function disabled (0), enabled (1) + * 0x61: IDEIRQ: + * bits [6:5] must be written 01 + * bit 4 channel-select primary (0), secondary (1) + * + * 0x62: USBIRQ: + * bit 6 OHCI function disabled (0), enabled (1) * - * 0x6a: ACPI/SCI IRQ - bits as in general case + * 0x6a: ACPI/SCI IRQ: bits 4-6 reserved + * + * 0x7e: Data Acq. Module IRQ - bits 4-6 reserved + * + * We support USBIRQ (in addition to INTA-INTD) and keep the + * IDE, ACPI and DAQ routing untouched as set by the BIOS. + * + * Currently the only reported exception is the new SiS 65x chipset + * which includes the SiS 69x southbridge. Here we have the 85C503 + * router revision 0x04 and there are changes in the register layout + * mostly related to the different USB HCs with USB 2.0 support. * - * 0x7e: Data Acq. Module IRQ - bits as in general case + * Onchip routing for router rev-id 0x04 (try-and-error observation) * - * Apparently there are systems implementing PCI routing table using both - * link values 0x01-0x04 and 0x41-0x44 for PCI INTA..D, but register offsets - * like 0x62 as link values for USBIRQ e.g. So there is no simple - * "register = offset + pirq" relation. - * Currently we support PCI INTA..D and USBIRQ and try our best to handle - * both link mappings. - * IDE/ACPI/DAQ mapping is currently unsupported (left untouched as set by BIOS). + * 0x60/0x61/0x62/0x63: 1xEHCI and 3xOHCI (companion) USB-HCs + * bit 6-4 are probably unused, not like 5595 */ -static int pirq_sis_get(struct pci_dev *router, struct pci_dev *dev, int pirq) +#define PIRQ_SIS_IRQ_MASK 0x0f +#define PIRQ_SIS_IRQ_DISABLE 0x80 +#define PIRQ_SIS_USB_ENABLE 0x40 +#define PIRQ_SIS_DETECT_REGISTER 0x40 + +/* return value: + * -1 on error + * 0 for PCI INTA-INTD + * 0 or enable bit mask to check or set for onchip functions + */ +static inline int pirq_sis5595_onchip(int pirq, int *reg) { - u8 x; - int reg = pirq; + int ret = -1; + *reg = pirq; switch(pirq) { - case 0x01: - case 0x02: - case 0x03: - case 0x04: - reg += 0x40; - case 0x41: - case 0x42: - case 0x43: - case 0x44: - case 0x62: - pci_read_config_byte(router, reg, &x); - if (reg != 0x62) - break; - if (!(x & 0x40)) - return 0; - break; - case 0x61: - case 0x6a: - case 0x7e: - printk(KERN_INFO "SiS pirq: advanced IDE/ACPI/DAQ mapping not yet implemented\n"); - return 0; - default: - printk(KERN_INFO "SiS router pirq escape (%d)\n", pirq); - return 0; + case 0x01: + case 0x02: + case 0x03: + case 0x04: + *reg += 0x40; + case 0x41: + case 0x42: + case 0x43: + case 0x44: + ret = 0; + break; + + case 0x62: + ret = PIRQ_SIS_USB_ENABLE; /* documented for 5595 */ + break; + + case 0x61: + case 0x6a: + case 0x7e: + printk(KERN_INFO "SiS pirq: IDE/ACPI/DAQ mapping not implemented: (%u)\n", + (unsigned) pirq); + /* fall thru */ + default: + printk(KERN_INFO "SiS router unknown request: (%u)\n", + (unsigned) pirq); + break; + } + return ret; +} + +/* return value: + * -1 on error + * 0 for PCI INTA-INTD + * 0 or enable bit mask to check or set for onchip functions + */ +static inline int pirq_sis96x_onchip(int pirq, int *reg) +{ + int ret = -1; + + *reg = pirq; + switch(pirq) { + case 0x01: + case 0x02: + case 0x03: + case 0x04: + *reg += 0x40; + case 0x41: + case 0x42: + case 0x43: + case 0x44: + case 0x60: + case 0x61: + case 0x62: + case 0x63: + ret = 0; + break; + + default: + printk(KERN_INFO "SiS router unknown request: (%u)\n", + (unsigned) pirq); + break; } - return (x & 0x80) ? 0 : (x & 0x0f); + return ret; +} + + +static int pirq_sis5595_get(struct pci_dev *router, struct pci_dev *dev, int pirq) +{ + u8 x; + int reg, check; + + check = pirq_sis5595_onchip(pirq, ®); + if (check < 0) + return 0; + + pci_read_config_byte(router, reg, &x); + if (check != 0 && !(x & check)) + return 0; + + return (x & PIRQ_SIS_IRQ_DISABLE) ? 0 : (x & PIRQ_SIS_IRQ_MASK); } -static int pirq_sis_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) +static int pirq_sis96x_get(struct pci_dev *router, struct pci_dev *dev, int pirq) { u8 x; - int reg = pirq; + int reg, check; + + check = pirq_sis96x_onchip(pirq, ®); + if (check < 0) + return 0; + + pci_read_config_byte(router, reg, &x); + if (check != 0 && !(x & check)) + return 0; + + return (x & PIRQ_SIS_IRQ_DISABLE) ? 0 : (x & PIRQ_SIS_IRQ_MASK); +} + +static int pirq_sis5595_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) +{ + u8 x; + int reg, set; + + set = pirq_sis5595_onchip(pirq, ®); + if (set < 0) + return 0; + + x = (irq & PIRQ_SIS_IRQ_MASK); + if (x == 0) + x = PIRQ_SIS_IRQ_DISABLE; + else + x |= set; - switch(pirq) { - case 0x01: - case 0x02: - case 0x03: - case 0x04: - reg += 0x40; - case 0x41: - case 0x42: - case 0x43: - case 0x44: - case 0x62: - x = (irq&0x0f) ? (irq&0x0f) : 0x80; - if (reg != 0x62) - break; - /* always mark OHCI enabled, as nothing else knows about this */ - x |= 0x40; - break; - case 0x61: - case 0x6a: - case 0x7e: - printk(KERN_INFO "advanced SiS pirq mapping not yet implemented\n"); - return 0; - default: - printk(KERN_INFO "SiS router pirq escape (%d)\n", pirq); - return 0; - } pci_write_config_byte(router, reg, x); return 1; } +static int pirq_sis96x_set(struct pci_dev *router, struct pci_dev *dev, int pirq, int irq) +{ + u8 x; + int reg, set; + + set = pirq_sis96x_onchip(pirq, ®); + if (set < 0) + return 0; + + x = (irq & PIRQ_SIS_IRQ_MASK); + if (x == 0) + x = PIRQ_SIS_IRQ_DISABLE; + else + x |= set; + + pci_write_config_byte(router, reg, x); + + return 1; +} + + /* * VLSI: nibble offset 0x74 - educated guess due to routing table and * config space of VLSI 82C534 PCI-bridge/router (1004:0102) @@ -454,96 +568,263 @@ return pcibios_set_irq_routing(bridge, pin, irq); } -static struct irq_router pirq_bios_router = - { "BIOS", 0, 0, NULL, pirq_bios_set }; - #endif -static struct irq_router pirq_routers[] = { - { "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371FB_0, pirq_piix_get, pirq_piix_set }, - { "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371SB_0, pirq_piix_get, pirq_piix_set }, - { "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_0, pirq_piix_get, pirq_piix_set }, - { "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371MX, pirq_piix_get, pirq_piix_set }, - { "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443MX_0, pirq_piix_get, pirq_piix_set }, - { "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AA_0, pirq_piix_get, pirq_piix_set }, - { "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AB_0, pirq_piix_get, pirq_piix_set }, - { "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_0, pirq_piix_get, pirq_piix_set }, - { "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_10, pirq_piix_get, pirq_piix_set }, - { "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_0, pirq_piix_get, pirq_piix_set }, - { "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_12, pirq_piix_get, pirq_piix_set }, - { "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_0, pirq_piix_get, pirq_piix_set }, - { "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801E_0, pirq_piix_get, pirq_piix_set }, - { "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0, pirq_piix_get, pirq_piix_set }, - { "PIIX", PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB_0, pirq_piix_get, pirq_piix_set }, - - { "ALI", PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533, pirq_ali_get, pirq_ali_set }, - - { "ITE", PCI_VENDOR_ID_ITE, PCI_DEVICE_ID_ITE_IT8330G_0, pirq_ite_get, pirq_ite_set }, - - { "VIA", PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_0, pirq_via_get, pirq_via_set }, - { "VIA", PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C596, pirq_via_get, pirq_via_set }, - { "VIA", PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, pirq_via_get, pirq_via_set }, - - { "OPTI", PCI_VENDOR_ID_OPTI, PCI_DEVICE_ID_OPTI_82C700, pirq_opti_get, pirq_opti_set }, - - { "NatSemi", PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5520, pirq_cyrix_get, pirq_cyrix_set }, - { "SIS", PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503, pirq_sis_get, pirq_sis_set }, - { "VLSI 82C534", PCI_VENDOR_ID_VLSI, PCI_DEVICE_ID_VLSI_82C534, pirq_vlsi_get, pirq_vlsi_set }, - { "ServerWorks", PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4, - pirq_serverworks_get, pirq_serverworks_set }, - { "ServerWorks", PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5, - pirq_serverworks_get, pirq_serverworks_set }, - { "AMD756 VIPER", PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_740B, - pirq_amd756_get, pirq_amd756_set }, - { "AMD766", PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7413, - pirq_amd756_get, pirq_amd756_set }, - { "AMD768", PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7443, - pirq_amd756_get, pirq_amd756_set }, - { "default", 0, 0, NULL, NULL } -}; +static __init int intel_router_probe(struct irq_router *r, struct pci_dev *router, u16 device) +{ + /* We must not touch 440GX even if we have tables. 440GX has + different IRQ routing weirdness */ + if(pci_find_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82450GX, NULL)) + return 0; + switch(device) + { + case PCI_DEVICE_ID_INTEL_82371FB_0: + case PCI_DEVICE_ID_INTEL_82371SB_0: + case PCI_DEVICE_ID_INTEL_82371AB_0: + case PCI_DEVICE_ID_INTEL_82371MX: + case PCI_DEVICE_ID_INTEL_82443MX_0: + case PCI_DEVICE_ID_INTEL_82801AA_0: + case PCI_DEVICE_ID_INTEL_82801AB_0: + case PCI_DEVICE_ID_INTEL_82801BA_0: + case PCI_DEVICE_ID_INTEL_82801BA_10: + case PCI_DEVICE_ID_INTEL_82801CA_0: + case PCI_DEVICE_ID_INTEL_82801CA_12: + case PCI_DEVICE_ID_INTEL_82801DB_0: + case PCI_DEVICE_ID_INTEL_82801E_0: + case PCI_DEVICE_ID_INTEL_82801EB_0: + case PCI_DEVICE_ID_INTEL_ESB_0: + r->name = "PIIX/ICH"; + r->get = pirq_piix_get; + r->set = pirq_piix_set; + return 1; + } + return 0; +} -static struct irq_router *pirq_router; +static __init int via_router_probe(struct irq_router *r, struct pci_dev *router, u16 device) +{ + /* FIXME: We should move some of the quirk fixup stuff here */ + switch(device) + { + case PCI_DEVICE_ID_VIA_82C586_0: + case PCI_DEVICE_ID_VIA_82C596: + case PCI_DEVICE_ID_VIA_82C686: + case PCI_DEVICE_ID_VIA_8231: + /* FIXME: add new ones for 8233/5 */ + r->name = "VIA"; + r->get = pirq_via_get; + r->set = pirq_via_set; + return 1; + } + return 0; +} + +static __init int vlsi_router_probe(struct irq_router *r, struct pci_dev *router, u16 device) +{ + switch(device) + { + case PCI_DEVICE_ID_VLSI_82C534: + r->name = "VLSI 82C534"; + r->get = pirq_vlsi_get; + r->set = pirq_vlsi_set; + return 1; + } + return 0; +} + + +static __init int serverworks_router_probe(struct irq_router *r, struct pci_dev *router, u16 device) +{ + switch(device) + { + case PCI_DEVICE_ID_SERVERWORKS_OSB4: + case PCI_DEVICE_ID_SERVERWORKS_CSB5: + r->name = "ServerWorks"; + r->get = pirq_serverworks_get; + r->set = pirq_serverworks_set; + return 1; + } + return 0; +} + +static __init int sis_router_probe(struct irq_router *r, struct pci_dev *router, u16 device) +{ + u8 reg; + u16 devid; + + if (device != PCI_DEVICE_ID_SI_503) + return 0; + + /* + * In case of SiS south bridge, we need to detect the two + * kinds of routing tables we have seen so far (5595 and 96x). + * Since the maintain the same device ID, we need to do poke + * the PCI configuration space to find the router type we are + * dealing with. + */ + + /* + * Factoid: writing bit6 of register 0x40 of the router config space + * will make the SB to show up 0x096x inside the device id. Note, + * we need to restore register 0x40 after the device id poke. + */ + + pci_read_config_byte(router, PIRQ_SIS_DETECT_REGISTER, ®); + pci_write_config_byte(router, PIRQ_SIS_DETECT_REGISTER, reg | (1 << 6)); + pci_read_config_word(router, PCI_DEVICE_ID, &devid); + pci_write_config_byte(router, PIRQ_SIS_DETECT_REGISTER, reg); + + if ((devid & 0xfff0) == 0x0960) { + r->name = "SIS96x"; + r->get = pirq_sis96x_get; + r->set = pirq_sis96x_set; + DBG("PCI: Detecting SiS router at %02x:%02x : SiS096x detected\n", + rt->rtr_bus, rt->rtr_devfn); + } else { + r->name = "SIS5595"; + r->get = pirq_sis5595_get; + r->set = pirq_sis5595_set; + DBG("PCI: Detecting SiS router at %02x:%02x : SiS5595 detected\n", + rt->rtr_bus, rt->rtr_devfn); + } + return 1; +} + +static __init int cyrix_router_probe(struct irq_router *r, struct pci_dev *router, u16 device) +{ + switch(device) + { + case PCI_DEVICE_ID_CYRIX_5520: + r->name = "NatSemi"; + r->get = pirq_cyrix_get; + r->set = pirq_cyrix_set; + return 1; + } + return 0; +} + +static __init int opti_router_probe(struct irq_router *r, struct pci_dev *router, u16 device) +{ + switch(device) + { + case PCI_DEVICE_ID_OPTI_82C700: + r->name = "OPTI"; + r->get = pirq_opti_get; + r->set = pirq_opti_set; + return 1; + } + return 0; +} + +static __init int ite_router_probe(struct irq_router *r, struct pci_dev *router, u16 device) +{ + switch(device) + { + case PCI_DEVICE_ID_ITE_IT8330G_0: + r->name = "ITE"; + r->get = pirq_ite_get; + r->set = pirq_ite_set; + return 1; + } + return 0; +} + +static __init int ali_router_probe(struct irq_router *r, struct pci_dev *router, u16 device) +{ + switch(device) + { + case PCI_DEVICE_ID_AL_M1533: + r->name = "ALI"; + r->get = pirq_ali_get; + r->set = pirq_ali_set; + return 1; + /* Should add 156x some day */ + } + return 0; +} + +static __init int amd_router_probe(struct irq_router *r, struct pci_dev *router, u16 device) +{ + switch(device) + { + case PCI_DEVICE_ID_AMD_VIPER_740B: + r->name = "AMD756"; + break; + case PCI_DEVICE_ID_AMD_VIPER_7413: + r->name = "AMD766"; + break; + case PCI_DEVICE_ID_AMD_VIPER_7443: + r->name = "AMD768"; + break; + default: + return 0; + } + r->get = pirq_amd756_get; + r->set = pirq_amd756_set; + return 1; +} + +static __initdata struct irq_router_handler pirq_routers[] = { + { PCI_VENDOR_ID_INTEL, intel_router_probe }, + { PCI_VENDOR_ID_AL, ali_router_probe }, + { PCI_VENDOR_ID_ITE, ite_router_probe }, + { PCI_VENDOR_ID_VIA, via_router_probe }, + { PCI_VENDOR_ID_OPTI, opti_router_probe }, + { PCI_VENDOR_ID_SI, sis_router_probe }, + { PCI_VENDOR_ID_CYRIX, cyrix_router_probe }, + { PCI_VENDOR_ID_VLSI, vlsi_router_probe }, + { PCI_VENDOR_ID_SERVERWORKS, serverworks_router_probe }, + { PCI_VENDOR_ID_AMD, amd_router_probe }, + /* Someone with docs needs to add the ATI Radeon IGP */ + { 0, NULL } +}; +static struct irq_router pirq_router; static struct pci_dev *pirq_router_dev; -static void __init pirq_find_router(void) +/* + * FIXME: should we have an option to say "generic for + * chipset" ? + */ + +static void __init pirq_find_router(struct irq_router *r) { struct irq_routing_table *rt = pirq_table; - struct irq_router *r; + struct irq_router_handler *h; #ifdef CONFIG_PCI_BIOS if (!rt->signature) { printk(KERN_INFO "PCI: Using BIOS for IRQ routing\n"); - pirq_router = &pirq_bios_router; + r->set = pirq_bios_set; + r->name = "BIOS"; return; } #endif + /* Default unless a driver reloads it */ + r->name = "default"; + r->get = NULL; + r->set = NULL; + DBG("PCI: Attempting to find IRQ router for %04x:%04x\n", rt->rtr_vendor, rt->rtr_device); - /* fall back to default router if nothing else found */ - pirq_router = &pirq_routers[ARRAY_SIZE(pirq_routers) - 1]; - pirq_router_dev = pci_find_slot(rt->rtr_bus, rt->rtr_devfn); if (!pirq_router_dev) { DBG("PCI: Interrupt router not found at %02x:%02x\n", rt->rtr_bus, rt->rtr_devfn); return; } - for(r=pirq_routers; r->vendor; r++) { - /* Exact match against router table entry? Use it! */ - if (r->vendor == rt->rtr_vendor && r->device == rt->rtr_device) { - pirq_router = r; + for( h = pirq_routers; h->vendor; h++) { + /* First look for a router match */ + if (rt->rtr_vendor == h->vendor && h->probe(r, pirq_router_dev, rt->rtr_device)) + break; + /* Fall back to a device match */ + if (pirq_router_dev->vendor == h->vendor && h->probe(r, pirq_router_dev, pirq_router_dev->device)) break; - } - /* Match against router device entry? Use it as a fallback */ - if (r->vendor == pirq_router_dev->vendor && r->device == pirq_router_dev->device) { - pirq_router = r; - } } printk(KERN_INFO "PCI: Using IRQ router %s [%04x/%04x] at %s\n", - pirq_router->name, + pirq_router.name, pirq_router_dev->vendor, pirq_router_dev->device, pirq_router_dev->slot_name); @@ -572,7 +853,7 @@ int i, pirq, newirq; int irq = 0; u32 mask; - struct irq_router *r = pirq_router; + struct irq_router *r = &pirq_router; struct pci_dev *dev2; char *msg = NULL; @@ -685,17 +966,14 @@ void __init pcibios_irq_init(void) { DBG("PCI: IRQ init\n"); - if (broken_440gx_bios) - pirq_table = NULL; - else - pirq_table = pirq_find_routing_table(); + pirq_table = pirq_find_routing_table(); #ifdef CONFIG_PCI_BIOS if (!pirq_table && (pci_probe & PCI_BIOS_IRQ_SCAN)) pirq_table = pcibios_get_irq_routing_table(); #endif if (pirq_table) { pirq_peer_trick(); - pirq_find_router(); + pirq_find_router(&pirq_router); if (pirq_table->exclusive_irqs) { int i; for (i=0; i<16; i++) diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/i386/kernel/pci-pc.c linux-2.4.23-pre8/arch/i386/kernel/pci-pc.c --- linux-2.4.22/arch/i386/kernel/pci-pc.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/i386/kernel/pci-pc.c 2003-10-22 22:48:38.000000000 +0000 @@ -1016,7 +1016,8 @@ "xor %%ah, %%ah\n" "1:" : "=a" (ret), - "=b" (map) + "=b" (map), + "+m" (opt) : "0" (PCIBIOS_GET_ROUTING_OPTIONS), "1" (0), "D" ((long) &opt), @@ -1414,7 +1415,13 @@ return; } -int use_acpi_pci __initdata = 1; +static int use_acpi_pci __initdata = 1; + +__init void pci_disable_acpi(void) +{ + use_acpi_pci = 0; + return; +} void __init pcibios_init(void) { @@ -1427,6 +1434,8 @@ return; } + pcibios_set_cacheline_size(); + printk(KERN_INFO "PCI: Probing PCI hardware\n"); #ifdef CONFIG_ACPI_PCI if (use_acpi_pci && !acpi_pci_irq_init()) { @@ -1502,7 +1511,7 @@ pcibios_last_bus = simple_strtol(str+8, NULL, 0); return NULL; } else if (!strncmp(str, "noacpi", 6)) { - use_acpi_pci = 0; + pci_disable_acpi(); return NULL; } return str; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/i386/kernel/pci-visws.c linux-2.4.23-pre8/arch/i386/kernel/pci-visws.c --- linux-2.4.22/arch/i386/kernel/pci-visws.c 2002-11-28 23:53:09.000000000 +0000 +++ linux-2.4.23-pre8/arch/i386/kernel/pci-visws.c 2003-10-22 22:47:59.000000000 +0000 @@ -119,6 +119,7 @@ { unsigned int sec_bus = li_pcib_read16(LI_PCI_BUSNUM) & 0xff; + pcibios_set_cacheline_size(); printk("PCI: Probing PCI hardware on host buses 00 and %02x\n", sec_bus); pci_scan_bus(0, &visws_pci_ops, NULL); pci_scan_bus(sec_bus, &visws_pci_ops, NULL); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/i386/kernel/process.c linux-2.4.23-pre8/arch/i386/kernel/process.c --- linux-2.4.22/arch/i386/kernel/process.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/i386/kernel/process.c 2003-10-22 22:47:27.000000000 +0000 @@ -47,6 +47,7 @@ #ifdef CONFIG_MATH_EMULATION #include #endif +#include #include @@ -399,6 +400,14 @@ * other OSs see a clean IRQ state. */ smp_send_stop(); +#elif CONFIG_X86_LOCAL_APIC + if (cpu_has_apic) { + __cli(); + disable_local_APIC(); + __sti(); + } +#endif +#ifdef CONFIG_X86_IO_APIC disable_IO_APIC(); #endif diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/i386/kernel/setup.c linux-2.4.23-pre8/arch/i386/kernel/setup.c --- linux-2.4.22/arch/i386/kernel/setup.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/i386/kernel/setup.c 2003-10-22 22:48:54.000000000 +0000 @@ -120,6 +120,7 @@ #include #include #include +#include /* * Machine setup.. */ @@ -176,9 +177,9 @@ static u32 disabled_x86_caps[NCAPINTS] __initdata = { 0 }; #ifdef CONFIG_ACPI_INTERPRETER - int acpi_disabled __initdata = 0; + int acpi_disabled = 0; #else - int acpi_disabled __initdata = 1; + int acpi_disabled = 1; #endif EXPORT_SYMBOL(acpi_disabled); @@ -211,6 +212,8 @@ #define KERNEL_START (*(unsigned long *) (PARAM+0x214)) #define INITRD_START (*(unsigned long *) (PARAM+0x218)) #define INITRD_SIZE (*(unsigned long *) (PARAM+0x21c)) +#define EDD_NR (*(unsigned char *) (PARAM+EDDNR)) +#define EDD_BUF ((struct edd_info *) (PARAM+EDDBUF)) #define COMMAND_LINE ((char *) (PARAM+2048)) #define COMMAND_LINE_SIZE 256 @@ -715,6 +718,23 @@ return 0; } +#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE) +unsigned char eddnr; +struct edd_info edd[EDDMAXNR]; +/** + * copy_edd() - Copy the BIOS EDD information + * from empty_zero_page into a safe place. + * + */ +static inline void copy_edd(void) +{ + eddnr = EDD_NR; + memcpy(edd, EDD_BUF, sizeof(edd)); +} +#else +static inline void copy_edd(void) {} +#endif + /* * Do NOT EVER look at the BIOS memory size location. * It does not work on many machines. @@ -1151,6 +1171,7 @@ rd_doload = ((RAMDISK_FLAGS & RAMDISK_LOAD_FLAG) != 0); #endif setup_memory_region(); + copy_edd(); if (!MOUNT_ROOT_RDONLY) root_mountflags &= ~MS_RDONLY; @@ -1976,6 +1997,37 @@ #endif +static void __init init_c3(struct cpuinfo_x86 *c) +{ + u32 lo, hi; + + /* Test for Centaur Extended Feature Flags presence */ + if (cpuid_eax(0xC0000000) >= 0xC0000001) { + /* store Centaur Extended Feature Flags as + * word 5 of the CPU capability bit array + */ + c->x86_capability[5] = cpuid_edx(0xC0000001); + } + + switch (c->x86_model) { + case 6 ... 8: /* Cyrix III family */ + rdmsr (MSR_VIA_FCR, lo, hi); + lo |= (1<<1 | 1<<7); /* Report CX8 & enable PGE */ + wrmsr (MSR_VIA_FCR, lo, hi); + + set_bit(X86_FEATURE_CX8, c->x86_capability); + set_bit(X86_FEATURE_3DNOW, c->x86_capability); + + /* fall through */ + + case 9: /* Nehemiah */ + default: + get_model_name(c); + display_cacheinfo(c); + break; + } +} + static void __init init_centaur(struct cpuinfo_x86 *c) { enum { @@ -2114,23 +2166,7 @@ break; case 6: - switch (c->x86_model) { - case 6 ... 8: /* Cyrix III family */ - rdmsr (MSR_VIA_FCR, lo, hi); - lo |= (1<<1 | 1<<7); /* Report CX8 & enable PGE */ - wrmsr (MSR_VIA_FCR, lo, hi); - - set_bit(X86_FEATURE_CX8, &c->x86_capability); - set_bit(X86_FEATURE_3DNOW, &c->x86_capability); - - /* fall through */ - - case 9: /* Nehemiah */ - default: - get_model_name(c); - display_cacheinfo(c); - break; - } + init_c3(c); break; } } @@ -2254,6 +2290,8 @@ { 0x23, LVL_3, 1024 }, { 0x25, LVL_3, 2048 }, { 0x29, LVL_3, 4096 }, + { 0x2c, LVL_1_DATA, 32 }, + { 0x30, LVL_1_INST, 32 }, { 0x39, LVL_2, 128 }, { 0x3b, LVL_2, 128 }, { 0x3C, LVL_2, 256 }, @@ -2276,6 +2314,8 @@ { 0x83, LVL_2, 512 }, { 0x84, LVL_2, 1024 }, { 0x85, LVL_2, 2048 }, + { 0x86, LVL_2, 512 }, + { 0x87, LVL_2, 1024 }, { 0x00, 0, 0} }; @@ -2765,10 +2805,16 @@ /* Intel-defined flags: level 0x00000001 */ if ( c->cpuid_level >= 0x00000001 ) { - cpuid(0x00000001, &tfms, &junk, &junk, - &c->x86_capability[0]); + u32 capability, excap; + cpuid(0x00000001, &tfms, &junk, &excap, &capability); + c->x86_capability[0] = capability; + c->x86_capability[4] = excap; c->x86 = (tfms >> 8) & 15; c->x86_model = (tfms >> 4) & 15; + if (c->x86 == 0xf) { + c->x86 += (tfms >> 20) & 0xff; + c->x86_model += ((tfms >> 16) & 0xF) << 4; + } c->x86_mask = tfms & 15; } else { /* Have CPUID level 0 only - unheard of */ @@ -2972,12 +3018,12 @@ "fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce", "cx8", "apic", NULL, "sep", "mtrr", "pge", "mca", "cmov", "pat", "pse36", "pn", "clflush", NULL, "dts", "acpi", "mmx", - "fxsr", "sse", "sse2", "ss", "ht", "tm", "ia64", NULL, + "fxsr", "sse", "sse2", "ss", "ht", "tm", "ia64", "pbe", /* AMD-defined */ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "syscall", NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, "mmxext", NULL, + NULL, NULL, NULL, "mp", NULL, NULL, "mmxext", NULL, NULL, NULL, NULL, NULL, NULL, "lm", "3dnowext", "3dnow", /* Transmeta-defined */ @@ -2987,7 +3033,20 @@ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* Other (Linux-defined) */ - "cxmmx", "k6_mtrr", "cyrix_arr", "centaur_mcr", NULL, NULL, NULL, NULL, + "cxmmx", "k6_mtrr", "cyrix_arr", "centaur_mcr", + NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + + /* Intel-defined (#2) */ + "pni", NULL, NULL, "monitor", "ds_cpl", NULL, NULL, "tm2", + "est", NULL, "cid", NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + + /* VIA/Cyrix/Centaur-defined */ + NULL, NULL, "xstore", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/i386/kernel/smpboot.c linux-2.4.23-pre8/arch/i386/kernel/smpboot.c --- linux-2.4.22/arch/i386/kernel/smpboot.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/i386/kernel/smpboot.c 2003-10-22 22:48:54.000000000 +0000 @@ -51,7 +51,7 @@ static int smp_b_stepping; /* Setup configured maximum number of CPUs to activate */ -static int max_cpus = -1; +static int max_cpus = NR_CPUS; /* Total count of live CPUs */ int smp_num_cpus = 1; @@ -1116,7 +1116,7 @@ if (!(phys_cpu_present_map & (1ul << bit))) continue; - if ((max_cpus >= 0) && (max_cpus <= cpucount+1)) + if (max_cpus <= cpucount+1) continue; do_boot_cpu(apicid); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/i386/mm/ioremap.c linux-2.4.23-pre8/arch/i386/mm/ioremap.c --- linux-2.4.22/arch/i386/mm/ioremap.c 2002-08-03 00:39:42.000000000 +0000 +++ linux-2.4.23-pre8/arch/i386/mm/ioremap.c 2003-10-22 22:48:15.000000000 +0000 @@ -140,7 +140,7 @@ */ offset = phys_addr & ~PAGE_MASK; phys_addr &= PAGE_MASK; - size = PAGE_ALIGN(last_addr) - phys_addr; + size = PAGE_ALIGN(last_addr+1) - phys_addr; /* * Ok, go for it.. diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/Makefile linux-2.4.23-pre8/arch/ia64/Makefile --- linux-2.4.22/arch/ia64/Makefile 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/Makefile 2003-10-22 22:47:36.000000000 +0000 @@ -17,13 +17,31 @@ AFLAGS_KERNEL := -mconstant-gp EXTRA = -CFLAGS := $(CFLAGS) -pipe $(EXTRA) -ffixed-r13 -mfixed-range=f10-f15,f32-f127 \ +CFLAGS := $(CFLAGS) -pipe $(EXTRA) -ffixed-r13 -mfixed-range=f12-f15,f32-f127 \ -falign-functions=32 # -ffunction-sections CFLAGS_KERNEL := -mconstant-gp GCC_VERSION=$(shell $(CC) -v 2>&1 | fgrep 'gcc version' | cut -f3 -d' ' | cut -f1 -d'.') +CHECK_GAS_FOR_HINT=arch/ia64/scripts/check_gas_for_hint.o +MAKE_GAS_HINT_TEST=arch/ia64/scripts/make_gas_hint_test + +ifneq (, $(shell ls $(CHECK_GAS_FOR_HINT))) +$(shell rm $(CHECK_GAS_FOR_HINT)) +endif + +CHECK_GAS_CMD:=($(CC) $(MAKE_GAS_HINT_TEST).c -o $(MAKE_GAS_HINT_TEST) && $(MAKE_GAS_HINT_TEST) | $(CC) -c -o $(CHECK_GAS_FOR_HINT) -x assembler -; rm -f $(MAKE_GAS_HINT_TEST))>&/dev/null +$(shell $(CHECK_GAS_CMD)) +ifneq (, $(shell ls $(CHECK_GAS_FOR_HINT))) +#Newer version of binutil is detected and "hint" instruction is in the kernel +$(warning Warning: Found binutils that supports hint instruction) +FLAGS := $(AFLAGS) -DGAS_HAS_HINT_INSN +CFLAGS := $(CFLAGS) -DGAS_HAS_HINT_INSN +else +$(warning Warning: Please use binutil version 2.14.90.0.4.1 or higher to get the support of hint instruction in kernel.) +endif + ifneq ($(GCC_VERSION),2) CFLAGS += -frename-registers --param max-inline-insns=5000 endif @@ -44,9 +62,11 @@ ifdef CONFIG_IA64_HP_SIM SUBDIRS := arch/$(ARCH)/hp \ + arch/$(ARCH)/drivers \ $(SUBDIRS) CORE_FILES := arch/$(ARCH)/hp/hp.o \ $(CORE_FILES) + DRIVERS += arch/$(ARCH)/drivers/drivers.o endif ifdef CONFIG_IA64_HP_ZX1 @@ -136,7 +156,7 @@ arch/ia64/scripts/unwcheck.sh vmlinux archmrproper: - rm -f arch/$(ARCH)/vmlinux.lds + rm -f arch/$(ARCH)/vmlinux.lds vmlinux-tmp vmlinux.gz @$(MAKE) -C arch/$(ARCH)/tools mrproper archdep: diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/config.in linux-2.4.23-pre8/arch/ia64/config.in --- linux-2.4.22/arch/ia64/config.in 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/config.in 2003-10-22 22:48:57.000000000 +0000 @@ -35,7 +35,6 @@ DIG-compliant CONFIG_IA64_DIG \ HP-simulator CONFIG_IA64_HP_SIM \ HP-zx1 CONFIG_IA64_HP_ZX1 \ - SGI-SN1 CONFIG_IA64_SGI_SN1 \ SGI-SN2 CONFIG_IA64_SGI_SN2" generic if [ "$CONFIG_ITANIUM" = "y" ]; then @@ -54,11 +53,7 @@ if [ "$CONFIG_ITANIUM" = "y" ]; then define_bool CONFIG_IA64_BRL_EMU y bool ' Enable Itanium B-step specific code' CONFIG_ITANIUM_BSTEP_SPECIFIC - if [ "$CONFIG_IA64_SGI_SN1" = "y" ]; then - define_int CONFIG_IA64_L1_CACHE_SHIFT 7 # align cache-sensitive data to 128 bytes - else - define_int CONFIG_IA64_L1_CACHE_SHIFT 6 # align cache-sensitive data to 64 bytes - fi + define_int CONFIG_IA64_L1_CACHE_SHIFT 6 # align cache-sensitive data to 64 bytes fi if [ "$CONFIG_MCKINLEY" = "y" ]; then @@ -66,17 +61,20 @@ fi if [ "$CONFIG_IA64_GENERIC" = "y" -o "$CONFIG_IA64_DIG" = "y" -o "$CONFIG_IA64_HP_ZX1" = "y" ]; then + bool ' Enable NUMA support' CONFIG_NUMA + if [ "$CONFIG_NUMA" = "y" ]; then + define_bool CONFIG_DISCONTIGMEM y + fi bool ' Enable IA-64 Machine Check Abort' CONFIG_IA64_MCA define_bool CONFIG_PM y fi -if [ "$CONFIG_IA64_SGI_SN1" = "y" -o "$CONFIG_IA64_SGI_SN2" = "y" ]; then +if [ "$CONFIG_IA64_SGI_SN2" = "y" ]; then define_bool CONFIG_IA64_SGI_SN y bool ' Enable extra debugging code' CONFIG_IA64_SGI_SN_DEBUG bool ' Enable SGI Medusa Simulator Support' CONFIG_IA64_SGI_SN_SIM - bool ' Enable autotest (llsc). Option to run cache test instead of booting' \ - CONFIG_IA64_SGI_AUTOTEST bool ' Enable protocol mode for the L1 console' CONFIG_SERIAL_SGI_L1_PROTOCOL + define_bool CONFIG_HWGFS_FS y define_bool CONFIG_DISCONTIGMEM y define_bool CONFIG_IA64_MCA y define_bool CONFIG_NUMA y @@ -86,7 +84,12 @@ define_bool CONFIG_KCORE_ELF y # On IA-64, we always want an ELF /proc/kcore. +bool 'Use PAL_HALT_LIGHT in idle loop' CONFIG_IA64_PAL_IDLE bool 'SMP support' CONFIG_SMP +if [ "$CONFIG_SMP" = "y" ]; then + int 'Maximum number of CPUs (2-32)' CONFIG_NR_CPUS 32 +fi + tristate 'Support running of Linux/x86 binaries' CONFIG_IA32_SUPPORT bool 'Performance monitor support' CONFIG_PERFMON tristate '/proc/pal support' CONFIG_IA64_PALINFO @@ -290,4 +293,6 @@ bool ' Turn on irq debug checks (slow!)' CONFIG_IA64_DEBUG_IRQ fi +int 'Kernel messages buffer length shift (0 = default)' CONFIG_LOG_BUF_SHIFT 0 + endmenu diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/configs/dig linux-2.4.23-pre8/arch/ia64/configs/dig --- linux-2.4.22/arch/ia64/configs/dig 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/configs/dig 2003-10-22 22:49:06.000000000 +0000 @@ -38,6 +38,7 @@ CONFIG_IA64_BRL_EMU=y # CONFIG_ITANIUM_BSTEP_SPECIFIC is not set CONFIG_IA64_L1_CACHE_SHIFT=6 +# CONFIG_NUMA is not set CONFIG_IA64_MCA=y CONFIG_PM=y CONFIG_KCORE_ELF=y @@ -49,6 +50,7 @@ # CONFIG_HUGETLB_PAGE_SIZE_4MB is not set # CONFIG_HUGETLB_PAGE_SIZE_1MB is not set # CONFIG_HUGETLB_PAGE_SIZE_256KB is not set +# CONFIG_IA64_PAL_IDLE is not set CONFIG_SMP=y CONFIG_IA32_SUPPORT=y CONFIG_PERFMON=y @@ -270,7 +272,6 @@ # CONFIG_BLK_DEV_PDC202XX_OLD is not set # CONFIG_PDC202XX_BURST is not set # CONFIG_BLK_DEV_PDC202XX_NEW is not set -# CONFIG_PDC202XX_FORCE is not set # CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_SC1200 is not set # CONFIG_BLK_DEV_SVWKS is not set @@ -329,6 +330,9 @@ CONFIG_AIC7XXX_RESET_DELAY_MS=15000 # CONFIG_AIC7XXX_PROBE_EISA_VL is not set # CONFIG_AIC7XXX_BUILD_FIRMWARE is not set +# CONFIG_AIC7XXX_DEBUG_ENABLE is not set +CONFIG_AIC7XXX_DEBUG_MASK=0 +# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set # CONFIG_SCSI_AIC79XX is not set # CONFIG_SCSI_DPT_I2O is not set # CONFIG_SCSI_ADVANSYS is not set @@ -406,6 +410,7 @@ # CONFIG_AMD8111_ETH is not set # CONFIG_ADAPTEC_STARFIRE is not set # CONFIG_APRICOT is not set +# CONFIG_B44 is not set # CONFIG_CS89x0 is not set CONFIG_TULIP=y # CONFIG_TULIP_MWI is not set @@ -445,6 +450,7 @@ # CONFIG_ACENIC is not set # CONFIG_DL2K is not set CONFIG_E1000=y +# CONFIG_E1000_NAPI is not set # CONFIG_MYRI_SBUS is not set # CONFIG_NS83820 is not set # CONFIG_HAMACHI is not set @@ -656,6 +662,7 @@ # File systems # # CONFIG_QUOTA is not set +# CONFIG_QFMT_V2 is not set CONFIG_AUTOFS_FS=y # CONFIG_AUTOFS4_FS is not set # CONFIG_REISERFS_FS is not set @@ -665,6 +672,7 @@ # CONFIG_ADFS_FS_RW is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set # CONFIG_BEFS_FS is not set # CONFIG_BEFS_DEBUG is not set # CONFIG_BFS_FS is not set @@ -715,6 +723,7 @@ # CONFIG_INTERMEZZO_FS is not set CONFIG_NFS_FS=y CONFIG_NFS_V3=y +# CONFIG_NFS_DIRECTIO is not set # CONFIG_ROOT_NFS is not set CONFIG_NFSD=y CONFIG_NFSD_V3=y @@ -916,6 +925,7 @@ # CONFIG_USB_RTL8150 is not set # CONFIG_USB_KAWETH is not set # CONFIG_USB_CATC is not set +# CONFIG_USB_AX8817X is not set # CONFIG_USB_CDCETHER is not set # CONFIG_USB_USBNET is not set @@ -939,8 +949,14 @@ # CONFIG_USB_LCD is not set # +# Cryptographic options +# +# CONFIG_CRYPTO is not set + +# # Library routines # +# CONFIG_CRC32 is not set # CONFIG_ZLIB_INFLATE is not set # CONFIG_ZLIB_DEFLATE is not set diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/configs/generic linux-2.4.23-pre8/arch/ia64/configs/generic --- linux-2.4.22/arch/ia64/configs/generic 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/configs/generic 2003-10-22 22:47:39.000000000 +0000 @@ -38,6 +38,7 @@ CONFIG_IA64_BRL_EMU=y # CONFIG_ITANIUM_BSTEP_SPECIFIC is not set CONFIG_IA64_L1_CACHE_SHIFT=6 +# CONFIG_NUMA is not set CONFIG_IA64_MCA=y CONFIG_PM=y CONFIG_KCORE_ELF=y @@ -49,6 +50,7 @@ # CONFIG_HUGETLB_PAGE_SIZE_4MB is not set # CONFIG_HUGETLB_PAGE_SIZE_1MB is not set # CONFIG_HUGETLB_PAGE_SIZE_256KB is not set +# CONFIG_IA64_PAL_IDLE is not set CONFIG_SMP=y CONFIG_IA32_SUPPORT=y CONFIG_PERFMON=y @@ -270,7 +272,6 @@ # CONFIG_BLK_DEV_PDC202XX_OLD is not set # CONFIG_PDC202XX_BURST is not set # CONFIG_BLK_DEV_PDC202XX_NEW is not set -# CONFIG_PDC202XX_FORCE is not set # CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_SC1200 is not set # CONFIG_BLK_DEV_SVWKS is not set @@ -329,6 +330,9 @@ CONFIG_AIC7XXX_RESET_DELAY_MS=15000 # CONFIG_AIC7XXX_PROBE_EISA_VL is not set # CONFIG_AIC7XXX_BUILD_FIRMWARE is not set +# CONFIG_AIC7XXX_DEBUG_ENABLE is not set +CONFIG_AIC7XXX_DEBUG_MASK=0 +# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set # CONFIG_SCSI_AIC79XX is not set # CONFIG_SCSI_DPT_I2O is not set # CONFIG_SCSI_ADVANSYS is not set @@ -411,6 +415,7 @@ # CONFIG_AMD8111_ETH is not set # CONFIG_ADAPTEC_STARFIRE is not set # CONFIG_APRICOT is not set +# CONFIG_B44 is not set # CONFIG_CS89x0 is not set CONFIG_TULIP=y # CONFIG_TULIP_MWI is not set @@ -450,6 +455,7 @@ # CONFIG_ACENIC is not set # CONFIG_DL2K is not set CONFIG_E1000=y +# CONFIG_E1000_NAPI is not set # CONFIG_MYRI_SBUS is not set # CONFIG_NS83820 is not set # CONFIG_HAMACHI is not set @@ -661,6 +667,7 @@ # File systems # # CONFIG_QUOTA is not set +# CONFIG_QFMT_V2 is not set CONFIG_AUTOFS_FS=y # CONFIG_AUTOFS4_FS is not set # CONFIG_REISERFS_FS is not set @@ -670,6 +677,7 @@ # CONFIG_ADFS_FS_RW is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set # CONFIG_BEFS_FS is not set # CONFIG_BEFS_DEBUG is not set # CONFIG_BFS_FS is not set @@ -720,6 +728,7 @@ # CONFIG_INTERMEZZO_FS is not set CONFIG_NFS_FS=y CONFIG_NFS_V3=y +# CONFIG_NFS_DIRECTIO is not set # CONFIG_ROOT_NFS is not set CONFIG_NFSD=y CONFIG_NFSD_V3=y @@ -921,6 +930,7 @@ # CONFIG_USB_RTL8150 is not set # CONFIG_USB_KAWETH is not set # CONFIG_USB_CATC is not set +# CONFIG_USB_AX8817X is not set # CONFIG_USB_CDCETHER is not set # CONFIG_USB_USBNET is not set @@ -944,8 +954,14 @@ # CONFIG_USB_LCD is not set # +# Cryptographic options +# +# CONFIG_CRYPTO is not set + +# # Library routines # +# CONFIG_CRC32 is not set # CONFIG_ZLIB_INFLATE is not set # CONFIG_ZLIB_DEFLATE is not set diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/configs/numa linux-2.4.23-pre8/arch/ia64/configs/numa --- linux-2.4.22/arch/ia64/configs/numa 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/configs/numa 2003-10-22 22:49:03.000000000 +0000 @@ -0,0 +1,998 @@ +# +# Automatically generated make config: don't edit +# + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y + +# +# Loadable module support +# +CONFIG_MODULES=y +CONFIG_MODVERSIONS=y +# CONFIG_KMOD is not set + +# +# General setup +# +CONFIG_IA64=y +# CONFIG_ISA is not set +# CONFIG_EISA is not set +# CONFIG_MCA is not set +# CONFIG_SBUS is not set +# CONFIG_RWSEM_GENERIC_SPINLOCK is not set +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_ITANIUM=y +# CONFIG_MCKINLEY is not set +CONFIG_IA64_GENERIC=y +# CONFIG_IA64_DIG is not set +# CONFIG_IA64_HP_SIM is not set +# CONFIG_IA64_HP_ZX1 is not set +# CONFIG_IA64_SGI_SN1 is not set +# CONFIG_IA64_SGI_SN2 is not set +# CONFIG_IA64_PAGE_SIZE_4KB is not set +# CONFIG_IA64_PAGE_SIZE_8KB is not set +CONFIG_IA64_PAGE_SIZE_16KB=y +CONFIG_IA64_BRL_EMU=y +# CONFIG_ITANIUM_BSTEP_SPECIFIC is not set +CONFIG_IA64_L1_CACHE_SHIFT=6 +CONFIG_NUMA=y +CONFIG_DISCONTIGMEM=y +CONFIG_IA64_MCA=y +CONFIG_PM=y +CONFIG_KCORE_ELF=y +CONFIG_FORCE_MAX_ZONEORDER=19 +CONFIG_HUGETLB_PAGE=y +# CONFIG_HUGETLB_PAGE_SIZE_256MB is not set +# CONFIG_HUGETLB_PAGE_SIZE_64MB is not set +CONFIG_HUGETLB_PAGE_SIZE_16MB=y +# CONFIG_HUGETLB_PAGE_SIZE_4MB is not set +# CONFIG_HUGETLB_PAGE_SIZE_1MB is not set +# CONFIG_HUGETLB_PAGE_SIZE_256KB is not set +CONFIG_IA64_PAL_IDLE=y +CONFIG_SMP=y +CONFIG_IA32_SUPPORT=y +CONFIG_PERFMON=y +CONFIG_IA64_PALINFO=y +CONFIG_EFI_VARS=y +CONFIG_NET=y +CONFIG_SYSVIPC=y +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +CONFIG_ACPI=y +CONFIG_ACPI_EFI=y +CONFIG_ACPI_INTERPRETER=y +CONFIG_ACPI_KERNEL_CONFIG=y + +# +# ACPI Support +# +CONFIG_ACPI_PCI=y +CONFIG_ACPI=y +CONFIG_ACPI_EFI=y +CONFIG_ACPI_BOOT=y +CONFIG_ACPI_BUS=y +CONFIG_ACPI_INTERPRETER=y +CONFIG_ACPI_POWER=y +CONFIG_ACPI_SYSTEM=y +# CONFIG_ACPI_BUTTON is not set +# CONFIG_ACPI_FAN is not set +# CONFIG_ACPI_PROCESSOR is not set +# CONFIG_ACPI_THERMAL is not set +CONFIG_ACPI_NUMA=y +# CONFIG_ACPI_DEBUG is not set +CONFIG_PCI=y +CONFIG_PCI_NAMES=y +# CONFIG_HOTPLUG is not set +# CONFIG_PCMCIA is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set + +# +# Networking options +# +CONFIG_PACKET=y +CONFIG_PACKET_MMAP=y +# CONFIG_NETLINK_DEV is not set +# CONFIG_NETFILTER is not set +CONFIG_FILTER=y +CONFIG_UNIX=y +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +# CONFIG_IP_PNP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_ARPD is not set +# CONFIG_INET_ECN is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_IPV6 is not set +# CONFIG_KHTTPD is not set +# CONFIG_ATM is not set +# CONFIG_VLAN_8021Q is not set + +# +# +# +# CONFIG_IPX is not set +# CONFIG_ATALK is not set + +# +# Appletalk devices +# +# CONFIG_DEV_APPLETALK is not set +# CONFIG_DECNET is not set +# CONFIG_BRIDGE is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_LLC is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_FASTROUTE is not set +# CONFIG_NET_HW_FLOWCONTROL is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Plug and Play configuration +# +# CONFIG_PNP is not set +# CONFIG_ISAPNP is not set + +# +# Block devices +# +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_XD is not set +# CONFIG_PARIDE is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_CISS_SCSI_TAPE is not set +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_UMEM is not set +CONFIG_BLK_DEV_LOOP=y +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_RAM is not set +# CONFIG_BLK_DEV_INITRD is not set +# CONFIG_BLK_STATS is not set + +# +# IEEE 1394 (FireWire) support (EXPERIMENTAL) +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set +# CONFIG_I2O_PCI is not set +# CONFIG_I2O_BLOCK is not set +# CONFIG_I2O_LAN is not set +# CONFIG_I2O_SCSI is not set +# CONFIG_I2O_PROC is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set +# CONFIG_BLK_DEV_MD is not set +# CONFIG_MD_LINEAR is not set +# CONFIG_MD_RAID0 is not set +# CONFIG_MD_RAID1 is not set +# CONFIG_MD_RAID5 is not set +# CONFIG_MD_MULTIPATH is not set +# CONFIG_BLK_DEV_LVM is not set + +# +# Fusion MPT device support +# +CONFIG_FUSION=y +CONFIG_FUSION_BOOT=y +CONFIG_FUSION_MAX_SGE=40 +# CONFIG_FUSION_ISENSE is not set +# CONFIG_FUSION_CTL is not set +# CONFIG_FUSION_LAN is not set + +# +# ATA/IDE/MFM/RLL support +# +CONFIG_IDE=y + +# +# IDE, ATA and ATAPI Block devices +# +CONFIG_BLK_DEV_IDE=y + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +# CONFIG_BLK_DEV_HD_IDE is not set +# CONFIG_BLK_DEV_HD is not set +CONFIG_BLK_DEV_IDEDISK=y +CONFIG_IDEDISK_MULTI_MODE=y +# CONFIG_IDEDISK_STROKE is not set +# CONFIG_BLK_DEV_IDECS is not set +CONFIG_BLK_DEV_IDECD=y +# CONFIG_BLK_DEV_IDETAPE is not set +CONFIG_BLK_DEV_IDEFLOPPY=y +CONFIG_BLK_DEV_IDESCSI=y +# CONFIG_IDE_TASK_IOCTL is not set + +# +# IDE chipset support/bugfixes +# +# CONFIG_BLK_DEV_CMD640 is not set +# CONFIG_BLK_DEV_CMD640_ENHANCED is not set +# CONFIG_BLK_DEV_ISAPNP is not set +CONFIG_BLK_DEV_IDEPCI=y +# CONFIG_BLK_DEV_GENERIC is not set +CONFIG_IDEPCI_SHARE_IRQ=y +CONFIG_BLK_DEV_IDEDMA_PCI=y +# CONFIG_BLK_DEV_OFFBOARD is not set +# CONFIG_BLK_DEV_IDEDMA_FORCED is not set +# CONFIG_IDEDMA_PCI_AUTO is not set +# CONFIG_IDEDMA_ONLYDISK is not set +CONFIG_BLK_DEV_IDEDMA=y +# CONFIG_IDEDMA_PCI_WIP is not set +# CONFIG_BLK_DEV_ADMA100 is not set +# CONFIG_BLK_DEV_AEC62XX is not set +# CONFIG_BLK_DEV_ALI15X3 is not set +# CONFIG_WDC_ALI15X3 is not set +# CONFIG_BLK_DEV_AMD74XX is not set +# CONFIG_AMD74XX_OVERRIDE is not set +CONFIG_BLK_DEV_CMD64X=y +# CONFIG_BLK_DEV_TRIFLEX is not set +# CONFIG_BLK_DEV_CY82C693 is not set +# CONFIG_BLK_DEV_CS5530 is not set +# CONFIG_BLK_DEV_HPT34X is not set +# CONFIG_HPT34X_AUTODMA is not set +# CONFIG_BLK_DEV_HPT366 is not set +CONFIG_BLK_DEV_PIIX=y +# CONFIG_BLK_DEV_NS87415 is not set +# CONFIG_BLK_DEV_OPTI621 is not set +# CONFIG_BLK_DEV_PDC202XX_OLD is not set +# CONFIG_PDC202XX_BURST is not set +# CONFIG_BLK_DEV_PDC202XX_NEW is not set +# CONFIG_BLK_DEV_RZ1000 is not set +# CONFIG_BLK_DEV_SC1200 is not set +# CONFIG_BLK_DEV_SVWKS is not set +# CONFIG_BLK_DEV_SIIMAGE is not set +# CONFIG_BLK_DEV_SIS5513 is not set +# CONFIG_BLK_DEV_SLC90E66 is not set +# CONFIG_BLK_DEV_TRM290 is not set +# CONFIG_BLK_DEV_VIA82CXXX is not set +# CONFIG_IDE_CHIPSETS is not set +# CONFIG_IDEDMA_AUTO is not set +# CONFIG_IDEDMA_IVB is not set +# CONFIG_DMA_NONPCI is not set +CONFIG_BLK_DEV_IDE_MODES=y +# CONFIG_BLK_DEV_ATARAID is not set +# CONFIG_BLK_DEV_ATARAID_PDC is not set +# CONFIG_BLK_DEV_ATARAID_HPT is not set +# CONFIG_BLK_DEV_ATARAID_SII is not set + +# +# SCSI support +# +CONFIG_SCSI=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +CONFIG_SD_EXTRA_DEVS=40 +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=y +# CONFIG_BLK_DEV_SR_VENDOR is not set +CONFIG_SR_EXTRA_DEVS=2 +CONFIG_CHR_DEV_SG=y + +# +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs +# +CONFIG_SCSI_DEBUG_QUEUES=y +# CONFIG_SCSI_MULTI_LUN is not set +CONFIG_SCSI_CONSTANTS=y +CONFIG_SCSI_LOGGING=y + +# +# SCSI low-level drivers +# +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set +# CONFIG_SCSI_7000FASST is not set +# CONFIG_SCSI_ACARD is not set +# CONFIG_SCSI_AHA152X is not set +# CONFIG_SCSI_AHA1542 is not set +# CONFIG_SCSI_AHA1740 is not set +# CONFIG_SCSI_AACRAID is not set +CONFIG_SCSI_AIC7XXX=y +CONFIG_AIC7XXX_CMDS_PER_DEVICE=253 +CONFIG_AIC7XXX_RESET_DELAY_MS=15000 +# CONFIG_AIC7XXX_PROBE_EISA_VL is not set +# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set +# CONFIG_AIC7XXX_DEBUG_ENABLE is not set +CONFIG_AIC7XXX_DEBUG_MASK=0 +# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set +# CONFIG_SCSI_AIC79XX is not set +# CONFIG_SCSI_DPT_I2O is not set +# CONFIG_SCSI_ADVANSYS is not set +# CONFIG_SCSI_IN2000 is not set +# CONFIG_SCSI_AM53C974 is not set +# CONFIG_SCSI_MEGARAID is not set +# CONFIG_SCSI_BUSLOGIC is not set +# CONFIG_SCSI_CPQFCTS is not set +# CONFIG_SCSI_DMX3191D is not set +# CONFIG_SCSI_DTC3280 is not set +# CONFIG_SCSI_EATA is not set +# CONFIG_SCSI_EATA_DMA is not set +# CONFIG_SCSI_EATA_PIO is not set +# CONFIG_SCSI_FUTURE_DOMAIN is not set +# CONFIG_SCSI_GDTH is not set +# CONFIG_SCSI_GENERIC_NCR5380 is not set +# CONFIG_SCSI_INITIO is not set +# CONFIG_SCSI_INIA100 is not set +# CONFIG_SCSI_NCR53C406A is not set +# CONFIG_SCSI_NCR53C7xx is not set +# CONFIG_SCSI_SYM53C8XX_2 is not set +# CONFIG_SCSI_NCR53C8XX is not set +CONFIG_SCSI_SYM53C8XX=y +CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=8 +CONFIG_SCSI_NCR53C8XX_MAX_TAGS=32 +CONFIG_SCSI_NCR53C8XX_SYNC=20 +# CONFIG_SCSI_NCR53C8XX_PROFILE is not set +# CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set +# CONFIG_SCSI_NCR53C8XX_PQS_PDS is not set +# CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT is not set +# CONFIG_SCSI_PAS16 is not set +# CONFIG_SCSI_PCI2000 is not set +# CONFIG_SCSI_PCI2220I is not set +# CONFIG_SCSI_PSI240I is not set +# CONFIG_SCSI_QLOGIC_FAS is not set +# CONFIG_SCSI_QLOGIC_ISP is not set +# CONFIG_SCSI_QLOGIC_FC is not set +CONFIG_SCSI_QLOGIC_1280=y +# CONFIG_SCSI_QLOGIC_QLA2100 is not set +# CONFIG_SCSI_SIM710 is not set +# CONFIG_SCSI_SYM53C416 is not set +# CONFIG_SCSI_DC390T is not set +# CONFIG_SCSI_T128 is not set +# CONFIG_SCSI_U14_34F is not set +# CONFIG_SCSI_NSP32 is not set +# CONFIG_SCSI_DEBUG is not set + +# +# Network device support +# +CONFIG_NETDEVICES=y + +# +# ARCnet devices +# +# CONFIG_ARCNET is not set +CONFIG_DUMMY=y +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set +# CONFIG_ETHERTAP is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +# CONFIG_SUNLANCE is not set +# CONFIG_HAPPYMEAL is not set +# CONFIG_SUNBMAC is not set +# CONFIG_SUNQE is not set +# CONFIG_SUNGEM is not set +# CONFIG_NET_VENDOR_3COM is not set +# CONFIG_LANCE is not set +# CONFIG_NET_VENDOR_SMC is not set +# CONFIG_NET_VENDOR_RACAL is not set +# CONFIG_HP100 is not set +# CONFIG_NET_ISA is not set +CONFIG_NET_PCI=y +# CONFIG_PCNET32 is not set +# CONFIG_AMD8111_ETH is not set +# CONFIG_ADAPTEC_STARFIRE is not set +# CONFIG_APRICOT is not set +# CONFIG_B44 is not set +# CONFIG_CS89x0 is not set +CONFIG_TULIP=y +# CONFIG_TULIP_MWI is not set +# CONFIG_TULIP_MMIO is not set +# CONFIG_DE4X5 is not set +# CONFIG_DGRS is not set +# CONFIG_DM9102 is not set +CONFIG_EEPRO100=y +# CONFIG_EEPRO100_PIO is not set +# CONFIG_E100 is not set +# CONFIG_LNE390 is not set +# CONFIG_FEALNX is not set +# CONFIG_NATSEMI is not set +# CONFIG_NE2K_PCI is not set +# CONFIG_NE3210 is not set +# CONFIG_ES3210 is not set +# CONFIG_8139CP is not set +# CONFIG_8139TOO is not set +# CONFIG_8139TOO_PIO is not set +# CONFIG_8139TOO_TUNE_TWISTER is not set +# CONFIG_8139TOO_8129 is not set +# CONFIG_8139_OLD_RX_RESET is not set +# CONFIG_SIS900 is not set +# CONFIG_EPIC100 is not set +# CONFIG_SUNDANCE is not set +# CONFIG_SUNDANCE_MMIO is not set +# CONFIG_TLAN is not set +# CONFIG_TC35815 is not set +# CONFIG_VIA_RHINE is not set +# CONFIG_VIA_RHINE_MMIO is not set +# CONFIG_WINBOND_840 is not set +# CONFIG_NET_POCKET is not set + +# +# Ethernet (1000 Mbit) +# +# CONFIG_ACENIC is not set +# CONFIG_DL2K is not set +CONFIG_E1000=y +# CONFIG_E1000_NAPI is not set +# CONFIG_MYRI_SBUS is not set +# CONFIG_NS83820 is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set +# CONFIG_R8169 is not set +# CONFIG_SK98LIN is not set +CONFIG_TIGON3=y +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PLIP is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Token Ring devices +# +# CONFIG_TR is not set +# CONFIG_NET_FC is not set +# CONFIG_RCPCI is not set +# CONFIG_SHAPER is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set + +# +# Amateur Radio support +# +# CONFIG_HAMRADIO is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# CD-ROM drivers (not for SCSI or IDE/ATAPI drives) +# +# CONFIG_CD_NO_IDESCSI is not set + +# +# Input core support +# +CONFIG_INPUT=y +CONFIG_INPUT_KEYBDEV=y +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_EVDEV=y + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_SERIAL=y +CONFIG_SERIAL_CONSOLE=y +CONFIG_SERIAL_HCDP=y +CONFIG_SERIAL_ACPI=y +# CONFIG_SERIAL_EXTENDED is not set +# CONFIG_SERIAL_NONSTANDARD is not set +CONFIG_UNIX98_PTYS=y +CONFIG_UNIX98_PTY_COUNT=256 + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Mice +# +# CONFIG_BUSMOUSE is not set +CONFIG_MOUSE=y +CONFIG_PSMOUSE=y +# CONFIG_82C710_MOUSE is not set +# CONFIG_PC110_PAD is not set +# CONFIG_MK712_MOUSE is not set + +# +# Joysticks +# +# CONFIG_INPUT_GAMEPORT is not set +# CONFIG_INPUT_NS558 is not set +# CONFIG_INPUT_LIGHTNING is not set +# CONFIG_INPUT_PCIGAME is not set +# CONFIG_INPUT_CS461X is not set +# CONFIG_INPUT_EMU10K1 is not set +CONFIG_INPUT_SERIO=y +CONFIG_INPUT_SERPORT=y + +# +# Joysticks +# +# CONFIG_INPUT_ANALOG is not set +# CONFIG_INPUT_A3D is not set +# CONFIG_INPUT_ADI is not set +# CONFIG_INPUT_COBRA is not set +# CONFIG_INPUT_GF2K is not set +# CONFIG_INPUT_GRIP is not set +# CONFIG_INPUT_INTERACT is not set +# CONFIG_INPUT_TMDC is not set +# CONFIG_INPUT_SIDEWINDER is not set +# CONFIG_INPUT_IFORCE_USB is not set +# CONFIG_INPUT_IFORCE_232 is not set +# CONFIG_INPUT_WARRIOR is not set +# CONFIG_INPUT_MAGELLAN is not set +# CONFIG_INPUT_SPACEORB is not set +# CONFIG_INPUT_SPACEBALL is not set +# CONFIG_INPUT_STINGER is not set +# CONFIG_INPUT_DB9 is not set +# CONFIG_INPUT_GAMECON is not set +# CONFIG_INPUT_TURBOGRAFX is not set +# CONFIG_QIC02_TAPE is not set +# CONFIG_IPMI_HANDLER is not set +# CONFIG_IPMI_PANIC_EVENT is not set +# CONFIG_IPMI_DEVICE_INTERFACE is not set +# CONFIG_IPMI_KCS is not set +# CONFIG_IPMI_WATCHDOG is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_SCx200_GPIO is not set +# CONFIG_INTEL_RNG is not set +# CONFIG_AMD_PM768 is not set +# CONFIG_NVRAM is not set +# CONFIG_RTC is not set +CONFIG_EFI_RTC=y +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_FTAPE is not set +CONFIG_AGP=y +# CONFIG_AGP_INTEL is not set +# CONFIG_AGP_I810 is not set +# CONFIG_AGP_VIA is not set +# CONFIG_AGP_AMD is not set +# CONFIG_AGP_AMD_8151 is not set +# CONFIG_AGP_SIS is not set +# CONFIG_AGP_ALI is not set +# CONFIG_AGP_SWORKS is not set +CONFIG_AGP_I460=y +CONFIG_AGP_HP_ZX1=y +CONFIG_DRM=y +# CONFIG_DRM_OLD is not set + +# +# DRM 4.1 drivers +# +CONFIG_DRM_NEW=y +# CONFIG_DRM_TDFX is not set +CONFIG_DRM_R128=y +CONFIG_DRM_RADEON=y +# CONFIG_DRM_I810 is not set +# CONFIG_DRM_I810_XFREE_41 is not set +# CONFIG_DRM_I830 is not set +# CONFIG_DRM_MGA is not set +# CONFIG_DRM_SIS is not set + +# +# Multimedia devices +# +CONFIG_VIDEO_DEV=y + +# +# Video For Linux +# +CONFIG_VIDEO_PROC_FS=y +# CONFIG_I2C_PARPORT is not set + +# +# Video Adapters +# +# CONFIG_VIDEO_BT848 is not set +# CONFIG_VIDEO_PMS is not set +# CONFIG_VIDEO_CPIA is not set +# CONFIG_VIDEO_SAA5249 is not set +# CONFIG_TUNER_3036 is not set +# CONFIG_VIDEO_STRADIS is not set +# CONFIG_VIDEO_ZORAN is not set +# CONFIG_VIDEO_ZORAN_BUZ is not set +# CONFIG_VIDEO_ZORAN_DC10 is not set +# CONFIG_VIDEO_ZORAN_LML33 is not set +# CONFIG_VIDEO_ZR36120 is not set +# CONFIG_VIDEO_MEYE is not set + +# +# Radio Adapters +# +# CONFIG_RADIO_GEMTEK_PCI is not set +# CONFIG_RADIO_MAXIRADIO is not set +# CONFIG_RADIO_MAESTRO is not set +# CONFIG_RADIO_MIROPCM20 is not set + +# +# File systems +# +# CONFIG_QUOTA is not set +# CONFIG_QFMT_V2 is not set +CONFIG_AUTOFS_FS=y +# CONFIG_AUTOFS4_FS is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_ADFS_FS is not set +# CONFIG_ADFS_FS_RW is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BEFS_DEBUG is not set +# CONFIG_BFS_FS is not set +CONFIG_EXT3_FS=y +CONFIG_JBD=y +CONFIG_JBD_DEBUG=y +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +# CONFIG_UMSDOS_FS is not set +CONFIG_VFAT_FS=y +# CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +# CONFIG_JFFS2_FS is not set +# CONFIG_CRAMFS is not set +# CONFIG_TMPFS is not set +CONFIG_RAMFS=y +CONFIG_HUGETLBFS=y +CONFIG_ISO9660_FS=y +# CONFIG_JOLIET is not set +# CONFIG_ZISOFS is not set +# CONFIG_JFS_FS is not set +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_NTFS_FS is not set +# CONFIG_NTFS_RW is not set +# CONFIG_HPFS_FS is not set +CONFIG_PROC_FS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVFS_MOUNT is not set +# CONFIG_DEVFS_DEBUG is not set +CONFIG_DEVPTS_FS=y +# CONFIG_QNX4FS_FS is not set +# CONFIG_QNX4FS_RW is not set +# CONFIG_ROMFS_FS is not set +CONFIG_EXT2_FS=y +# CONFIG_SYSV_FS is not set +# CONFIG_UDF_FS is not set +# CONFIG_UDF_RW is not set +# CONFIG_UFS_FS is not set +# CONFIG_UFS_FS_WRITE is not set + +# +# Network File Systems +# +# CONFIG_CODA_FS is not set +# CONFIG_INTERMEZZO_FS is not set +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +# CONFIG_NFS_DIRECTIO is not set +# CONFIG_ROOT_NFS is not set +CONFIG_NFSD=y +CONFIG_NFSD_V3=y +# CONFIG_NFSD_TCP is not set +CONFIG_SUNRPC=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +# CONFIG_SMB_FS is not set +# CONFIG_NCP_FS is not set +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +# CONFIG_NCPFS_NFS_NS is not set +# CONFIG_NCPFS_OS2_NS is not set +# CONFIG_NCPFS_SMALLDOS is not set +# CONFIG_NCPFS_NLS is not set +# CONFIG_NCPFS_EXTRAS is not set +# CONFIG_ZISOFS_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +CONFIG_EFI_PARTITION=y +# CONFIG_SMB_NLS is not set +CONFIG_NLS=y + +# +# Native Language Support +# +CONFIG_NLS_DEFAULT="iso8859-1" +# CONFIG_NLS_CODEPAGE_437 is not set +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ISO8859_1 is not set +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_UTF8 is not set + +# +# Console drivers +# +CONFIG_VGA_CONSOLE=y + +# +# Frame-buffer support +# +# CONFIG_FB is not set + +# +# Sound +# +CONFIG_SOUND=y +# CONFIG_SOUND_ALI5455 is not set +# CONFIG_SOUND_BT878 is not set +# CONFIG_SOUND_CMPCI is not set +# CONFIG_SOUND_EMU10K1 is not set +# CONFIG_MIDI_EMU10K1 is not set +# CONFIG_SOUND_FUSION is not set +CONFIG_SOUND_CS4281=y +# CONFIG_SOUND_ES1370 is not set +# CONFIG_SOUND_ES1371 is not set +# CONFIG_SOUND_ESSSOLO1 is not set +# CONFIG_SOUND_MAESTRO is not set +# CONFIG_SOUND_MAESTRO3 is not set +# CONFIG_SOUND_FORTE is not set +# CONFIG_SOUND_ICH is not set +# CONFIG_SOUND_RME96XX is not set +# CONFIG_SOUND_SONICVIBES is not set +# CONFIG_SOUND_TRIDENT is not set +# CONFIG_SOUND_MSNDCLAS is not set +# CONFIG_SOUND_MSNDPIN is not set +# CONFIG_SOUND_VIA82CXXX is not set +# CONFIG_MIDI_VIA82CXXX is not set +# CONFIG_SOUND_OSS is not set +# CONFIG_SOUND_TVMIXER is not set + +# +# USB support +# +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set + +# +# Miscellaneous USB options +# +CONFIG_USB_DEVICEFS=y +# CONFIG_USB_BANDWIDTH is not set + +# +# USB Host Controller Drivers +# +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_UHCI=y +# CONFIG_USB_UHCI_ALT is not set +CONFIG_USB_OHCI=y + +# +# USB Device Class drivers +# +# CONFIG_USB_AUDIO is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_BLUETOOTH is not set +# CONFIG_USB_MIDI is not set +# CONFIG_USB_STORAGE is not set +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_DPCM is not set +# CONFIG_USB_STORAGE_HP8200e is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +# CONFIG_USB_ACM is not set +# CONFIG_USB_PRINTER is not set + +# +# USB Human Interface Devices (HID) +# +CONFIG_USB_HID=y +CONFIG_USB_HIDINPUT=y +CONFIG_USB_HIDDEV=y +# CONFIG_USB_AIPTEK is not set +# CONFIG_USB_WACOM is not set +# CONFIG_USB_KBTAB is not set +# CONFIG_USB_POWERMATE is not set + +# +# USB Imaging devices +# +# CONFIG_USB_DC2XX is not set +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_SCANNER is not set +# CONFIG_USB_MICROTEK is not set +# CONFIG_USB_HPUSBSCSI is not set + +# +# USB Multimedia devices +# +# CONFIG_USB_IBMCAM is not set +# CONFIG_USB_KONICAWC is not set +# CONFIG_USB_OV511 is not set +# CONFIG_USB_PWC is not set +# CONFIG_USB_SE401 is not set +# CONFIG_USB_STV680 is not set +# CONFIG_USB_VICAM is not set +# CONFIG_USB_DSBR is not set +# CONFIG_USB_DABUSB is not set + +# +# USB Network adaptors +# +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_CATC is not set +# CONFIG_USB_AX8817X is not set +# CONFIG_USB_CDCETHER is not set +# CONFIG_USB_USBNET is not set + +# +# USB port drivers +# +# CONFIG_USB_USS720 is not set + +# +# USB Serial Converter support +# +# CONFIG_USB_SERIAL is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_TIGL is not set +# CONFIG_USB_BRLVGER is not set +# CONFIG_USB_LCD is not set + +# +# Cryptographic options +# +# CONFIG_CRYPTO is not set + +# +# Library routines +# +# CONFIG_CRC32 is not set +# CONFIG_ZLIB_INFLATE is not set +# CONFIG_ZLIB_DEFLATE is not set + +# +# Bluetooth support +# +# CONFIG_BLUEZ is not set + +# +# Simulated drivers +# +# CONFIG_HP_SIMETH is not set +# CONFIG_HP_SIMSERIAL is not set +# CONFIG_HP_SIMSCSI is not set + +# +# Kernel hacking +# +CONFIG_IA64_GRANULE_16MB=y +# CONFIG_IA64_GRANULE_64MB is not set +CONFIG_DEBUG_KERNEL=y +CONFIG_IA64_PRINT_HAZARDS=y +# CONFIG_DISABLE_VHPT is not set +CONFIG_MAGIC_SYSRQ=y +CONFIG_IA64_EARLY_PRINTK=y +CONFIG_IA64_EARLY_PRINTK_UART=y +CONFIG_IA64_EARLY_PRINTK_UART_BASE=0 +# CONFIG_IA64_EARLY_PRINTK_VGA is not set +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_IA64_DEBUG_CMPXCHG is not set +# CONFIG_IA64_DEBUG_IRQ is not set diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/configs/ski linux-2.4.23-pre8/arch/ia64/configs/ski --- linux-2.4.22/arch/ia64/configs/ski 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/configs/ski 2003-10-22 22:48:13.000000000 +0000 @@ -47,6 +47,7 @@ # CONFIG_HUGETLB_PAGE_SIZE_4MB is not set # CONFIG_HUGETLB_PAGE_SIZE_1MB is not set # CONFIG_HUGETLB_PAGE_SIZE_256KB is not set +CONFIG_IA64_PAL_IDLE=y CONFIG_SMP=y CONFIG_IA32_SUPPORT=y CONFIG_PERFMON=y @@ -152,12 +153,9 @@ # CONFIG_SCSI_AHA1542 is not set # CONFIG_SCSI_AHA1740 is not set # CONFIG_SCSI_AACRAID is not set -CONFIG_SCSI_AIC7XXX=y -CONFIG_AIC7XXX_CMDS_PER_DEVICE=253 -CONFIG_AIC7XXX_RESET_DELAY_MS=15000 -# CONFIG_AIC7XXX_PROBE_EISA_VL is not set -# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set +# CONFIG_SCSI_AIC7XXX is not set # CONFIG_SCSI_AIC79XX is not set +# CONFIG_SCSI_AIC7XXX_OLD is not set # CONFIG_SCSI_DPT_I2O is not set # CONFIG_SCSI_ADVANSYS is not set # CONFIG_SCSI_IN2000 is not set @@ -311,6 +309,7 @@ # File systems # # CONFIG_QUOTA is not set +# CONFIG_QFMT_V2 is not set CONFIG_AUTOFS_FS=y # CONFIG_AUTOFS4_FS is not set # CONFIG_REISERFS_FS is not set @@ -320,6 +319,7 @@ # CONFIG_ADFS_FS_RW is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set # CONFIG_BEFS_FS is not set # CONFIG_BEFS_DEBUG is not set # CONFIG_BFS_FS is not set @@ -370,6 +370,7 @@ # CONFIG_INTERMEZZO_FS is not set CONFIG_NFS_FS=y CONFIG_NFS_V3=y +# CONFIG_NFS_DIRECTIO is not set # CONFIG_ROOT_NFS is not set CONFIG_NFSD=y CONFIG_NFSD_V3=y diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/configs/zx1 linux-2.4.23-pre8/arch/ia64/configs/zx1 --- linux-2.4.22/arch/ia64/configs/zx1 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/configs/zx1 2003-10-22 22:49:22.000000000 +0000 @@ -37,6 +37,7 @@ CONFIG_IA64_PAGE_SIZE_16KB=y # CONFIG_IA64_PAGE_SIZE_64KB is not set CONFIG_IA64_L1_CACHE_SHIFT=7 +# CONFIG_NUMA is not set CONFIG_IA64_MCA=y CONFIG_PM=y CONFIG_KCORE_ELF=y @@ -50,6 +51,7 @@ # CONFIG_HUGETLB_PAGE_SIZE_4MB is not set # CONFIG_HUGETLB_PAGE_SIZE_1MB is not set # CONFIG_HUGETLB_PAGE_SIZE_256KB is not set +CONFIG_IA64_PAL_IDLE=y CONFIG_SMP=y CONFIG_IA32_SUPPORT=y CONFIG_PERFMON=y @@ -271,7 +273,6 @@ # CONFIG_BLK_DEV_PDC202XX_OLD is not set # CONFIG_PDC202XX_BURST is not set # CONFIG_BLK_DEV_PDC202XX_NEW is not set -# CONFIG_PDC202XX_FORCE is not set # CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_SC1200 is not set # CONFIG_BLK_DEV_SVWKS is not set @@ -330,6 +331,9 @@ CONFIG_AIC7XXX_RESET_DELAY_MS=15000 # CONFIG_AIC7XXX_PROBE_EISA_VL is not set # CONFIG_AIC7XXX_BUILD_FIRMWARE is not set +# CONFIG_AIC7XXX_DEBUG_ENABLE is not set +CONFIG_AIC7XXX_DEBUG_MASK=0 +# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set # CONFIG_SCSI_AIC79XX is not set # CONFIG_SCSI_DPT_I2O is not set # CONFIG_SCSI_ADVANSYS is not set @@ -407,6 +411,7 @@ # CONFIG_AMD8111_ETH is not set # CONFIG_ADAPTEC_STARFIRE is not set # CONFIG_APRICOT is not set +# CONFIG_B44 is not set # CONFIG_CS89x0 is not set CONFIG_TULIP=y # CONFIG_TULIP_MWI is not set @@ -446,6 +451,7 @@ # CONFIG_ACENIC is not set # CONFIG_DL2K is not set CONFIG_E1000=y +# CONFIG_E1000_NAPI is not set # CONFIG_MYRI_SBUS is not set # CONFIG_NS83820 is not set # CONFIG_HAMACHI is not set @@ -657,6 +663,7 @@ # File systems # # CONFIG_QUOTA is not set +# CONFIG_QFMT_V2 is not set CONFIG_AUTOFS_FS=y # CONFIG_AUTOFS4_FS is not set # CONFIG_REISERFS_FS is not set @@ -666,6 +673,7 @@ # CONFIG_ADFS_FS_RW is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set # CONFIG_BEFS_FS is not set # CONFIG_BEFS_DEBUG is not set # CONFIG_BFS_FS is not set @@ -716,6 +724,7 @@ # CONFIG_INTERMEZZO_FS is not set CONFIG_NFS_FS=y CONFIG_NFS_V3=y +# CONFIG_NFS_DIRECTIO is not set # CONFIG_ROOT_NFS is not set CONFIG_NFSD=y CONFIG_NFSD_V3=y @@ -917,6 +926,7 @@ # CONFIG_USB_RTL8150 is not set # CONFIG_USB_KAWETH is not set # CONFIG_USB_CATC is not set +# CONFIG_USB_AX8817X is not set # CONFIG_USB_CDCETHER is not set # CONFIG_USB_USBNET is not set @@ -940,8 +950,14 @@ # CONFIG_USB_LCD is not set # +# Cryptographic options +# +# CONFIG_CRYPTO is not set + +# # Library routines # +# CONFIG_CRC32 is not set # CONFIG_ZLIB_INFLATE is not set # CONFIG_ZLIB_DEFLATE is not set diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/defconfig linux-2.4.23-pre8/arch/ia64/defconfig --- linux-2.4.22/arch/ia64/defconfig 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/defconfig 2003-10-22 22:47:41.000000000 +0000 @@ -38,6 +38,7 @@ CONFIG_IA64_BRL_EMU=y # CONFIG_ITANIUM_BSTEP_SPECIFIC is not set CONFIG_IA64_L1_CACHE_SHIFT=6 +# CONFIG_NUMA is not set CONFIG_IA64_MCA=y CONFIG_PM=y CONFIG_KCORE_ELF=y @@ -49,7 +50,9 @@ # CONFIG_HUGETLB_PAGE_SIZE_4MB is not set # CONFIG_HUGETLB_PAGE_SIZE_1MB is not set # CONFIG_HUGETLB_PAGE_SIZE_256KB is not set +# CONFIG_IA64_PAL_IDLE is not set CONFIG_SMP=y +CONFIG_NR_CPUS=32 CONFIG_IA32_SUPPORT=y CONFIG_PERFMON=y CONFIG_IA64_PALINFO=y @@ -270,7 +273,6 @@ # CONFIG_BLK_DEV_PDC202XX_OLD is not set # CONFIG_PDC202XX_BURST is not set # CONFIG_BLK_DEV_PDC202XX_NEW is not set -# CONFIG_PDC202XX_FORCE is not set # CONFIG_BLK_DEV_RZ1000 is not set # CONFIG_BLK_DEV_SC1200 is not set # CONFIG_BLK_DEV_SVWKS is not set @@ -329,6 +331,9 @@ CONFIG_AIC7XXX_RESET_DELAY_MS=15000 # CONFIG_AIC7XXX_PROBE_EISA_VL is not set # CONFIG_AIC7XXX_BUILD_FIRMWARE is not set +# CONFIG_AIC7XXX_DEBUG_ENABLE is not set +CONFIG_AIC7XXX_DEBUG_MASK=0 +# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set # CONFIG_SCSI_AIC79XX is not set # CONFIG_SCSI_DPT_I2O is not set # CONFIG_SCSI_ADVANSYS is not set @@ -411,6 +416,7 @@ # CONFIG_AMD8111_ETH is not set # CONFIG_ADAPTEC_STARFIRE is not set # CONFIG_APRICOT is not set +# CONFIG_B44 is not set # CONFIG_CS89x0 is not set CONFIG_TULIP=y # CONFIG_TULIP_MWI is not set @@ -450,6 +456,7 @@ # CONFIG_ACENIC is not set # CONFIG_DL2K is not set CONFIG_E1000=y +# CONFIG_E1000_NAPI is not set # CONFIG_MYRI_SBUS is not set # CONFIG_NS83820 is not set # CONFIG_HAMACHI is not set @@ -661,6 +668,7 @@ # File systems # # CONFIG_QUOTA is not set +# CONFIG_QFMT_V2 is not set CONFIG_AUTOFS_FS=y # CONFIG_AUTOFS4_FS is not set # CONFIG_REISERFS_FS is not set @@ -670,6 +678,7 @@ # CONFIG_ADFS_FS_RW is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set # CONFIG_BEFS_FS is not set # CONFIG_BEFS_DEBUG is not set # CONFIG_BFS_FS is not set @@ -720,6 +729,7 @@ # CONFIG_INTERMEZZO_FS is not set CONFIG_NFS_FS=y CONFIG_NFS_V3=y +# CONFIG_NFS_DIRECTIO is not set # CONFIG_ROOT_NFS is not set CONFIG_NFSD=y CONFIG_NFSD_V3=y @@ -921,6 +931,7 @@ # CONFIG_USB_RTL8150 is not set # CONFIG_USB_KAWETH is not set # CONFIG_USB_CATC is not set +# CONFIG_USB_AX8817X is not set # CONFIG_USB_CDCETHER is not set # CONFIG_USB_USBNET is not set @@ -944,8 +955,14 @@ # CONFIG_USB_LCD is not set # +# Cryptographic options +# +# CONFIG_CRYPTO is not set + +# # Library routines # +# CONFIG_CRC32 is not set # CONFIG_ZLIB_INFLATE is not set # CONFIG_ZLIB_DEFLATE is not set diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/drivers/Makefile linux-2.4.23-pre8/arch/ia64/drivers/Makefile --- linux-2.4.22/arch/ia64/drivers/Makefile 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/drivers/Makefile 2003-10-22 22:49:10.000000000 +0000 @@ -0,0 +1,13 @@ +# +# ia64/drivers/Makefile +# +# Copyright (C) 2003 Hewlett-Packard Co. +# Bjorn Helgaas + +O_TARGET := drivers.o + +obj-$(CONFIG_HP_SIMETH) += simeth.o +obj-$(CONFIG_HP_SIMSERIAL) += simserial.o +obj-$(CONFIG_HP_SIMSCSI) += simscsi.o + +include $(TOPDIR)/Rules.make diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/drivers/simeth.c linux-2.4.23-pre8/arch/ia64/drivers/simeth.c --- linux-2.4.22/arch/ia64/drivers/simeth.c 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/drivers/simeth.c 2003-10-22 22:47:27.000000000 +0000 @@ -0,0 +1,537 @@ +/* + * Simulated Ethernet Driver + * + * Copyright (C) 1999-2001, 2003 Hewlett-Packard Co + * Stephane Eranian + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define SIMETH_RECV_MAX 10 + +/* + * Maximum possible received frame for Ethernet. + * We preallocate an sk_buff of that size to avoid costly + * memcpy for temporary buffer into sk_buff. We do basically + * what's done in other drivers, like eepro with a ring. + * The difference is, of course, that we don't have real DMA !!! + */ +#define SIMETH_FRAME_SIZE ETH_FRAME_LEN + + +#define SSC_NETDEV_PROBE 100 +#define SSC_NETDEV_SEND 101 +#define SSC_NETDEV_RECV 102 +#define SSC_NETDEV_ATTACH 103 +#define SSC_NETDEV_DETACH 104 + +#define NETWORK_INTR 8 + +struct simeth_local { + struct net_device_stats stats; + int simfd; /* descriptor in the simulator */ +}; + +static int simeth_probe1(void); +static int simeth_open(struct net_device *dev); +static int simeth_close(struct net_device *dev); +static int simeth_tx(struct sk_buff *skb, struct net_device *dev); +static int simeth_rx(struct net_device *dev); +static struct net_device_stats *simeth_get_stats(struct net_device *dev); +static void simeth_interrupt(int irq, void *dev_id, struct pt_regs * regs); +static void set_multicast_list(struct net_device *dev); +static int simeth_device_event(struct notifier_block *this,unsigned long event, void *ptr); + +static char *simeth_version="0.3"; + +/* + * This variable is used to establish a mapping between the Linux/ia64 kernel + * and the host linux kernel. + * + * As of today, we support only one card, even though most of the code + * is ready for many more. The mapping is then: + * linux/ia64 -> linux/x86 + * eth0 -> eth1 + * + * In the future, we some string operations, we could easily support up + * to 10 cards (0-9). + * + * The default mapping can be changed on the kernel command line by + * specifying simeth=ethX (or whatever string you want). + */ +static char *simeth_device="eth0"; /* default host interface to use */ + + + +static volatile unsigned int card_count; /* how many cards "found" so far */ +static int simeth_debug; /* set to 1 to get debug information */ + +/* + * Used to catch IFF_UP & IFF_DOWN events + */ +static struct notifier_block simeth_dev_notifier = { + simeth_device_event, + 0 +}; + + +/* + * Function used when using a kernel command line option. + * + * Format: simeth=interface_name (like eth0) + */ +static int __init +simeth_setup(char *str) +{ + simeth_device = str; + return 1; +} + +__setup("simeth=", simeth_setup); + +/* + * Function used to probe for simeth devices when not installed + * as a loadable module + */ + +int __init +simeth_probe (void) +{ + int r; + + printk(KERN_INFO "simeth: v%s\n", simeth_version); + + r = simeth_probe1(); + + if (r == 0) register_netdevice_notifier(&simeth_dev_notifier); + + return r; +} + +extern long ia64_ssc (long, long, long, long, int); +extern void ia64_ssc_connect_irq (long intr, long irq); + +static inline int +netdev_probe(char *name, unsigned char *ether) +{ + return ia64_ssc(__pa(name), __pa(ether), 0,0, SSC_NETDEV_PROBE); +} + + +static inline int +netdev_connect(int irq) +{ + /* XXX Fix me + * this does not support multiple cards + * also no return value + */ + ia64_ssc_connect_irq(NETWORK_INTR, irq); + return 0; +} + +static inline int +netdev_attach(int fd, int irq, unsigned int ipaddr) +{ + /* this puts the host interface in the right mode (start interrupting) */ + return ia64_ssc(fd, ipaddr, 0,0, SSC_NETDEV_ATTACH); +} + + +static inline int +netdev_detach(int fd) +{ + /* + * inactivate the host interface (don't interrupt anymore) */ + return ia64_ssc(fd, 0,0,0, SSC_NETDEV_DETACH); +} + +static inline int +netdev_send(int fd, unsigned char *buf, unsigned int len) +{ + return ia64_ssc(fd, __pa(buf), len, 0, SSC_NETDEV_SEND); +} + +static inline int +netdev_read(int fd, unsigned char *buf, unsigned int len) +{ + return ia64_ssc(fd, __pa(buf), len, 0, SSC_NETDEV_RECV); +} + +/* + * Function shared with module code, so cannot be in init section + * + * So far this function "detects" only one card (test_&_set) but could + * be extended easily. + * + * Return: + * - -ENODEV is no device found + * - -ENOMEM is no more memory + * - 0 otherwise + */ +static int +simeth_probe1(void) +{ + unsigned char mac_addr[ETH_ALEN]; + struct simeth_local *local; + struct net_device *dev; + int fd, i; + + /* + * XXX Fix me + * let's support just one card for now + */ + if (test_and_set_bit(0, &card_count)) + return -ENODEV; + + /* + * check with the simulator for the device + */ + fd = netdev_probe(simeth_device, mac_addr); + if (fd == -1) + return -ENODEV; + + dev = init_etherdev(NULL, sizeof(struct simeth_local)); + if (!dev) + return -ENOMEM; + + memcpy(dev->dev_addr, mac_addr, sizeof(mac_addr)); + + dev->irq = ia64_alloc_vector(); + + /* + * attach the interrupt in the simulator, this does enable interrupts + * until a netdev_attach() is called + */ + netdev_connect(dev->irq); + + memset(dev->priv, 0, sizeof(struct simeth_local)); + + local = dev->priv; + local->simfd = fd; /* keep track of underlying file descriptor */ + + dev->open = simeth_open; + dev->stop = simeth_close; + dev->hard_start_xmit = simeth_tx; + dev->get_stats = simeth_get_stats; + dev->set_multicast_list = set_multicast_list; /* no yet used */ + + /* Fill in the fields of the device structure with ethernet-generic values. */ + ether_setup(dev); + + printk(KERN_INFO "%s: hosteth=%s simfd=%d, HwAddr", + dev->name, simeth_device, local->simfd); + for(i = 0; i < ETH_ALEN; i++) { + printk(" %2.2x", dev->dev_addr[i]); + } + printk(", IRQ %d\n", dev->irq); + + return 0; +} + +/* + * actually binds the device to an interrupt vector + */ +static int +simeth_open(struct net_device *dev) +{ + if (request_irq(dev->irq, simeth_interrupt, 0, "simeth", dev)) { + printk(KERN_WARNING "simeth: unable to get IRQ %d.\n", dev->irq); + return -EAGAIN; + } + + netif_start_queue(dev); + + return 0; +} + +/* copied from lapbether.c */ +static __inline__ int dev_is_ethdev(struct net_device *dev) +{ + return ( dev->type == ARPHRD_ETHER && strncmp(dev->name, "dummy", 5)); +} + + +/* + * Handler for IFF_UP or IFF_DOWN + * + * The reason for that is that we don't want to be interrupted when the + * interface is down. There is no way to unconnect in the simualtor. Instead + * we use this function to shutdown packet processing in the frame filter + * in the simulator. Thus no interrupts are generated + * + * + * That's also the place where we pass the IP address of this device to the + * simulator so that that we can start filtering packets for it + * + * There may be a better way of doing this, but I don't know which yet. + */ +static int +simeth_device_event(struct notifier_block *this,unsigned long event, void *ptr) +{ + struct net_device *dev = (struct net_device *)ptr; + struct simeth_local *local; + struct in_device *in_dev; + struct in_ifaddr **ifap = NULL; + struct in_ifaddr *ifa = NULL; + int r; + + + if ( ! dev ) { + printk(KERN_WARNING "simeth_device_event dev=0\n"); + return NOTIFY_DONE; + } + + if ( event != NETDEV_UP && event != NETDEV_DOWN ) return NOTIFY_DONE; + + /* + * Check whether or not it's for an ethernet device + * + * XXX Fixme: This works only as long as we support one + * type of ethernet device. + */ + if ( !dev_is_ethdev(dev) ) return NOTIFY_DONE; + + if ((in_dev=dev->ip_ptr) != NULL) { + for (ifap=&in_dev->ifa_list; (ifa=*ifap) != NULL; ifap=&ifa->ifa_next) + if (strcmp(dev->name, ifa->ifa_label) == 0) break; + } + if ( ifa == NULL ) { + printk(KERN_ERR "simeth_open: can't find device %s's ifa\n", dev->name); + return NOTIFY_DONE; + } + + printk(KERN_INFO "simeth_device_event: %s ipaddr=0x%x\n", + dev->name, htonl(ifa->ifa_local)); + + /* + * XXX Fix me + * if the device was up, and we're simply reconfiguring it, not sure + * we get DOWN then UP. + */ + + local = dev->priv; + /* now do it for real */ + r = event == NETDEV_UP ? + netdev_attach(local->simfd, dev->irq, htonl(ifa->ifa_local)): + netdev_detach(local->simfd); + + printk(KERN_INFO "simeth: netdev_attach/detach: event=%s ->%d\n", + event == NETDEV_UP ? "attach":"detach", r); + + return NOTIFY_DONE; +} + +static int +simeth_close(struct net_device *dev) +{ + netif_stop_queue(dev); + + free_irq(dev->irq, dev); + + return 0; +} + +/* + * Only used for debug + */ +static void +frame_print(unsigned char *from, unsigned char *frame, int len) +{ + int i; + + printk("%s: (%d) %02x", from, len, frame[0] & 0xff); + for(i=1; i < 6; i++ ) { + printk(":%02x", frame[i] &0xff); + } + printk(" %2x", frame[6] &0xff); + for(i=7; i < 12; i++ ) { + printk(":%02x", frame[i] &0xff); + } + printk(" [%02x%02x]\n", frame[12], frame[13]); + + for(i=14; i < len; i++ ) { + printk("%02x ", frame[i] &0xff); + if ( (i%10)==0) printk("\n"); + } + printk("\n"); +} + + +/* + * Function used to transmit of frame, very last one on the path before + * going to the simulator. + */ +static int +simeth_tx(struct sk_buff *skb, struct net_device *dev) +{ + struct simeth_local *local = (struct simeth_local *)dev->priv; + +#if 0 + /* ensure we have at least ETH_ZLEN bytes (min frame size) */ + unsigned int length = ETH_ZLEN < skb->len ? skb->len : ETH_ZLEN; + /* Where do the extra padding bytes comes from inthe skbuff ? */ +#else + /* the real driver in the host system is going to take care of that + * or maybe it's the NIC itself. + */ + unsigned int length = skb->len; +#endif + + local->stats.tx_bytes += skb->len; + local->stats.tx_packets++; + + + if (simeth_debug > 5) frame_print("simeth_tx", skb->data, length); + + netdev_send(local->simfd, skb->data, length); + + /* + * we are synchronous on write, so we don't simulate a + * trasnmit complete interrupt, thus we don't need to arm a tx + */ + + dev_kfree_skb(skb); + return 0; +} + +static inline struct sk_buff * +make_new_skb(struct net_device *dev) +{ + struct sk_buff *nskb; + + /* + * The +2 is used to make sure that the IP header is nicely + * aligned (on 4byte boundary I assume 14+2=16) + */ + nskb = dev_alloc_skb(SIMETH_FRAME_SIZE + 2); + if ( nskb == NULL ) { + printk(KERN_NOTICE "%s: memory squeeze. dropping packet.\n", dev->name); + return NULL; + } + nskb->dev = dev; + + skb_reserve(nskb, 2); /* Align IP on 16 byte boundaries */ + + skb_put(nskb,SIMETH_FRAME_SIZE); + + return nskb; +} + +/* + * called from interrupt handler to process a received frame + */ +static int +simeth_rx(struct net_device *dev) +{ + struct simeth_local *local; + struct sk_buff *skb; + int len; + int rcv_count = SIMETH_RECV_MAX; + + local = (struct simeth_local *)dev->priv; + /* + * the loop concept has been borrowed from other drivers + * looks to me like it's a throttling thing to avoid pushing to many + * packets at one time into the stack. Making sure we can process them + * upstream and make forward progress overall + */ + do { + if ( (skb=make_new_skb(dev)) == NULL ) { + printk(KERN_NOTICE "%s: memory squeeze. dropping packet.\n", dev->name); + local->stats.rx_dropped++; + return 0; + } + /* + * Read only one frame at a time + */ + len = netdev_read(local->simfd, skb->data, SIMETH_FRAME_SIZE); + if ( len == 0 ) { + if ( simeth_debug > 0 ) printk(KERN_WARNING "%s: count=%d netdev_read=0\n", + dev->name, SIMETH_RECV_MAX-rcv_count); + break; + } +#if 0 + /* + * XXX Fix me + * Should really do a csum+copy here + */ + memcpy(skb->data, frame, len); +#endif + skb->protocol = eth_type_trans(skb, dev); + + if ( simeth_debug > 6 ) frame_print("simeth_rx", skb->data, len); + + /* + * push the packet up & trigger software interrupt + */ + netif_rx(skb); + + local->stats.rx_packets++; + local->stats.rx_bytes += len; + + } while ( --rcv_count ); + + return len; /* 0 = nothing left to read, otherwise, we can try again */ +} + +/* + * Interrupt handler (Yes, we can do it too !!!) + */ +static void +simeth_interrupt(int irq, void *dev_id, struct pt_regs * regs) +{ + struct net_device *dev = dev_id; + + if ( dev == NULL ) { + printk(KERN_WARNING "simeth: irq %d for unknown device\n", irq); + return; + } + + /* + * very simple loop because we get interrupts only when receiving + */ + while (simeth_rx(dev)); +} + +static struct net_device_stats * +simeth_get_stats(struct net_device *dev) +{ + struct simeth_local *local = (struct simeth_local *) dev->priv; + + return &local->stats; +} + +/* fake multicast ability */ +static void +set_multicast_list(struct net_device *dev) +{ + printk(KERN_WARNING "%s: set_multicast_list called\n", dev->name); +} + +#ifdef CONFIG_NET_FASTROUTE +static int +simeth_accept_fastpath(struct net_device *dev, struct dst_entry *dst) +{ + printk(KERN_WARNING "%s: simeth_accept_fastpath called\n", dev->name); + return -1; +} +#endif + +__initcall(simeth_probe); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/drivers/simscsi.c linux-2.4.23-pre8/arch/ia64/drivers/simscsi.c --- linux-2.4.22/arch/ia64/drivers/simscsi.c 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/drivers/simscsi.c 2003-10-22 22:48:57.000000000 +0000 @@ -0,0 +1,396 @@ +/* + * Simulated SCSI driver. + * + * Copyright (C) 1999, 2001-2003 Hewlett-Packard Co + * David Mosberger-Tang + * Stephane Eranian + * + * 02/01/15 David Mosberger Updated for v2.5.1 + * 99/12/18 David Mosberger Added support for READ10/WRITE10 needed by linux v2.3.33 + */ +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include "../drivers/scsi/scsi.h" +#include "../drivers/scsi/sd.h" +#include "../drivers/scsi/hosts.h" +#include "simscsi.h" + +#define DEBUG_SIMSCSI 1 + +/* Simulator system calls: */ + +#define SSC_OPEN 50 +#define SSC_CLOSE 51 +#define SSC_READ 52 +#define SSC_WRITE 53 +#define SSC_GET_COMPLETION 54 +#define SSC_WAIT_COMPLETION 55 + +#define SSC_WRITE_ACCESS 2 +#define SSC_READ_ACCESS 1 + +#if DEBUG_SIMSCSI + int simscsi_debug; +# define DBG simscsi_debug +#else +# define DBG 0 +#endif + +static void simscsi_interrupt (unsigned long val); +DECLARE_TASKLET(simscsi_tasklet, simscsi_interrupt, 0); + +struct disk_req { + unsigned long addr; + unsigned len; +}; + +struct disk_stat { + int fd; + unsigned count; +}; + +extern long ia64_ssc (long arg0, long arg1, long arg2, long arg3, int nr); + +static int desc[16] = { + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 +}; + +static struct queue_entry { + Scsi_Cmnd *sc; +} queue[SIMSCSI_REQ_QUEUE_LEN]; + +static int rd, wr; +static atomic_t num_reqs = ATOMIC_INIT(0); + +/* base name for default disks */ +static char *simscsi_root = DEFAULT_SIMSCSI_ROOT; + +#define MAX_ROOT_LEN 128 + +/* + * used to setup a new base for disk images + * to use /foo/bar/disk[a-z] as disk images + * you have to specify simscsi=/foo/bar/disk on the command line + */ +static int __init +simscsi_setup (char *s) +{ + /* XXX Fix me we may need to strcpy() ? */ + if (strlen(s) > MAX_ROOT_LEN) { + printk(KERN_ERR "simscsi_setup: prefix too long---using default %s\n", + simscsi_root); + } + simscsi_root = s; + return 1; +} + +__setup("simscsi=", simscsi_setup); + +static void +simscsi_interrupt (unsigned long val) +{ + unsigned long flags; + Scsi_Cmnd *sc; + + spin_lock_irqsave(&io_request_lock, flags); + { + while ((sc = queue[rd].sc) != 0) { + atomic_dec(&num_reqs); + queue[rd].sc = 0; + if (DBG) + printk("simscsi_interrupt: done with %ld\n", sc->serial_number); + (*sc->scsi_done)(sc); + rd = (rd + 1) % SIMSCSI_REQ_QUEUE_LEN; + } + } + spin_unlock_irqrestore(&io_request_lock, flags); +} + +int +simscsi_detect (Scsi_Host_Template *templ) +{ + templ->proc_name = "simscsi"; + return 1; /* fake one SCSI host adapter */ +} + +int +simscsi_release (struct Scsi_Host *host) +{ + return 0; /* this is easy... */ +} + +const char * +simscsi_info (struct Scsi_Host *host) +{ + return "simulated SCSI host adapter"; +} + +int +simscsi_biosparam (Disk *disk, kdev_t n, int ip[]) +{ + unsigned capacity = disk->capacity; + + ip[0] = 64; /* heads */ + ip[1] = 32; /* sectors */ + ip[2] = capacity >> 11; /* cylinders */ + return 0; +} + +static void +simscsi_readwrite (Scsi_Cmnd *sc, int mode, unsigned long offset, unsigned long len) +{ + struct disk_stat stat; + struct disk_req req; + + req.addr = __pa(sc->request_buffer); + req.len = len; /* # of bytes to transfer */ + + if (sc->request_bufflen < req.len) + return; + + stat.fd = desc[sc->target]; + if (DBG) + printk("simscsi_%s @ %lx (off %lx)\n", + mode == SSC_READ ? "read":"write", req.addr, offset); + ia64_ssc(stat.fd, 1, __pa(&req), offset, mode); + ia64_ssc(__pa(&stat), 0, 0, 0, SSC_WAIT_COMPLETION); + + if (stat.count == req.len) { + sc->result = GOOD; + } else { + sc->result = DID_ERROR << 16; + } +} + +static void +simscsi_sg_readwrite (Scsi_Cmnd *sc, int mode, unsigned long offset) +{ + int list_len = sc->use_sg; + struct scatterlist *sl = (struct scatterlist *)sc->buffer; + struct disk_stat stat; + struct disk_req req; + + stat.fd = desc[sc->target]; + + while (list_len) { + req.addr = __pa(sl->address); + req.len = sl->length; + if (DBG) + printk("simscsi_sg_%s @ %lx (off %lx) use_sg=%d len=%d\n", + mode == SSC_READ ? "read":"write", req.addr, offset, + list_len, sl->length); + ia64_ssc(stat.fd, 1, __pa(&req), offset, mode); + ia64_ssc(__pa(&stat), 0, 0, 0, SSC_WAIT_COMPLETION); + + /* should not happen in our case */ + if (stat.count != req.len) { + sc->result = DID_ERROR << 16; + return; + } + offset += sl->length; + sl++; + list_len--; + } + sc->result = GOOD; +} + +/* + * function handling both READ_6/WRITE_6 (non-scatter/gather mode) + * commands. + * Added 02/26/99 S.Eranian + */ +static void +simscsi_readwrite6 (Scsi_Cmnd *sc, int mode) +{ + unsigned long offset; + + offset = (((sc->cmnd[1] & 0x1f) << 16) | (sc->cmnd[2] << 8) | sc->cmnd[3])*512; + if (sc->use_sg > 0) + simscsi_sg_readwrite(sc, mode, offset); + else + simscsi_readwrite(sc, mode, offset, sc->cmnd[4]*512); +} + +static size_t +simscsi_get_disk_size (int fd) +{ + struct disk_stat stat; + size_t bit, sectors = 0; + struct disk_req req; + char buf[512]; + + /* + * This is a bit kludgey: the simulator doesn't provide a direct way of determining + * the disk size, so we do a binary search, assuming a maximum disk size of 4GB. + */ + for (bit = (4UL << 30)/512; bit != 0; bit >>= 1) { + req.addr = __pa(&buf); + req.len = sizeof(buf); + ia64_ssc(fd, 1, __pa(&req), ((sectors | bit) - 1)*512, SSC_READ); + stat.fd = fd; + ia64_ssc(__pa(&stat), 0, 0, 0, SSC_WAIT_COMPLETION); + if (stat.count == sizeof(buf)) + sectors |= bit; + } + return sectors - 1; /* return last valid sector number */ +} + +static void +simscsi_readwrite10 (Scsi_Cmnd *sc, int mode) +{ + unsigned long offset; + + offset = ( (sc->cmnd[2] << 24) | (sc->cmnd[3] << 16) + | (sc->cmnd[4] << 8) | (sc->cmnd[5] << 0))*512; + if (sc->use_sg > 0) + simscsi_sg_readwrite(sc, mode, offset); + else + simscsi_readwrite(sc, mode, offset, ((sc->cmnd[7] << 8) | sc->cmnd[8])*512); +} + +int +simscsi_queuecommand (Scsi_Cmnd *sc, void (*done)(Scsi_Cmnd *)) +{ + char fname[MAX_ROOT_LEN+16]; + size_t disk_size; + char *buf; +#if DEBUG_SIMSCSI + register long sp asm ("sp"); + + if (DBG) + printk("simscsi_queuecommand: target=%d,cmnd=%u,sc=%lu,sp=%lx,done=%p\n", + sc->target, sc->cmnd[0], sc->serial_number, sp, done); +#endif + + sc->result = DID_BAD_TARGET << 16; + sc->scsi_done = done; + if (sc->target <= 15 && sc->lun == 0) { + switch (sc->cmnd[0]) { + case INQUIRY: + if (sc->request_bufflen < 35) { + break; + } + sprintf (fname, "%s%c", simscsi_root, 'a' + sc->target); + desc[sc->target] = ia64_ssc(__pa(fname), SSC_READ_ACCESS|SSC_WRITE_ACCESS, + 0, 0, SSC_OPEN); + if (desc[sc->target] < 0) { + /* disk doesn't exist... */ + break; + } + buf = sc->request_buffer; + buf[0] = 0; /* magnetic disk */ + buf[1] = 0; /* not a removable medium */ + buf[2] = 2; /* SCSI-2 compliant device */ + buf[3] = 2; /* SCSI-2 response data format */ + buf[4] = 31; /* additional length (bytes) */ + buf[5] = 0; /* reserved */ + buf[6] = 0; /* reserved */ + buf[7] = 0; /* various flags */ + memcpy(buf + 8, "HP SIMULATED DISK 0.00", 28); + sc->result = GOOD; + break; + + case TEST_UNIT_READY: + sc->result = GOOD; + break; + + case READ_6: + if (desc[sc->target] < 0 ) + break; + simscsi_readwrite6(sc, SSC_READ); + break; + + case READ_10: + if (desc[sc->target] < 0 ) + break; + simscsi_readwrite10(sc, SSC_READ); + break; + + case WRITE_6: + if (desc[sc->target] < 0) + break; + simscsi_readwrite6(sc, SSC_WRITE); + break; + + case WRITE_10: + if (desc[sc->target] < 0) + break; + simscsi_readwrite10(sc, SSC_WRITE); + break; + + + case READ_CAPACITY: + if (desc[sc->target] < 0 || sc->request_bufflen < 8) { + break; + } + buf = sc->request_buffer; + + disk_size = simscsi_get_disk_size(desc[sc->target]); + buf[0] = (disk_size >> 24) & 0xff; + buf[1] = (disk_size >> 16) & 0xff; + buf[2] = (disk_size >> 8) & 0xff; + buf[3] = (disk_size >> 0) & 0xff; + /* set block size of 512 bytes: */ + buf[4] = 0; + buf[5] = 0; + buf[6] = 2; + buf[7] = 0; + sc->result = GOOD; + break; + + case MODE_SENSE: + /* sd.c uses this to determine whether disk does write-caching. */ + memset(sc->request_buffer, 0, 128); + sc->result = GOOD; + break; + + case START_STOP: + printk(KERN_ERR "START_STOP\n"); + break; + + default: + panic("simscsi: unknown SCSI command %u\n", sc->cmnd[0]); + } + } + if (sc->result == DID_BAD_TARGET) { + sc->result |= DRIVER_SENSE << 24; + sc->sense_buffer[0] = 0x70; + sc->sense_buffer[2] = 0x00; + } + if (atomic_read(&num_reqs) >= SIMSCSI_REQ_QUEUE_LEN) { + panic("Attempt to queue command while command is pending!!"); + } + atomic_inc(&num_reqs); + queue[wr].sc = sc; + wr = (wr + 1) % SIMSCSI_REQ_QUEUE_LEN; + + tasklet_schedule(&simscsi_tasklet); + return 0; +} + +int +simscsi_reset (Scsi_Cmnd *cmd, unsigned int reset_flags) +{ + printk(KERN_ERR "simscsi_reset: unimplemented\n"); + return SCSI_RESET_SUCCESS; +} + +int +simscsi_abort (Scsi_Cmnd *cmd) +{ + printk(KERN_ERR "simscsi_abort: unimplemented\n"); + return SCSI_ABORT_SUCCESS; +} + +static Scsi_Host_Template driver_template = SIMSCSI; + +#include "../drivers/scsi/scsi_module.c" diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/drivers/simscsi.h linux-2.4.23-pre8/arch/ia64/drivers/simscsi.h --- linux-2.4.22/arch/ia64/drivers/simscsi.h 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/drivers/simscsi.h 2003-10-22 22:49:00.000000000 +0000 @@ -0,0 +1,39 @@ +/* + * Simulated SCSI driver. + * + * Copyright (C) 1999, 2002 Hewlett-Packard Co + * David Mosberger-Tang + */ +#ifndef SIMSCSI_H +#define SIMSCSI_H + +#define SIMSCSI_REQ_QUEUE_LEN 64 + +#define DEFAULT_SIMSCSI_ROOT "/var/ski-disks/sd" + +extern int simscsi_detect (Scsi_Host_Template *); +extern int simscsi_release (struct Scsi_Host *); +extern const char *simscsi_info (struct Scsi_Host *); +extern int simscsi_queuecommand (Scsi_Cmnd *, void (*done)(Scsi_Cmnd *)); +extern int simscsi_abort (Scsi_Cmnd *); +extern int simscsi_reset (Scsi_Cmnd *, unsigned int); +extern int simscsi_biosparam (Disk *, kdev_t, int[]); + +#define SIMSCSI { \ + .detect = simscsi_detect, \ + .release = simscsi_release, \ + .info = simscsi_info, \ + .queuecommand = simscsi_queuecommand, \ + .abort = simscsi_abort, \ + .reset = simscsi_reset, \ + .bios_param = simscsi_biosparam, \ + .can_queue = SIMSCSI_REQ_QUEUE_LEN, \ + .this_id = -1, \ + .sg_tablesize = SG_ALL, \ + .cmd_per_lun = SIMSCSI_REQ_QUEUE_LEN, \ + .present = 0, \ + .unchecked_isa_dma = 0, \ + .use_clustering = DISABLE_CLUSTERING \ +} + +#endif /* SIMSCSI_H */ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/drivers/simserial.c linux-2.4.23-pre8/arch/ia64/drivers/simserial.c --- linux-2.4.22/arch/ia64/drivers/simserial.c 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/drivers/simserial.c 2003-10-22 22:48:13.000000000 +0000 @@ -0,0 +1,1094 @@ +/* + * Simulated Serial Driver (fake serial) + * + * This driver is mostly used for bringup purposes and will go away. + * It has a strong dependency on the system console. All outputs + * are rerouted to the same facility as the one used by printk which, in our + * case means sys_sim.c console (goes via the simulator). The code hereafter + * is completely leveraged from the serial.c driver. + * + * Copyright (C) 1999-2000, 2002-2003 Hewlett-Packard Co + * Stephane Eranian + * David Mosberger-Tang + * + * 02/04/00 D. Mosberger Merged in serial.c bug fixes in rs_close(). + * 02/25/00 D. Mosberger Synced up with 2.3.99pre-5 version of serial.c. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#undef SIMSERIAL_DEBUG /* define this to get some debug information */ + +#define KEYBOARD_INTR 3 /* must match with simulator! */ + +#define NR_PORTS 1 /* only one port for now */ +#define SERIAL_INLINE 1 + +#ifdef SERIAL_INLINE +#define _INLINE_ inline +#endif + +#ifndef MIN +#define MIN(a,b) ((a) < (b) ? (a) : (b)) +#endif + +#define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? SA_SHIRQ : SA_INTERRUPT) + +#define SSC_GETCHAR 21 + +extern long ia64_ssc (long, long, long, long, int); +extern void ia64_ssc_connect_irq (long intr, long irq); + +static char *serial_name = "SimSerial driver"; +static char *serial_version = "0.6"; + +/* + * This has been extracted from asm/serial.h. We need one eventually but + * I don't know exactly what we're going to put in it so just fake one + * for now. + */ +#define BASE_BAUD ( 1843200 / 16 ) + +#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) + +/* + * Most of the values here are meaningless to this particular driver. + * However some values must be preserved for the code (leveraged from serial.c + * to work correctly). + * port must not be 0 + * type must not be UNKNOWN + * So I picked arbitrary (guess from where?) values instead + */ +static struct serial_state rs_table[NR_PORTS]={ + /* UART CLK PORT IRQ FLAGS */ + { 0, BASE_BAUD, 0x3F8, 0, STD_COM_FLAGS,0,PORT_16550 } /* ttyS0 */ +}; + +/* + * Just for the fun of it ! + */ +static struct serial_uart_config uart_config[] = { + { "unknown", 1, 0 }, + { "8250", 1, 0 }, + { "16450", 1, 0 }, + { "16550", 1, 0 }, + { "16550A", 16, UART_CLEAR_FIFO | UART_USE_FIFO }, + { "cirrus", 1, 0 }, + { "ST16650", 1, UART_CLEAR_FIFO | UART_STARTECH }, + { "ST16650V2", 32, UART_CLEAR_FIFO | UART_USE_FIFO | + UART_STARTECH }, + { "TI16750", 64, UART_CLEAR_FIFO | UART_USE_FIFO}, + { 0, 0} +}; + +static struct tty_driver serial_driver, callout_driver; +static int serial_refcount; + +static struct async_struct *IRQ_ports[NR_IRQS]; +static struct tty_struct *serial_table[NR_PORTS]; +static struct termios *serial_termios[NR_PORTS]; +static struct termios *serial_termios_locked[NR_PORTS]; + +static struct console *console; + +static unsigned char *tmp_buf; +static DECLARE_MUTEX(tmp_buf_sem); + +extern struct console *console_drivers; /* from kernel/printk.c */ + +/* + * ------------------------------------------------------------ + * rs_stop() and rs_start() + * + * This routines are called before setting or resetting tty->stopped. + * They enable or disable transmitter interrupts, as necessary. + * ------------------------------------------------------------ + */ +static void rs_stop(struct tty_struct *tty) +{ +#ifdef SIMSERIAL_DEBUG + printk("rs_stop: tty->stopped=%d tty->hw_stopped=%d tty->flow_stopped=%d\n", + tty->stopped, tty->hw_stopped, tty->flow_stopped); +#endif + +} + +static void rs_start(struct tty_struct *tty) +{ +#if SIMSERIAL_DEBUG + printk("rs_start: tty->stopped=%d tty->hw_stopped=%d tty->flow_stopped=%d\n", + tty->stopped, tty->hw_stopped, tty->flow_stopped); +#endif +} + +static void receive_chars(struct tty_struct *tty, struct pt_regs *regs) +{ + unsigned char ch; + static unsigned char seen_esc = 0; + + while ( (ch = ia64_ssc(0, 0, 0, 0, SSC_GETCHAR)) ) { + if ( ch == 27 && seen_esc == 0 ) { + seen_esc = 1; + continue; + } else { + if ( seen_esc==1 && ch == 'O' ) { + seen_esc = 2; + continue; + } else if ( seen_esc == 2 ) { + if ( ch == 'P' ) show_state(); /* F1 key */ + if ( ch == 'Q' ) show_buffers(); /* F2 key */ + seen_esc = 0; + continue; + } + } + seen_esc = 0; + if (tty->flip.count >= TTY_FLIPBUF_SIZE) break; + + *tty->flip.char_buf_ptr = ch; + + *tty->flip.flag_buf_ptr = 0; + + tty->flip.flag_buf_ptr++; + tty->flip.char_buf_ptr++; + tty->flip.count++; + } + tty_flip_buffer_push(tty); +} + +/* + * This is the serial driver's interrupt routine for a single port + */ +static void rs_interrupt_single(int irq, void *dev_id, struct pt_regs * regs) +{ + struct async_struct * info; + + /* + * I don't know exactly why they don't use the dev_id opaque data + * pointer instead of this extra lookup table + */ + info = IRQ_ports[irq]; + if (!info || !info->tty) { + printk(KERN_INFO "simrs_interrupt_single: info|tty=0 info=%p problem\n", info); + return; + } + /* + * pretty simple in our case, because we only get interrupts + * on inbound traffic + */ + receive_chars(info->tty, regs); +} + +/* + * ------------------------------------------------------------------- + * Here ends the serial interrupt routines. + * ------------------------------------------------------------------- + */ + +#if 0 +/* + * not really used in our situation so keep them commented out for now + */ +static DECLARE_TASK_QUEUE(tq_serial); /* used to be at the top of the file */ +static void do_serial_bh(void) +{ + run_task_queue(&tq_serial); + printk(KERN_ERR "do_serial_bh: called\n"); +} +#endif + +static void do_softint(void *private_) +{ + printk(KERN_ERR "simserial: do_softint called\n"); +} + +static void rs_put_char(struct tty_struct *tty, unsigned char ch) +{ + struct async_struct *info = (struct async_struct *)tty->driver_data; + unsigned long flags; + + if (!tty || !info->xmit.buf) return; + + save_flags(flags); cli(); + if (CIRC_SPACE(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE) == 0) { + restore_flags(flags); + return; + } + info->xmit.buf[info->xmit.head] = ch; + info->xmit.head = (info->xmit.head + 1) & (SERIAL_XMIT_SIZE-1); + restore_flags(flags); +} + +static _INLINE_ void transmit_chars(struct async_struct *info, int *intr_done) +{ + int count; + unsigned long flags; + + save_flags(flags); cli(); + + if (info->x_char) { + char c = info->x_char; + + console->write(console, &c, 1); + + info->state->icount.tx++; + info->x_char = 0; + + goto out; + } + + if (info->xmit.head == info->xmit.tail || info->tty->stopped || info->tty->hw_stopped) { +#ifdef SIMSERIAL_DEBUG + printk("transmit_chars: head=%d, tail=%d, stopped=%d\n", + info->xmit.head, info->xmit.tail, info->tty->stopped); +#endif + goto out; + } + /* + * We removed the loop and try to do it in to chunks. We need + * 2 operations maximum because it's a ring buffer. + * + * First from current to tail if possible. + * Then from the beginning of the buffer until necessary + */ + + count = MIN(CIRC_CNT(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE), + SERIAL_XMIT_SIZE - info->xmit.tail); + console->write(console, info->xmit.buf+info->xmit.tail, count); + + info->xmit.tail = (info->xmit.tail+count) & (SERIAL_XMIT_SIZE-1); + + /* + * We have more at the beginning of the buffer + */ + count = CIRC_CNT(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE); + if (count) { + console->write(console, info->xmit.buf, count); + info->xmit.tail += count; + } +out: + restore_flags(flags); +} + +static void rs_flush_chars(struct tty_struct *tty) +{ + struct async_struct *info = (struct async_struct *)tty->driver_data; + + if (info->xmit.head == info->xmit.tail || tty->stopped || tty->hw_stopped || + !info->xmit.buf) + return; + + transmit_chars(info, NULL); +} + + +static int rs_write(struct tty_struct * tty, int from_user, + const unsigned char *buf, int count) +{ + int c, ret = 0; + struct async_struct *info = (struct async_struct *)tty->driver_data; + unsigned long flags; + + if (!tty || !info->xmit.buf || !tmp_buf) return 0; + + save_flags(flags); + if (from_user) { + down(&tmp_buf_sem); + while (1) { + int c1; + c = CIRC_SPACE_TO_END(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE); + if (count < c) + c = count; + if (c <= 0) + break; + + c -= copy_from_user(tmp_buf, buf, c); + if (!c) { + if (!ret) + ret = -EFAULT; + break; + } + cli(); + c1 = CIRC_SPACE_TO_END(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE); + if (c1 < c) + c = c1; + memcpy(info->xmit.buf + info->xmit.head, tmp_buf, c); + info->xmit.head = ((info->xmit.head + c) & + (SERIAL_XMIT_SIZE-1)); + restore_flags(flags); + buf += c; + count -= c; + ret += c; + } + up(&tmp_buf_sem); + } else { + cli(); + while (1) { + c = CIRC_SPACE_TO_END(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE); + if (count < c) + c = count; + if (c <= 0) { + break; + } + memcpy(info->xmit.buf + info->xmit.head, buf, c); + info->xmit.head = ((info->xmit.head + c) & + (SERIAL_XMIT_SIZE-1)); + buf += c; + count -= c; + ret += c; + } + restore_flags(flags); + } + /* + * Hey, we transmit directly from here in our case + */ + if (CIRC_CNT(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE) + && !tty->stopped && !tty->hw_stopped) { + transmit_chars(info, NULL); + } + return ret; +} + +static int rs_write_room(struct tty_struct *tty) +{ + struct async_struct *info = (struct async_struct *)tty->driver_data; + + return CIRC_SPACE(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE); +} + +static int rs_chars_in_buffer(struct tty_struct *tty) +{ + struct async_struct *info = (struct async_struct *)tty->driver_data; + + return CIRC_CNT(info->xmit.head, info->xmit.tail, SERIAL_XMIT_SIZE); +} + +static void rs_flush_buffer(struct tty_struct *tty) +{ + struct async_struct *info = (struct async_struct *)tty->driver_data; + unsigned long flags; + + save_flags(flags); cli(); + info->xmit.head = info->xmit.tail = 0; + restore_flags(flags); + + wake_up_interruptible(&tty->write_wait); + + if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && + tty->ldisc.write_wakeup) + (tty->ldisc.write_wakeup)(tty); +} + +/* + * This function is used to send a high-priority XON/XOFF character to + * the device + */ +static void rs_send_xchar(struct tty_struct *tty, char ch) +{ + struct async_struct *info = (struct async_struct *)tty->driver_data; + + info->x_char = ch; + if (ch) { + /* + * I guess we could call console->write() directly but + * let's do that for now. + */ + transmit_chars(info, NULL); + } +} + +/* + * ------------------------------------------------------------ + * rs_throttle() + * + * This routine is called by the upper-layer tty layer to signal that + * incoming characters should be throttled. + * ------------------------------------------------------------ + */ +static void rs_throttle(struct tty_struct * tty) +{ + if (I_IXOFF(tty)) rs_send_xchar(tty, STOP_CHAR(tty)); + + printk(KERN_INFO "simrs_throttle called\n"); +} + +static void rs_unthrottle(struct tty_struct * tty) +{ + struct async_struct *info = (struct async_struct *)tty->driver_data; + + if (I_IXOFF(tty)) { + if (info->x_char) + info->x_char = 0; + else + rs_send_xchar(tty, START_CHAR(tty)); + } + printk(KERN_INFO "simrs_unthrottle called\n"); +} + +/* + * rs_break() --- routine which turns the break handling on or off + */ +static void rs_break(struct tty_struct *tty, int break_state) +{ +} + +static int rs_ioctl(struct tty_struct *tty, struct file * file, + unsigned int cmd, unsigned long arg) +{ + if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) && + (cmd != TIOCSERCONFIG) && (cmd != TIOCSERGSTRUCT) && + (cmd != TIOCMIWAIT) && (cmd != TIOCGICOUNT)) { + if (tty->flags & (1 << TTY_IO_ERROR)) + return -EIO; + } + + switch (cmd) { + case TIOCMGET: + printk(KERN_INFO "rs_ioctl: TIOCMGET called\n"); + return -EINVAL; + case TIOCMBIS: + case TIOCMBIC: + case TIOCMSET: + printk(KERN_INFO "rs_ioctl: TIOCMBIS/BIC/SET called\n"); + return -EINVAL; + case TIOCGSERIAL: + printk(KERN_INFO "simrs_ioctl TIOCGSERIAL called\n"); + return 0; + case TIOCSSERIAL: + printk(KERN_INFO "simrs_ioctl TIOCSSERIAL called\n"); + return 0; + case TIOCSERCONFIG: + printk(KERN_INFO "rs_ioctl: TIOCSERCONFIG called\n"); + return -EINVAL; + + case TIOCSERGETLSR: /* Get line status register */ + printk(KERN_INFO "rs_ioctl: TIOCSERGETLSR called\n"); + return -EINVAL; + + case TIOCSERGSTRUCT: + printk(KERN_INFO "rs_ioctl: TIOCSERGSTRUCT called\n"); +#if 0 + if (copy_to_user((struct async_struct *) arg, + info, sizeof(struct async_struct))) + return -EFAULT; +#endif + return 0; + + /* + * Wait for any of the 4 modem inputs (DCD,RI,DSR,CTS) to change + * - mask passed in arg for lines of interest + * (use |'ed TIOCM_RNG/DSR/CD/CTS for masking) + * Caller should use TIOCGICOUNT to see which one it was + */ + case TIOCMIWAIT: + printk(KERN_INFO "rs_ioctl: TIOCMIWAIT: called\n"); + return 0; + /* + * Get counter of input serial line interrupts (DCD,RI,DSR,CTS) + * Return: write counters to the user passed counter struct + * NB: both 1->0 and 0->1 transitions are counted except for + * RI where only 0->1 is counted. + */ + case TIOCGICOUNT: + printk(KERN_INFO "rs_ioctl: TIOCGICOUNT called\n"); + return 0; + + case TIOCSERGWILD: + case TIOCSERSWILD: + /* "setserial -W" is called in Debian boot */ + printk (KERN_INFO "TIOCSER?WILD ioctl obsolete, ignored.\n"); + return 0; + + default: + return -ENOIOCTLCMD; + } + return 0; +} + +#define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK)) + +static void rs_set_termios(struct tty_struct *tty, struct termios *old_termios) +{ + unsigned int cflag = tty->termios->c_cflag; + + if ( (cflag == old_termios->c_cflag) + && ( RELEVANT_IFLAG(tty->termios->c_iflag) + == RELEVANT_IFLAG(old_termios->c_iflag))) + return; + + + /* Handle turning off CRTSCTS */ + if ((old_termios->c_cflag & CRTSCTS) && + !(tty->termios->c_cflag & CRTSCTS)) { + tty->hw_stopped = 0; + rs_start(tty); + } +} +/* + * This routine will shutdown a serial port; interrupts are disabled, and + * DTR is dropped if the hangup on close termio flag is on. + */ +static void shutdown(struct async_struct * info) +{ + unsigned long flags; + struct serial_state *state; + int retval; + + if (!(info->flags & ASYNC_INITIALIZED)) return; + + state = info->state; + +#ifdef SIMSERIAL_DEBUG + printk("Shutting down serial port %d (irq %d)....", info->line, + state->irq); +#endif + + save_flags(flags); cli(); /* Disable interrupts */ + + /* + * First unlink the serial port from the IRQ chain... + */ + if (info->next_port) + info->next_port->prev_port = info->prev_port; + if (info->prev_port) + info->prev_port->next_port = info->next_port; + else + IRQ_ports[state->irq] = info->next_port; + + /* + * Free the IRQ, if necessary + */ + if (state->irq && (!IRQ_ports[state->irq] || + !IRQ_ports[state->irq]->next_port)) { + if (IRQ_ports[state->irq]) { + free_irq(state->irq, NULL); + retval = request_irq(state->irq, rs_interrupt_single, + IRQ_T(info), "serial", NULL); + + if (retval) + printk(KERN_ERR "serial shutdown: request_irq: error %d" + " Couldn't reacquire IRQ.\n", retval); + } else + free_irq(state->irq, NULL); + } + + if (info->xmit.buf) { + free_page((unsigned long) info->xmit.buf); + info->xmit.buf = 0; + } + + if (info->tty) set_bit(TTY_IO_ERROR, &info->tty->flags); + + info->flags &= ~ASYNC_INITIALIZED; + restore_flags(flags); +} + +/* + * ------------------------------------------------------------ + * rs_close() + * + * This routine is called when the serial port gets closed. First, we + * wait for the last remaining data to be sent. Then, we unlink its + * async structure from the interrupt chain if necessary, and we free + * that IRQ if nothing is left in the chain. + * ------------------------------------------------------------ + */ +static void rs_close(struct tty_struct *tty, struct file * filp) +{ + struct async_struct * info = (struct async_struct *)tty->driver_data; + struct serial_state *state; + unsigned long flags; + + if (!info ) return; + + state = info->state; + + save_flags(flags); cli(); + + if (tty_hung_up_p(filp)) { +#ifdef SIMSERIAL_DEBUG + printk("rs_close: hung_up\n"); +#endif + MOD_DEC_USE_COUNT; + restore_flags(flags); + return; + } +#ifdef SIMSERIAL_DEBUG + printk("rs_close ttys%d, count = %d\n", info->line, state->count); +#endif + if ((tty->count == 1) && (state->count != 1)) { + /* + * Uh, oh. tty->count is 1, which means that the tty + * structure will be freed. state->count should always + * be one in these conditions. If it's greater than + * one, we've got real problems, since it means the + * serial port won't be shutdown. + */ + printk(KERN_ERR "rs_close: bad serial port count; tty->count is 1, " + "state->count is %d\n", state->count); + state->count = 1; + } + if (--state->count < 0) { + printk(KERN_ERR "rs_close: bad serial port count for ttys%d: %d\n", + info->line, state->count); + state->count = 0; + } + if (state->count) { + MOD_DEC_USE_COUNT; + restore_flags(flags); + return; + } + info->flags |= ASYNC_CLOSING; + restore_flags(flags); + + /* + * Now we wait for the transmit buffer to clear; and we notify + * the line discipline to only process XON/XOFF characters. + */ + shutdown(info); + if (tty->driver.flush_buffer) tty->driver.flush_buffer(tty); + if (tty->ldisc.flush_buffer) tty->ldisc.flush_buffer(tty); + info->event = 0; + info->tty = 0; + if (info->blocked_open) { + if (info->close_delay) { + current->state = TASK_INTERRUPTIBLE; + schedule_timeout(info->close_delay); + } + wake_up_interruptible(&info->open_wait); + } + info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CALLOUT_ACTIVE|ASYNC_CLOSING); + wake_up_interruptible(&info->close_wait); + MOD_DEC_USE_COUNT; +} + +/* + * rs_wait_until_sent() --- wait until the transmitter is empty + */ +static void rs_wait_until_sent(struct tty_struct *tty, int timeout) +{ +} + + +/* + * rs_hangup() --- called by tty_hangup() when a hangup is signaled. + */ +static void rs_hangup(struct tty_struct *tty) +{ + struct async_struct * info = (struct async_struct *)tty->driver_data; + struct serial_state *state = info->state; + +#ifdef SIMSERIAL_DEBUG + printk("rs_hangup: called\n"); +#endif + + state = info->state; + + rs_flush_buffer(tty); + if (info->flags & ASYNC_CLOSING) + return; + shutdown(info); + + info->event = 0; + state->count = 0; + info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CALLOUT_ACTIVE); + info->tty = 0; + wake_up_interruptible(&info->open_wait); +} + + +static int get_async_struct(int line, struct async_struct **ret_info) +{ + struct async_struct *info; + struct serial_state *sstate; + + sstate = rs_table + line; + sstate->count++; + if (sstate->info) { + *ret_info = sstate->info; + return 0; + } + info = kmalloc(sizeof(struct async_struct), GFP_KERNEL); + if (!info) { + sstate->count--; + return -ENOMEM; + } + memset(info, 0, sizeof(struct async_struct)); + init_waitqueue_head(&info->open_wait); + init_waitqueue_head(&info->close_wait); + init_waitqueue_head(&info->delta_msr_wait); + info->magic = SERIAL_MAGIC; + info->port = sstate->port; + info->flags = sstate->flags; + info->xmit_fifo_size = sstate->xmit_fifo_size; + info->line = line; + info->tqueue.routine = do_softint; + info->tqueue.data = info; + info->state = sstate; + if (sstate->info) { + kfree(info); + *ret_info = sstate->info; + return 0; + } + *ret_info = sstate->info = info; + return 0; +} + +static int +startup(struct async_struct *info) +{ + unsigned long flags; + int retval=0; + void (*handler)(int, void *, struct pt_regs *); + struct serial_state *state= info->state; + unsigned long page; + + page = get_free_page(GFP_KERNEL); + if (!page) + return -ENOMEM; + + save_flags(flags); cli(); + + if (info->flags & ASYNC_INITIALIZED) { + free_page(page); + goto errout; + } + + if (!state->port || !state->type) { + if (info->tty) set_bit(TTY_IO_ERROR, &info->tty->flags); + free_page(page); + goto errout; + } + if (info->xmit.buf) + free_page(page); + else + info->xmit.buf = (unsigned char *) page; + +#ifdef SIMSERIAL_DEBUG + printk("startup: ttys%d (irq %d)...", info->line, state->irq); +#endif + + /* + * Allocate the IRQ if necessary + */ + if (state->irq && (!IRQ_ports[state->irq] || + !IRQ_ports[state->irq]->next_port)) { + if (IRQ_ports[state->irq]) { + retval = -EBUSY; + goto errout; + } else + handler = rs_interrupt_single; + + retval = request_irq(state->irq, handler, IRQ_T(info), "simserial", NULL); + if (retval) { + if (capable(CAP_SYS_ADMIN)) { + if (info->tty) + set_bit(TTY_IO_ERROR, + &info->tty->flags); + retval = 0; + } + goto errout; + } + } + + /* + * Insert serial port into IRQ chain. + */ + info->prev_port = 0; + info->next_port = IRQ_ports[state->irq]; + if (info->next_port) + info->next_port->prev_port = info; + IRQ_ports[state->irq] = info; + + if (info->tty) clear_bit(TTY_IO_ERROR, &info->tty->flags); + + info->xmit.head = info->xmit.tail = 0; + +#if 0 + /* + * Set up serial timers... + */ + timer_table[RS_TIMER].expires = jiffies + 2*HZ/100; + timer_active |= 1 << RS_TIMER; +#endif + + /* + * Set up the tty->alt_speed kludge + */ + if (info->tty) { + if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI) + info->tty->alt_speed = 57600; + if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI) + info->tty->alt_speed = 115200; + if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_SHI) + info->tty->alt_speed = 230400; + if ((info->flags & ASYNC_SPD_MASK) == ASYNC_SPD_WARP) + info->tty->alt_speed = 460800; + } + + info->flags |= ASYNC_INITIALIZED; + restore_flags(flags); + return 0; + +errout: + restore_flags(flags); + return retval; +} + + +/* + * This routine is called whenever a serial port is opened. It + * enables interrupts for a serial port, linking in its async structure into + * the IRQ chain. It also performs the serial-specific + * initialization for the tty structure. + */ +static int rs_open(struct tty_struct *tty, struct file * filp) +{ + struct async_struct *info; + int retval, line; + unsigned long page; + + MOD_INC_USE_COUNT; + line = MINOR(tty->device) - tty->driver.minor_start; + if ((line < 0) || (line >= NR_PORTS)) { + MOD_DEC_USE_COUNT; + return -ENODEV; + } + retval = get_async_struct(line, &info); + if (retval) { + MOD_DEC_USE_COUNT; + return retval; + } + tty->driver_data = info; + info->tty = tty; + +#ifdef SIMSERIAL_DEBUG + printk("rs_open %s%d, count = %d\n", tty->driver.name, info->line, + info->state->count); +#endif + info->tty->low_latency = (info->flags & ASYNC_LOW_LATENCY) ? 1 : 0; + + if (!tmp_buf) { + page = get_free_page(GFP_KERNEL); + if (!page) { + /* MOD_DEC_USE_COUNT; "info->tty" will cause this? */ + return -ENOMEM; + } + if (tmp_buf) + free_page(page); + else + tmp_buf = (unsigned char *) page; + } + + /* + * If the port is the middle of closing, bail out now + */ + if (tty_hung_up_p(filp) || + (info->flags & ASYNC_CLOSING)) { + if (info->flags & ASYNC_CLOSING) + interruptible_sleep_on(&info->close_wait); + /* MOD_DEC_USE_COUNT; "info->tty" will cause this? */ +#ifdef SERIAL_DO_RESTART + return ((info->flags & ASYNC_HUP_NOTIFY) ? + -EAGAIN : -ERESTARTSYS); +#else + return -EAGAIN; +#endif + } + + /* + * Start up serial port + */ + retval = startup(info); + if (retval) { + /* MOD_DEC_USE_COUNT; "info->tty" will cause this? */ + return retval; + } + + if ((info->state->count == 1) && + (info->flags & ASYNC_SPLIT_TERMIOS)) { + if (tty->driver.subtype == SERIAL_TYPE_NORMAL) + *tty->termios = info->state->normal_termios; + else + *tty->termios = info->state->callout_termios; + } + + /* + * figure out which console to use (should be one already) + */ + console = console_drivers; + while (console) { + if ((console->flags & CON_ENABLED) && console->write) break; + console = console->next; + } + + info->session = current->session; + info->pgrp = current->pgrp; + +#ifdef SIMSERIAL_DEBUG + printk("rs_open ttys%d successful\n", info->line); +#endif + return 0; +} + +/* + * /proc fs routines.... + */ + +static inline int line_info(char *buf, struct serial_state *state) +{ + return sprintf(buf, "%d: uart:%s port:%lX irq:%d\n", + state->line, uart_config[state->type].name, + state->port, state->irq); +} + +static int rs_read_proc(char *page, char **start, off_t off, int count, + int *eof, void *data) +{ + int i, len = 0, l; + off_t begin = 0; + + len += sprintf(page, "simserinfo:1.0 driver:%s\n", serial_version); + for (i = 0; i < NR_PORTS && len < 4000; i++) { + l = line_info(page + len, &rs_table[i]); + len += l; + if (len+begin > off+count) + goto done; + if (len+begin < off) { + begin += len; + len = 0; + } + } + *eof = 1; +done: + if (off >= len+begin) + return 0; + *start = page + (begin-off); + return ((count < begin+len-off) ? count : begin+len-off); +} + +/* + * --------------------------------------------------------------------- + * rs_init() and friends + * + * rs_init() is called at boot-time to initialize the serial driver. + * --------------------------------------------------------------------- + */ + +/* + * This routine prints out the appropriate serial driver version + * number, and identifies which options were configured into this + * driver. + */ +static inline void show_serial_version(void) +{ + printk(KERN_INFO "%s version %s with", serial_name, serial_version); + printk(KERN_INFO " no serial options enabled\n"); +} + +/* + * The serial driver boot-time initialization code! + */ +static int __init +simrs_init (void) +{ + int i; + struct serial_state *state; + + show_serial_version(); + + /* Initialize the tty_driver structure */ + + memset(&serial_driver, 0, sizeof(struct tty_driver)); + serial_driver.magic = TTY_DRIVER_MAGIC; + serial_driver.driver_name = "simserial"; + serial_driver.name = "ttyS"; + serial_driver.major = TTY_MAJOR; + serial_driver.minor_start = 64; + serial_driver.num = 1; + serial_driver.type = TTY_DRIVER_TYPE_SERIAL; + serial_driver.subtype = SERIAL_TYPE_NORMAL; + serial_driver.init_termios = tty_std_termios; + serial_driver.init_termios.c_cflag = + B9600 | CS8 | CREAD | HUPCL | CLOCAL; + serial_driver.flags = TTY_DRIVER_REAL_RAW; + serial_driver.refcount = &serial_refcount; + serial_driver.table = serial_table; + serial_driver.termios = serial_termios; + serial_driver.termios_locked = serial_termios_locked; + + serial_driver.open = rs_open; + serial_driver.close = rs_close; + serial_driver.write = rs_write; + serial_driver.put_char = rs_put_char; + serial_driver.flush_chars = rs_flush_chars; + serial_driver.write_room = rs_write_room; + serial_driver.chars_in_buffer = rs_chars_in_buffer; + serial_driver.flush_buffer = rs_flush_buffer; + serial_driver.ioctl = rs_ioctl; + serial_driver.throttle = rs_throttle; + serial_driver.unthrottle = rs_unthrottle; + serial_driver.send_xchar = rs_send_xchar; + serial_driver.set_termios = rs_set_termios; + serial_driver.stop = rs_stop; + serial_driver.start = rs_start; + serial_driver.hangup = rs_hangup; + serial_driver.break_ctl = rs_break; + serial_driver.wait_until_sent = rs_wait_until_sent; + serial_driver.read_proc = rs_read_proc; + + /* + * Let's have a little bit of fun ! + */ + for (i = 0, state = rs_table; i < NR_PORTS; i++,state++) { + + if (state->type == PORT_UNKNOWN) continue; + + if (!state->irq) { + state->irq = ia64_alloc_vector(); + ia64_ssc_connect_irq(KEYBOARD_INTR, state->irq); + } + + printk(KERN_INFO "ttyS%02d at 0x%04lx (irq = %d) is a %s\n", + state->line, + state->port, state->irq, + uart_config[state->type].name); + } + /* + * The callout device is just like normal device except for + * major number and the subtype code. + */ + callout_driver = serial_driver; + callout_driver.name = "cua"; + callout_driver.major = TTYAUX_MAJOR; + callout_driver.subtype = SERIAL_TYPE_CALLOUT; + callout_driver.read_proc = 0; + callout_driver.proc_entry = 0; + + if (tty_register_driver(&serial_driver)) + panic("Couldn't register simserial driver\n"); + + if (tty_register_driver(&callout_driver)) + panic("Couldn't register callout driver\n"); + + return 0; +} + +#ifndef MODULE +__initcall(simrs_init); +#endif diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/hp/common/sba_iommu.c linux-2.4.23-pre8/arch/ia64/hp/common/sba_iommu.c --- linux-2.4.22/arch/ia64/hp/common/sba_iommu.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/hp/common/sba_iommu.c 2003-10-22 22:49:05.000000000 +0000 @@ -1895,22 +1895,26 @@ struct ioc *ioc; acpi_status status; u64 hpa, length; - acpi_device_info dev_info; + struct acpi_buffer buffer; + struct acpi_device_info *dev_info; status = acpi_hp_csr_space(device->handle, &hpa, &length); if (ACPI_FAILURE(status)) return 1; - status = acpi_get_object_info(device->handle, &dev_info); + buffer.length = ACPI_ALLOCATE_LOCAL_BUFFER; + status = acpi_get_object_info(device->handle, &buffer); if (ACPI_FAILURE(status)) return 1; + dev_info = buffer.pointer; /* * For HWP0001, only SBA appears in ACPI namespace. It encloses the PCI * root bridges, and its CSR space includes the IOC function. */ - if (strncmp("HWP0001", dev_info.hardware_id, 7) == 0) + if (strncmp("HWP0001", dev_info->hardware_id.value, 7) == 0) hpa += ZX1_IOC_OFFSET; + ACPI_MEM_FREE(dev_info); ioc = ioc_init(hpa, device->handle); if (!ioc) diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/hp/zx1/hpzx1_misc.c linux-2.4.23-pre8/arch/ia64/hp/zx1/hpzx1_misc.c --- linux-2.4.22/arch/ia64/hp/zx1/hpzx1_misc.c 2003-06-13 14:51:29.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/hp/zx1/hpzx1_misc.c 2003-10-22 22:49:10.000000000 +0000 @@ -210,7 +210,7 @@ { u64 csr_base = 0, csr_length = 0; acpi_status status; - NATIVE_UINT busnum; + acpi_native_uint busnum; char *name = context; char fullname[32]; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/ia32/ia32_signal.c linux-2.4.23-pre8/arch/ia64/ia32/ia32_signal.c --- linux-2.4.22/arch/ia64/ia32/ia32_signal.c 2003-06-13 14:51:29.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/ia32/ia32_signal.c 2003-10-22 22:47:31.000000000 +0000 @@ -171,8 +171,10 @@ * datasel ar.fdr(32:47) * * _st[(0+TOS)%8] f8 - * _st[(1+TOS)%8] f9 (f8, f9 from ptregs) - * : : : (f10..f15 from live reg) + * _st[(1+TOS)%8] f9 + * _st[(2+TOS)%8] f10 + * _st[(3+TOS)%8] f11 (f8..f11 from ptregs) + * : : : (f12..f15 from live reg) * : : : * _st[(7+TOS)%8] f15 TOS=sw.top(bits11:13) * @@ -254,8 +256,8 @@ __put_user( 0, &save->magic); //#define X86_FXSR_MAGIC 0x0000 /* - * save f8 and f9 from pt_regs - * save f10..f15 from live register set + * save f8..f11 from pt_regs + * save f12..f15 from live register set */ /* * Find the location where f8 has to go in fp reg stack. This depends on @@ -270,11 +272,11 @@ copy_to_user(&save->_st[(0+fr8_st_map)&0x7], fpregp, sizeof(struct _fpreg_ia32)); ia64f2ia32f(fpregp, &ptp->f9); copy_to_user(&save->_st[(1+fr8_st_map)&0x7], fpregp, sizeof(struct _fpreg_ia32)); - - __stfe(fpregp, 10); + ia64f2ia32f(fpregp, &ptp->f10); copy_to_user(&save->_st[(2+fr8_st_map)&0x7], fpregp, sizeof(struct _fpreg_ia32)); - __stfe(fpregp, 11); + ia64f2ia32f(fpregp, &ptp->f11); copy_to_user(&save->_st[(3+fr8_st_map)&0x7], fpregp, sizeof(struct _fpreg_ia32)); + __stfe(fpregp, 12); copy_to_user(&save->_st[(4+fr8_st_map)&0x7], fpregp, sizeof(struct _fpreg_ia32)); __stfe(fpregp, 13); @@ -386,8 +388,8 @@ asm volatile ( "mov ar.fdr=%0;" :: "r"(fdr)); /* - * restore f8, f9 onto pt_regs - * restore f10..f15 onto live registers + * restore f8..f11 onto pt_regs + * restore f12..f15 onto live registers */ /* * Find the location where f8 has to go in fp reg stack. This depends on @@ -403,11 +405,11 @@ ia32f2ia64f(&ptp->f8, fpregp); copy_from_user(fpregp, &save->_st[(1+fr8_st_map)&0x7], sizeof(struct _fpreg_ia32)); ia32f2ia64f(&ptp->f9, fpregp); - copy_from_user(fpregp, &save->_st[(2+fr8_st_map)&0x7], sizeof(struct _fpreg_ia32)); - __ldfe(10, fpregp); + ia32f2ia64f(&ptp->f10, fpregp); copy_from_user(fpregp, &save->_st[(3+fr8_st_map)&0x7], sizeof(struct _fpreg_ia32)); - __ldfe(11, fpregp); + ia32f2ia64f(&ptp->f11, fpregp); + copy_from_user(fpregp, &save->_st[(4+fr8_st_map)&0x7], sizeof(struct _fpreg_ia32)); __ldfe(12, fpregp); copy_from_user(fpregp, &save->_st[(5+fr8_st_map)&0x7], sizeof(struct _fpreg_ia32)); @@ -739,11 +741,11 @@ #define COPY(ia64x, ia32x) err |= __get_user(regs->ia64x, &sc->ia32x) -#define copyseg_gs(tmp) (regs->r16 |= (unsigned long) tmp << 48) -#define copyseg_fs(tmp) (regs->r16 |= (unsigned long) tmp << 32) +#define copyseg_gs(tmp) (regs->r16 |= (unsigned long) (tmp) << 48) +#define copyseg_fs(tmp) (regs->r16 |= (unsigned long) (tmp) << 32) #define copyseg_cs(tmp) (regs->r17 |= tmp) -#define copyseg_ss(tmp) (regs->r17 |= (unsigned long) tmp << 16) -#define copyseg_es(tmp) (regs->r16 |= (unsigned long) tmp << 16) +#define copyseg_ss(tmp) (regs->r17 |= (unsigned long) (tmp) << 16) +#define copyseg_es(tmp) (regs->r16 |= (unsigned long) (tmp) << 16) #define copyseg_ds(tmp) (regs->r16 |= tmp) #define COPY_SEG(seg) \ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/ia32/ia32_support.c linux-2.4.23-pre8/arch/ia64/ia32/ia32_support.c --- linux-2.4.22/arch/ia64/ia32/ia32_support.c 2003-06-13 14:51:29.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/ia32/ia32_support.c 2003-10-22 22:47:39.000000000 +0000 @@ -60,30 +60,26 @@ regs->r27 = load_desc(regs->r16 >> 0); /* DSD */ regs->r28 = load_desc(regs->r16 >> 32); /* FSD */ regs->r29 = load_desc(regs->r16 >> 48); /* GSD */ - task->thread.csd = load_desc(regs->r17 >> 0); /* CSD */ - task->thread.ssd = load_desc(regs->r17 >> 16); /* SSD */ + regs->ar_csd = load_desc(regs->r17 >> 0); /* CSD */ + regs->ar_ssd = load_desc(regs->r17 >> 16); /* SSD */ } void ia32_save_state (struct task_struct *t) { - unsigned long eflag, fsr, fcr, fir, fdr, csd, ssd; + unsigned long eflag, fsr, fcr, fir, fdr; asm ("mov %0=ar.eflag;" "mov %1=ar.fsr;" "mov %2=ar.fcr;" "mov %3=ar.fir;" "mov %4=ar.fdr;" - "mov %5=ar.csd;" - "mov %6=ar.ssd;" - : "=r"(eflag), "=r"(fsr), "=r"(fcr), "=r"(fir), "=r"(fdr), "=r"(csd), "=r"(ssd)); + : "=r"(eflag), "=r"(fsr), "=r"(fcr), "=r"(fir), "=r"(fdr)); t->thread.eflag = eflag; t->thread.fsr = fsr; t->thread.fcr = fcr; t->thread.fir = fir; t->thread.fdr = fdr; - t->thread.csd = csd; - t->thread.ssd = ssd; ia64_set_kr(IA64_KR_IO_BASE, t->thread.old_iob); ia64_set_kr(IA64_KR_TSSD, t->thread.old_k1); } @@ -91,7 +87,7 @@ void ia32_load_state (struct task_struct *t) { - unsigned long eflag, fsr, fcr, fir, fdr, csd, ssd, tssd; + unsigned long eflag, fsr, fcr, fir, fdr, tssd; struct pt_regs *regs = ia64_task_regs(t); int nr = smp_processor_id(); /* LDT and TSS depend on CPU number: */ @@ -100,8 +96,6 @@ fcr = t->thread.fcr; fir = t->thread.fir; fdr = t->thread.fdr; - csd = t->thread.csd; - ssd = t->thread.ssd; tssd = load_desc(_TSS(nr)); /* TSSD */ asm volatile ("mov ar.eflag=%0;" @@ -109,9 +103,7 @@ "mov ar.fcr=%2;" "mov ar.fir=%3;" "mov ar.fdr=%4;" - "mov ar.csd=%5;" - "mov ar.ssd=%6;" - :: "r"(eflag), "r"(fsr), "r"(fcr), "r"(fir), "r"(fdr), "r"(csd), "r"(ssd)); + :: "r"(eflag), "r"(fsr), "r"(fcr), "r"(fir), "r"(fdr)); current->thread.old_iob = ia64_get_kr(IA64_KR_IO_BASE); current->thread.old_k1 = ia64_get_kr(IA64_KR_TSSD); ia64_set_kr(IA64_KR_IO_BASE, IA32_IOBASE); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/ia32/sys_ia32.c linux-2.4.23-pre8/arch/ia64/ia32/sys_ia32.c --- linux-2.4.22/arch/ia64/ia32/sys_ia32.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/ia32/sys_ia32.c 2003-10-22 22:49:05.000000000 +0000 @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -165,9 +166,9 @@ current->thread.map_base = old_map_base; current->thread.task_size = old_task_size; set_fs(USER_DS); /* establish new task-size as the address-limit */ - out: - kfree(av); } + out: + kfree(av); return r; } @@ -2147,7 +2148,6 @@ #define SEMOP 1 #define SEMGET 2 #define SEMCTL 3 -#define SEMTIMEDOP 4 #define MSGSND 11 #define MSGRCV 12 #define MSGGET 13 @@ -2579,17 +2579,6 @@ return err; } -static long -semtimedop32(int semid, struct sembuf *tsems, int nsems, - const struct timespec32 *timeout32) -{ - struct timespec t; - if (get_user (t.tv_sec, &timeout32->tv_sec) || - get_user (t.tv_nsec, &timeout32->tv_nsec)) - return -EFAULT; - return sys_semtimedop(semid, tsems, nsems, &t); -} - asmlinkage long sys32_ipc (u32 call, int first, int second, int third, u32 ptr, u32 fifth) { @@ -2601,11 +2590,7 @@ switch (call) { case SEMOP: /* struct sembuf is the same on 32 and 64bit :)) */ - return sys_semtimedop(first, (struct sembuf *)AA(ptr), second, - NULL); - case SEMTIMEDOP: - return semtimedop32(first, (struct sembuf *)AA(ptr), second, - (const struct timespec32 *)AA(fifth)); + return sys_semop(first, (struct sembuf *)AA(ptr), second); case SEMGET: return sys_semget(first, second, third); case SEMCTL: @@ -2903,12 +2888,16 @@ ia64f2ia32f(f, &ptp->f9); break; case 2: + ia64f2ia32f(f, &ptp->f10); + break; case 3: + ia64f2ia32f(f, &ptp->f11); + break; case 4: case 5: case 6: case 7: - ia64f2ia32f(f, &swp->f10 + (regno - 2)); + ia64f2ia32f(f, &swp->f12 + (regno - 4)); break; } copy_to_user(reg, f, sizeof(*reg)); @@ -2929,12 +2918,16 @@ copy_from_user(&ptp->f9, reg, sizeof(*reg)); break; case 2: + copy_from_user(&ptp->f10, reg, sizeof(*reg)); + break; case 3: + copy_from_user(&ptp->f11, reg, sizeof(*reg)); + break; case 4: case 5: case 6: case 7: - copy_from_user(&swp->f10 + (regno - 2), reg, sizeof(*reg)); + copy_from_user(&swp->f12 + (regno - 4), reg, sizeof(*reg)); break; } return; @@ -3635,9 +3628,11 @@ return -EFAULT; old_fs = get_fs(); set_fs(KERNEL_DS); - ret = sys_fcntl(fd, cmd, (unsigned long) &f); + ret = sys_fcntl(fd, (cmd == F_GETLK64) ? F_GETLK : + ((cmd == F_SETLK64) ? F_SETLK : F_SETLKW), + (unsigned long) &f); set_fs(old_fs); - if (cmd == F_GETLK && ia32_put_flock(&f, arg)) + if (cmd == F_GETLK64 && ia32_put_flock(&f, arg)) return -EFAULT; break; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/kernel/Makefile linux-2.4.23-pre8/arch/ia64/kernel/Makefile --- linux-2.4.22/arch/ia64/kernel/Makefile 2002-11-28 23:53:09.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/kernel/Makefile 2003-10-22 22:48:54.000000000 +0000 @@ -17,6 +17,7 @@ machvec.o pal.o process.o perfmon.o ptrace.o sal.o salinfo.o semaphore.o setup.o \ signal.o sys_ia64.o traps.o time.o unaligned.o unwind.o obj-$(CONFIG_IA64_GENERIC) += iosapic.o +obj-$(CONFIG_IA64_SGI_SN2) += iosapic.o obj-$(CONFIG_IA64_HP_ZX1) += iosapic.o obj-$(CONFIG_IA64_DIG) += iosapic.o obj-$(CONFIG_IA64_PALINFO) += palinfo.o diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/kernel/acpi.c linux-2.4.23-pre8/arch/ia64/kernel/acpi.c --- linux-2.4.22/arch/ia64/kernel/acpi.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/kernel/acpi.c 2003-10-22 22:48:55.000000000 +0000 @@ -8,6 +8,9 @@ * Copyright (C) 2000 Intel Corp. * Copyright (C) 2000,2001 J.I. Lee * Copyright (C) 2001 Paul Diefenbaugh + * Copyright (C) 2001 Jenna Hall + * Copyright (C) 2001 Takayoshi Kochi + * Copyright (C) 2002 Erich Focht * * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * @@ -38,11 +41,14 @@ #include #include #include +#include +#include #include #include #include #include #include +#include #define PREFIX "ACPI: " @@ -59,6 +65,8 @@ unsigned char acpi_kbd_controller_present = 1; +int acpi_disabled __initdata; /* XXX this shouldn't be needed---we can't boot without ACPI! */ + const char * acpi_get_sysname (void) { @@ -90,6 +98,9 @@ if (!strcmp(hdr->oem_id, "HP")) { return "hpzx1"; } + else if (!strcmp(hdr->oem_id, "SGI")) { + return "sn2"; + } return "dig"; #else @@ -97,8 +108,6 @@ return "hpsim"; # elif defined (CONFIG_IA64_HP_ZX1) return "hpzx1"; -# elif defined (CONFIG_IA64_SGI_SN1) - return "sn1"; # elif defined (CONFIG_IA64_SGI_SN2) return "sn2"; # elif defined (CONFIG_IA64_DIG) @@ -123,17 +132,17 @@ }; acpi_status -acpi_vendor_resource_match(acpi_resource *resource, void *context) +acpi_vendor_resource_match (struct acpi_resource *resource, void *context) { struct acpi_vendor_info *info = (struct acpi_vendor_info *) context; - acpi_resource_vendor *vendor; + struct acpi_resource_vendor *vendor; struct acpi_vendor_descriptor *descriptor; u32 length; if (resource->id != ACPI_RSTYPE_VENDOR) return AE_OK; - vendor = (acpi_resource_vendor *) &resource->data; + vendor = (struct acpi_resource_vendor *) &resource->data; descriptor = (struct acpi_vendor_descriptor *) vendor->reserved; if (vendor->length <= sizeof(*info->descriptor) || descriptor->guid_id != info->descriptor->guid_id || @@ -151,7 +160,7 @@ } acpi_status -acpi_find_vendor_resource(acpi_handle obj, struct acpi_vendor_descriptor *id, +acpi_find_vendor_resource (acpi_handle obj, struct acpi_vendor_descriptor *id, u8 **data, u32 *length) { struct acpi_vendor_info info; @@ -174,12 +183,11 @@ }; acpi_status -acpi_hp_csr_space(acpi_handle obj, u64 *csr_base, u64 *csr_length) +acpi_hp_csr_space (acpi_handle obj, u64 *csr_base, u64 *csr_length) { acpi_status status; u8 *data; u32 length; - int i; status = acpi_find_vendor_resource(obj, &hp_ccsr_descriptor, &data, &length); @@ -200,7 +208,9 @@ #define ACPI_MAX_PLATFORM_INTERRUPTS 256 /* Array to record platform interrupt vectors for generic interrupt routing. */ -int platform_intr_list[ACPI_MAX_PLATFORM_INTERRUPTS] = { [0 ... ACPI_MAX_PLATFORM_INTERRUPTS - 1] = -1 }; +int platform_intr_list[ACPI_MAX_PLATFORM_INTERRUPTS] = { + [0 ... ACPI_MAX_PLATFORM_INTERRUPTS - 1] = -1 +}; enum acpi_irq_model_id acpi_irq_model = ACPI_IRQ_MODEL_IOSAPIC; @@ -214,7 +224,7 @@ int vector = -1; if (int_type < ACPI_MAX_PLATFORM_INTERRUPTS) { - /* correctable platform error interrupt */ + /* corrected platform error interrupt */ vector = platform_intr_list[int_type]; } else printk(KERN_ERR "acpi_request_vector(): invalid interrupt type\n"); @@ -252,7 +262,6 @@ iounmap((void *) ipi_base_addr); ipi_base_addr = (unsigned long) ioremap(lapic->address, 0); } - return 0; } @@ -261,7 +270,6 @@ acpi_parse_lsapic (acpi_table_entry_header *header) { struct acpi_table_lsapic *lsapic; - int phys_id; lsapic = (struct acpi_table_lsapic *) header; if (!lsapic) @@ -269,30 +277,21 @@ acpi_table_print_madt_entry(header); - phys_id = (lsapic->id << 8) | lsapic->eid; - - if (total_cpus == NR_CPUS) { - printk(KERN_ERR PREFIX "Ignoring CPU (0x%04x) (NR_CPUS == %d)\n", - phys_id, NR_CPUS); - return 0; - } - - printk(KERN_INFO "CPU %d (0x%04x)", total_cpus, phys_id); + printk(KERN_INFO "CPU %d (0x%04x)", total_cpus, (lsapic->id << 8) | lsapic->eid); - if (lsapic->flags.enabled) { - available_cpus++; + if (!lsapic->flags.enabled) + printk(" disabled"); + else if (available_cpus >= NR_CPUS) + printk(" ignored (increase NR_CPUS)"); + else { printk(" enabled"); #ifdef CONFIG_SMP - smp_boot_data.cpu_phys_id[total_cpus] = phys_id; - if (hard_smp_processor_id() == smp_boot_data.cpu_phys_id[total_cpus]) + smp_boot_data.cpu_phys_id[available_cpus] = (lsapic->id << 8) | lsapic->eid; + if (hard_smp_processor_id() + == (unsigned int) smp_boot_data.cpu_phys_id[available_cpus]) printk(" (BSP)"); #endif - } - else { - printk(" disabled"); -#ifdef CONFIG_SMP - smp_boot_data.cpu_phys_id[total_cpus] = -1; -#endif + ++available_cpus; } printk("\n"); @@ -314,7 +313,6 @@ acpi_table_print_madt_entry(header); /* TBD: Support lapic_nmi entries */ - return 0; } @@ -405,7 +403,6 @@ acpi_table_print_madt_entry(header); /* TBD: Support nimsrc entries */ - return 0; } @@ -437,22 +434,209 @@ } +#ifdef CONFIG_ACPI_NUMA + +#define PXM_FLAG_LEN ((MAX_PXM_DOMAINS + 1)/32) + +static int __initdata srat_num_cpus; /* number of cpus */ +static u32 __initdata pxm_flag[PXM_FLAG_LEN]; +#define pxm_bit_set(bit) (set_bit(bit,(void *)pxm_flag)) +#define pxm_bit_test(bit) (test_bit(bit,(void *)pxm_flag)) +/* maps to convert between proximity domain and logical node ID */ +int __initdata pxm_to_nid_map[MAX_PXM_DOMAINS]; +int __initdata nid_to_pxm_map[NR_NODES]; +struct acpi_table_slit __initdata *slit_table; + +/* + * ACPI 2.0 SLIT (System Locality Information Table) + * http://devresource.hp.com/devresource/Docs/TechPapers/IA64/slit.pdf + */ +void __init +acpi_numa_slit_init (struct acpi_table_slit *slit) +{ + u32 len; + + len = sizeof(struct acpi_table_header) + 8 + + slit->localities * slit->localities; + if (slit->header.length != len) { + printk("KERN_INFO ACPI 2.0 SLIT: size mismatch: %d expected, %d actual\n", + len, slit->header.length); + memset(numa_slit, 10, sizeof(numa_slit)); + return; + } + slit_table = slit; +} + +void __init +acpi_numa_processor_affinity_init (struct acpi_table_processor_affinity *pa) +{ + /* record this node in proximity bitmap */ + pxm_bit_set(pa->proximity_domain); + + node_cpuid[srat_num_cpus].phys_id = (pa->apic_id << 8) | (pa->lsapic_eid); + /* nid should be overridden as logical node id later */ + node_cpuid[srat_num_cpus].nid = pa->proximity_domain; + srat_num_cpus++; +} + +void __init +acpi_numa_memory_affinity_init (struct acpi_table_memory_affinity *ma) +{ + unsigned long paddr, size, hole_size, min_hole_size; + u8 pxm; + struct node_memblk_s *p, *q, *pend; + + pxm = ma->proximity_domain; + + /* fill node memory chunk structure */ + paddr = ma->base_addr_hi; + paddr = (paddr << 32) | ma->base_addr_lo; + size = ma->length_hi; + size = (size << 32) | ma->length_lo; + + if (num_memblks >= NR_MEMBLKS) { + printk(KERN_ERR "Too many mem chunks in SRAT. Ignoring %ld MBytes at %lx\n", + size/(1024*1024), paddr); + return; + } + + /* Ignore disabled entries */ + if (!ma->flags.enabled) + return; + + /* + * When the chunk is not the first one in the node, check distance + * from the other chunks. When the hole is too huge ignore the chunk. + * This restriction should be removed when multiple chunks per node + * is supported. + */ + pend = &node_memblk[num_memblks]; + min_hole_size = 0; + for (p = &node_memblk[0]; p < pend; p++) { + if (p->nid != pxm) + continue; + if (p->start_paddr < paddr) + hole_size = paddr - (p->start_paddr + p->size); + else + hole_size = p->start_paddr - (paddr + size); + + if (!min_hole_size || hole_size < min_hole_size) + min_hole_size = hole_size; + } + +#if 0 /* test */ + if (min_hole_size) { + if (min_hole_size > size) { + printk(KERN_ERR "Too huge memory hole. Ignoring %ld MBytes at %lx\n", + size/(1024*1024), paddr); + return; + } + } +#endif + + /* record this node in proximity bitmap */ + pxm_bit_set(pxm); + + /* Insertion sort based on base address */ + pend = &node_memblk[num_memblks]; + for (p = &node_memblk[0]; p < pend; p++) { + if (paddr < p->start_paddr) + break; + } + if (p < pend) { + for (q = pend; q >= p; q--) + *(q + 1) = *q; + } + p->start_paddr = paddr; + p->size = size; + p->nid = pxm; + num_memblks++; +} + +void __init +acpi_numa_arch_fixup(void) +{ + int i, j, node_from, node_to; + + if (srat_num_cpus == 0) { + node_cpuid[0].phys_id = hard_smp_processor_id(); + return; + } + + /* calculate total number of nodes in system from PXM bitmap */ + numnodes = 0; /* init total nodes in system */ + + memset(pxm_to_nid_map, -1, sizeof(pxm_to_nid_map)); + memset(nid_to_pxm_map, -1, sizeof(nid_to_pxm_map)); + for (i = 0; i < MAX_PXM_DOMAINS; i++) { + if (pxm_bit_test(i)) { + pxm_to_nid_map[i] = numnodes; + nid_to_pxm_map[numnodes++] = i; + } + } + + /* set logical node id in memory chunk structure */ + for (i = 0; i < num_memblks; i++) + node_memblk[i].nid = pxm_to_nid_map[node_memblk[i].nid]; + + /* assign memory bank numbers for each chunk on each node */ + for (i = 0; i < numnodes; i++) { + int bank; + + bank = 0; + for (j = 0; j < num_memblks; j++) + if (node_memblk[j].nid == i) + node_memblk[j].bank = bank++; + } + + /* set logical node id in cpu structure */ + for (i = 0; i < srat_num_cpus; i++) + node_cpuid[i].nid = pxm_to_nid_map[node_cpuid[i].nid]; + + printk(KERN_INFO "Number of logical nodes in system = %d\n", numnodes); + printk(KERN_INFO "Number of memory chunks in system = %d\n", num_memblks); + + if (!slit_table) return; + memset(numa_slit, -1, sizeof(numa_slit)); + for (i=0; ilocalities; i++) { + if (!pxm_bit_test(i)) + continue; + node_from = pxm_to_nid_map[i]; + for (j=0; jlocalities; j++) { + if (!pxm_bit_test(j)) + continue; + node_to = pxm_to_nid_map[j]; + node_distance(node_from, node_to) = + slit_table->entry[i*slit_table->localities + j]; + } + } + +#ifdef SLIT_DEBUG + printk(KERN_DEBUG "ACPI 2.0 SLIT locality table:\n"); + for (i = 0; i < numnodes; i++) { + for (j = 0; j < numnodes; j++) + printk(KERN_DEBUG "%03d ", node_distance(i,j)); + printk("\n"); + } +#endif +} +#endif /* CONFIG_ACPI_NUMA */ + static int __init acpi_parse_fadt (unsigned long phys_addr, unsigned long size) { struct acpi_table_header *fadt_header; - fadt_descriptor_rev2 *fadt; + struct fadt_descriptor_rev2 *fadt; u32 sci_irq; if (!phys_addr || !size) return -EINVAL; fadt_header = (struct acpi_table_header *) __va(phys_addr); - if (fadt_header->revision != 3) return -ENODEV; /* Only deal with ACPI 2.0 FADT */ - fadt = (fadt_descriptor_rev2 *) fadt_header; + fadt = (struct fadt_descriptor_rev2 *) fadt_header; if (!(fadt->iapc_boot_arch & BAF_8042_KEYBOARD_CONTROLLER)) acpi_kbd_controller_present = 0; @@ -479,20 +663,13 @@ rsdp_phys = __pa(efi.acpi20); else if (efi.acpi) printk(KERN_WARNING PREFIX "v1.0/r0.71 tables no longer supported\n"); - return rsdp_phys; } int __init -acpi_boot_init (char *cmdline) +acpi_boot_init (void) { - int result; - - /* Initialize the ACPI boot-time table parser */ - result = acpi_table_init(cmdline); - if (result) - return result; /* * MADT @@ -509,65 +686,76 @@ /* Local APIC */ - if (acpi_table_parse_madt(ACPI_MADT_LAPIC_ADDR_OVR, - acpi_parse_lapic_addr_ovr) < 0) + if (acpi_table_parse_madt(ACPI_MADT_LAPIC_ADDR_OVR, acpi_parse_lapic_addr_ovr) < 0) printk(KERN_ERR PREFIX "Error parsing LAPIC address override entry\n"); - if (acpi_table_parse_madt(ACPI_MADT_LSAPIC, - acpi_parse_lsapic) < 1) + if (acpi_table_parse_madt(ACPI_MADT_LSAPIC, acpi_parse_lsapic) < 1) printk(KERN_ERR PREFIX "Error parsing MADT - no LAPIC entries\n"); - if (acpi_table_parse_madt(ACPI_MADT_LAPIC_NMI, - acpi_parse_lapic_nmi) < 0) + if (acpi_table_parse_madt(ACPI_MADT_LAPIC_NMI, acpi_parse_lapic_nmi) < 0) printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n"); /* I/O APIC */ - if (acpi_table_parse_madt(ACPI_MADT_IOSAPIC, - acpi_parse_iosapic) < 1) - printk(KERN_ERR PREFIX "Error parsing MADT - no IOAPIC entries\n"); + if (acpi_table_parse_madt(ACPI_MADT_IOSAPIC, acpi_parse_iosapic) < 1) + printk(KERN_ERR PREFIX "Error parsing MADT - no IOSAPIC entries\n"); /* System-Level Interrupt Routing */ - if (acpi_table_parse_madt(ACPI_MADT_PLAT_INT_SRC, - acpi_parse_plat_int_src) < 0) + if (acpi_table_parse_madt(ACPI_MADT_PLAT_INT_SRC, acpi_parse_plat_int_src) < 0) printk(KERN_ERR PREFIX "Error parsing platform interrupt source entry\n"); - if (acpi_table_parse_madt(ACPI_MADT_INT_SRC_OVR, - acpi_parse_int_src_ovr) < 0) + if (acpi_table_parse_madt(ACPI_MADT_INT_SRC_OVR, acpi_parse_int_src_ovr) < 0) printk(KERN_ERR PREFIX "Error parsing interrupt source overrides entry\n"); - if (acpi_table_parse_madt(ACPI_MADT_NMI_SRC, - acpi_parse_nmi_src) < 0) + if (acpi_table_parse_madt(ACPI_MADT_NMI_SRC, acpi_parse_nmi_src) < 0) printk(KERN_ERR PREFIX "Error parsing NMI SRC entry\n"); -skip_madt: + skip_madt: /* - * The FADT table contains an SCI_INT line, by which the system + * FADT says whether a legacy keyboard controller is present. + * The FADT also contains an SCI_INT line, by which the system * gets interrupts such as power and sleep buttons. If it's not * on a Legacy interrupt, it needs to be setup. */ - if (acpi_table_parse(ACPI_FACP, acpi_parse_fadt) < 1) + if (acpi_table_parse(ACPI_FADT, acpi_parse_fadt) < 1) printk(KERN_ERR PREFIX "Can't find FADT\n"); #ifdef CONFIG_SMP if (available_cpus == 0) { printk(KERN_INFO "ACPI: Found 0 CPUS; assuming 1\n"); + printk(KERN_INFO "CPU 0 (0x%04x)", hard_smp_processor_id()); + smp_boot_data.cpu_phys_id[available_cpus] = hard_smp_processor_id(); available_cpus = 1; /* We've got at least one of these, no? */ } - smp_boot_data.cpu_count = total_cpus; + smp_boot_data.cpu_count = available_cpus; + + smp_build_cpu_map(); +# ifdef CONFIG_NUMA + /* If the platform did not have an SRAT table, initialize the + * node_cpuid table from the smp_boot_data array. All cpus + * will be on node 0. + */ + if (srat_num_cpus == 0) { + int cpu, i=1; + for (cpu=0; cpuattribute & EFI_MEMORY_WB) - trim_bottom(md, granule_addr); + trim_bottom(check_md, granule_addr); if (check_md->phys_addr < granule_addr) continue; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/kernel/efi_stub.S linux-2.4.23-pre8/arch/ia64/kernel/efi_stub.S --- linux-2.4.22/arch/ia64/kernel/efi_stub.S 2002-11-28 23:53:09.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/kernel/efi_stub.S 2003-10-22 22:47:28.000000000 +0000 @@ -62,7 +62,7 @@ mov b6=r2 ;; andcm r16=loc3,r16 // get psr with IT, DT, and RT bits cleared - br.call.sptk.many rp=ia64_switch_mode + br.call.sptk.many rp=ia64_switch_mode_phys .ret0: mov out4=in5 mov out0=in1 mov out1=in2 @@ -73,7 +73,7 @@ br.call.sptk.many rp=b6 // call the EFI function .ret1: mov ar.rsc=0 // put RSE in enforced lazy, LE mode mov r16=loc3 - br.call.sptk.many rp=ia64_switch_mode // return to virtual mode + br.call.sptk.many rp=ia64_switch_mode_virt // return to virtual mode .ret2: mov ar.rsc=loc4 // restore RSE configuration mov ar.pfs=loc1 mov rp=loc0 diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/kernel/efivars.c linux-2.4.23-pre8/arch/ia64/kernel/efivars.c --- linux-2.4.22/arch/ia64/kernel/efivars.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/kernel/efivars.c 2003-10-22 22:48:53.000000000 +0000 @@ -119,7 +119,7 @@ */ static spinlock_t efivars_lock = SPIN_LOCK_UNLOCKED; static LIST_HEAD(efivar_list); -static struct proc_dir_entry *efi_vars_dir = NULL; +static struct proc_dir_entry *efi_vars_dir; #define efivar_entry(n) list_entry(n, efivar_entry_t, list) @@ -138,8 +138,7 @@ static inline unsigned long utf8_strsize(efi_char16_t *data, unsigned long maxlength) { - return utf8_strlen(data, maxlength/sizeof(efi_char16_t)) * - sizeof(efi_char16_t); + return utf8_strlen(data, maxlength/sizeof(efi_char16_t)) * sizeof(efi_char16_t); } @@ -169,8 +168,7 @@ efi_char16_t *variable_name, efi_guid_t *vendor_guid) { - int i, short_name_size = variable_name_size / - sizeof(efi_char16_t) + 38; + int i, short_name_size = variable_name_size / sizeof(efi_char16_t) + 38; char *short_name; efivar_entry_t *new_efivar; @@ -191,7 +189,7 @@ /* Convert Unicode to normal chars (assume top bits are 0), ala UTF-8 */ - for (i=0; i + * Fenghua Yu * Copyright (C) 1998-2002 Hewlett-Packard Co * David Mosberger-Tang * Copyright (C) 1999 VA Linux Systems @@ -48,7 +51,10 @@ ENTRY(ia64_execve) .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(3) alloc loc1=ar.pfs,3,2,4,0 - mov loc0=rp + /* Leave from kernel and restore all pt_regs to correspending registers. This is special + * because ia32 application needs scratch registers after return from execve. + */ + movl loc0=ia64_ret_from_execve_syscall .body mov out0=in0 // filename ;; // stop bit between alloc and call @@ -72,19 +78,18 @@ * this executes in less than 20 cycles even on Itanium, so it's not worth * optimizing for...). */ - mov r4=0; mov f2=f0; mov b1=r0 - mov r5=0; mov f3=f0; mov b2=r0 - mov r6=0; mov f4=f0; mov b3=r0 - mov r7=0; mov f5=f0; mov b4=r0 - mov ar.unat=0; mov f10=f0; mov b5=r0 - ldf.fill f11=[sp]; ldf.fill f12=[sp]; mov f13=f0 - ldf.fill f14=[sp]; ldf.fill f15=[sp]; mov f16=f0 - ldf.fill f17=[sp]; ldf.fill f18=[sp]; mov f19=f0 - ldf.fill f20=[sp]; ldf.fill f21=[sp]; mov f22=f0 - ldf.fill f23=[sp]; ldf.fill f24=[sp]; mov f25=f0 - ldf.fill f26=[sp]; ldf.fill f27=[sp]; mov f28=f0 - ldf.fill f29=[sp]; ldf.fill f30=[sp]; mov f31=f0 - mov ar.lc=0 + mov ar.unat=0; mov ar.lc=0; + mov r4=0; mov f2=f0; mov b1=r0 + mov r5=0; mov f3=f0; mov b2=r0 + mov r6=0; mov f4=f0; mov b3=r0 + mov r7=0; mov f5=f0; mov b4=r0 + ldf.fill f12=[sp]; mov f13=f0; mov b5=r0 + ldf.fill f14=[sp]; ldf.fill f15=[sp]; mov f16=f0 + ldf.fill f17=[sp]; ldf.fill f18=[sp]; mov f19=f0 + ldf.fill f20=[sp]; ldf.fill f21=[sp]; mov f22=f0 + ldf.fill f23=[sp]; ldf.fill f24=[sp]; mov f25=f0 + ldf.fill f26=[sp]; ldf.fill f27=[sp]; mov f28=f0 + ldf.fill f29=[sp]; ldf.fill f30=[sp]; mov f31=f0 br.ret.sptk.many rp END(ia64_execve) @@ -251,8 +256,6 @@ st8 [r14]=r21,16 // save b0 st8 [r15]=r22,16 // save b1 mov r25=b4 - stf.spill [r2]=f10,32 - stf.spill [r3]=f11,32 mov r26=b5 ;; st8 [r14]=r23,16 // save b2 @@ -351,9 +354,6 @@ ldf.fill f4=[r14],32 ldf.fill f5=[r15],32 ;; - ldf.fill f10=[r14],32 - ldf.fill f11=[r15],32 - ;; ldf.fill f12=[r14],32 ldf.fill f13=[r15],32 ;; @@ -475,7 +475,7 @@ .mem.offset 8,0; st8.spill [r3]=r10 // clear error indication in slot for r10 ia64_strace_leave_kernel: br.call.sptk.many rp=invoke_syscall_trace // give parent a chance to catch return value -.rety: br.cond.sptk ia64_leave_kernel +.rety: br.cond.sptk ia64_leave_syscall strace_error: ld8 r3=[r2] // load pt_regs.r8 @@ -528,12 +528,186 @@ (p7) br.cond.spnt handle_syscall_error // handle potential syscall failure END(ia64_ret_from_syscall) // fall through +/* + * ia64_leave_syscall(): Same as ia64_leave_kernel, except that it doesn't + * need to switch to bank 0 and doesn't restore the scratch registers. + * To avoid leaking kernel bits, the scratch registers are set to + * the following known-to-be-safe values: + * + * r1: restored (global pointer) + * r2: cleared + * r3: cleared + * r8-r11: restored (syscall return value(s)) + * r12: restored (user-level stack pointer) + * r13: restored (user-level thread pointer) + * r14: cleared + * r15: restored (syscall #) + * r16-r19: cleared + * r20: user-level ar.fpsr + * r21: user-level b0 + * r22: cleared + * r23: user-level ar.bspstore + * r24: user-level ar.rnat + * r25: user-level ar.unat + * r26: user-level ar.pfs + * r27: user-level ar.rsc + * r28: user-level ip + * r29: user-level psr + * r30: user-level cfm + * r31: user-level pr + * f6-f11: cleared + * pr: restored (user-level pr) + * b0: restored (user-level rp) + * b6: cleared + * b7: cleared + * ar.unat: restored (user-level ar.unat) + * ar.pfs: restored (user-level ar.pfs) + * ar.rsc: restored (user-level ar.rsc) + * ar.rnat: restored (user-level ar.rnat) + * ar.bspstore: restored (user-level ar.bspstore) + * ar.fpsr: restored (user-level ar.fpsr) + * ar.ccv: cleared + * ar.csd: cleared + * ar.ssd: cleared + */ +GLOBAL_ENTRY(ia64_leave_syscall) + PT_REGS_UNWIND_INFO(0) + lfetch.fault [sp] + movl r14=.restart1 + ;; + mov.ret.sptk rp=r14,.restart1 + cmp.eq pLvSys,p0=r0,r0 // pLvSys=1: leave from syscall +.restart1: + // need_resched and signals atomic test +(pUser) rsm psr.i + adds r17=IA64_TASK_NEED_RESCHED_OFFSET,r13 + adds r18=IA64_TASK_SIGPENDING_OFFSET,r13 +#ifdef CONFIG_PERFMON + adds r19=IA64_TASK_PFM_OVFL_BLOCK_RESET_OFFSET,r13 +#endif + ;; +#ifdef CONFIG_PERFMON +(pUser) ld8 r19=[r19] // load current->thread.pfm_ovfl_block_reset +#endif +(pUser) ld8 r17=[r17] // load current->need_resched +(pUser) ld4 r18=[r18] // load current->sigpending + ;; +#ifdef CONFIG_PERFMON +(pUser) cmp.ne.unc p9,p0=r19,r0 // current->thread.pfm_ovfl_block_reset != 0? +#endif +(pUser) cmp.ne.unc p7,p0=r17,r0 // current->need_resched != 0? +(pUser) cmp.ne.unc p8,p0=r18,r0 // current->sigpending != 0? + ;; +#ifdef CONFIG_PERFMON +(p9) br.call.spnt.many b7=pfm_ovfl_block_reset +#endif +#if __GNUC__ < 3 +(p7) br.call.spnt.many b7=invoke_schedule +#else +(p7) br.call.spnt.many b7=schedule +#endif +(p8) br.call.spnt.many rp=handle_signal_delivery // check & deliver pending signals (once) + + mov ar.csd=r0 + mov ar.ssd=r0 + adds r16=PT(LOADRS)+16,r12 + adds r17=PT(AR_BSPSTORE)+16, r12 + mov f6=f0 // clear f6 + ;; + ld8 r19=[r16],PT(R8)-PT(LOADRS) // load ar.rsc value for "loadrs" + ld8 r23=[r17],PT(R9)-PT(AR_BSPSTORE) // load ar.bspstore (may be garbage) + mov r22=r0 // clear r22 + ;; + // start restoring the state saved on the kernel stack (struct pt_regs): + ld8.fill r8=[r16],16 + ld8.fill r9=[r17],16 + mov f7=f0 // clear f7 + ;; + ld8.fill r10=[r16],16 + ld8.fill r11=[r17],16 + mov f8=f0 // clear f8 + ;; + ld8 r29=[r16],16 // load cr.ipsr + ld8 r28=[r17],16 // load cr.iip + mov b7=r0 // clear b7 + ;; + ld8 r30=[r16],16 // load cr.ifs + ld8 r25=[r17],16 // load ar.unat + cmp.eq p9,p0=r0,r0 // set p9 to indicate that we should restore cr.ifs + ;; + rsm psr.i | psr.ic // initiate turning off of interrupt and interruption collection + invala // invalidate ALAT + mov f9=f0 // clear f9 + ;; + ld8 r26=[r16],16 // load ar.pfs + ld8 r27=[r17],PT(PR)-PT(AR_RSC)// load ar.rsc + mov f10=f0 // clear f10 + ;; + ld8 r24=[r16],PT(B0)-PT(AR_RNAT)// load ar.rnat (may be garbage) + ld8 r31=[r17],PT(R1)-PT(PR) // load predicates + mov f11=f0 // clear f11 + ;; + ld8 r21=[r16],PT(R12)-PT(B0)// load b0 + ld8.fill r1=[r17],16 // load r1 + mov r3=r0 // clear r3 + ;; + ld8.fill r12=[r16],16 + ld8.fill r13=[r17],16 + mov r2=r0 // clear r2 + ;; + ld8 r20=[r16] // ar.fpsr + ld8.fill r15=[r17] // load r15 + adds r18=16,r16 + ;; + mov r16=ar.bsp // get existing backing store pointer + movl r17=PERCPU_ADDR+IA64_CPU_PHYS_STACKED_SIZE_P8_OFFSET + srlz.i // ensure interruption collection is off + mov ar.ccv=r0 // clear ar.ccv + mov b6=r0 // clear b6 + ;; + ld4 r17=[r17] // r17 = cpu_data->phys_stacked_size_p8 + mov r14=r0 // clear r14 +(pKern) br.cond.dpnt skip_rbs_switch + /* + * Restore user backing store. + * + * NOTE: alloc, loadrs, and cover can't be predicated. + */ + cover // add current frame into dirty partition + shr.u r18=r19,16 // get byte size of existing "dirty" partition + ;; + mov r19=ar.bsp // get new backing store pointer + sub r16=r16,r18 // krbs = old bsp - size of dirty partition + cmp.ne p9,p0=r0,r0 // clear p9 to skip restore of cr.ifs + ;; + sub r19=r19,r16 // calculate total byte size of dirty partition + add r18=64,r18 // don't force in0-in7 into memory... + ;; + shl r19=r19,16 // shift size of dirty partition into loadrs position + br.few dont_preserve_current_frame + ;; +END(ia64_leave_syscall) + +GLOBAL_ENTRY(ia64_ret_from_execve_syscall) + PT_REGS_UNWIND_INFO(0) + cmp.ge p6,p7=r8,r0 // syscall executed successfully? + adds r2=PT(R8)+16,sp // r2 = &pt_regs.r8 + adds r3=PT(R10)+16,sp // r3 = &pt_regs.r10 + ;; + .mem.offset 0,0 +(p6) st8.spill [r2]=r8 // store return value in slot for r8 and set unat bit + .mem.offset 8,0 +(p6) st8.spill [r3]=r0 // clear error indication in slot for r10 and set unat bit +(p7) br.cond.spnt handle_syscall_error // handle potential syscall failure +END(ia64_ret_from_execve_syscall) + // fall through GLOBAL_ENTRY(ia64_leave_kernel) PT_REGS_UNWIND_INFO(0) lfetch.fault [sp] movl r14=.restart ;; mov.ret.sptk rp=r14,.restart + cmp.eq p0,pLvSys=r0,r0 // pLvSys=0: leave from kernel .restart: // need_resched and signals atomic test (pUser) rsm psr.i @@ -564,18 +738,35 @@ (p7) br.call.spnt.many b7=schedule #endif (p8) br.call.spnt.many rp=handle_signal_delivery // check & deliver pending signals (once) + + adds r20=PT(CR_IPSR)+16,r12 + adds r21=PT(PR)+16,r12 ;; -.ret9: adds r2=PT(R8)+16,r12 - adds r3=PT(R9)+16,r12 + lfetch.fault.excl [r20] + lfetch.fault.excl [r21] + adds r2=PT(B6)+16,r12 + adds r3=PT(R16)+16,r12 + mov r29=PT(R24)-PT(B6) + mov r30=PT(B7)-PT(R24) ;; // start restoring the state saved on the kernel stack (struct pt_regs): - ld8.fill r8=[r2],16 - ld8.fill r9=[r3],16 + ld8 r28=[r2],r29 // b6 + ld8.fill r16=[r3],128 + mov r31=PT(AR_CSD)-PT(AR_CCV) + ;; + ld8.fill r24=[r2],r30 + ld8 r15=[r3],r31 + ;; + ld8 r29=[r2],16 // b7 + ld8 r30=[r3],16 // ar.csd ;; - ld8.fill r10=[r2],16 - ld8.fill r11=[r3],16 + ld8 r31=[r2],16 // ar.ssd + ld8.fill r8=[r3],16 ;; - ld8.fill r16=[r2],16 + ld8.fill r9=[r2],16 + ld8.fill r10=[r3],PT(R17)-PT(R10) + ;; + ld8.fill r11=[r2],PT(R18)-PT(R11) ld8.fill r17=[r3],16 ;; ld8.fill r18=[r2],16 @@ -583,82 +774,78 @@ ;; ld8.fill r20=[r2],16 ld8.fill r21=[r3],16 - ;; - ld8.fill r22=[r2],16 - ld8.fill r23=[r3],16 - ;; - ld8.fill r24=[r2],16 - ld8.fill r25=[r3],16 - ;; - ld8.fill r26=[r2],16 - ld8.fill r27=[r3],16 - ;; - ld8.fill r28=[r2],16 - ld8.fill r29=[r3],16 - ;; - ld8.fill r30=[r2],16 - ld8.fill r31=[r3],16 + mov ar.csd=r30 + mov ar.ssd=r31 ;; rsm psr.i | psr.ic // initiate turning off of interrupt and interruption collection invala // invalidate ALAT ;; - ld8 r1=[r2],16 // ar.ccv - ld8 r13=[r3],16 // ar.fpsr + ld8.fill r22=[r2],24 + ld8.fill r23=[r3],24 + mov b6=r28 + ;; + ld8.fill r25=[r2],16 + ld8.fill r26=[r3],16 + mov b7=r29 ;; - ld8 r14=[r2],16 // b0 - ld8 r15=[r3],16+8 // b7 + ld8.fill r27=[r2],16 + ld8.fill r28=[r3],16 ;; - ldf.fill f6=[r2],32 - ldf.fill f7=[r3],32 + ld8.fill r29=[r2],16 + ld8.fill r30=[r3],24 ;; - ldf.fill f8=[r2],32 - ldf.fill f9=[r3],32 + ld8.fill r31=[r2],32 + ldf.fill f6=[r3],32 ;; - mov ar.ccv=r1 - mov ar.fpsr=r13 - mov b0=r14 + ldf.fill f7=[r2],32 + ldf.fill f8=[r3],32 ;; srlz.i // ensure interruption collection is off - mov b7=r15 + mov ar.ccv=r15 ;; + ldf.fill f9=[r2],32 + ldf.fill f10=[r3],32 bsw.0 // switch back to bank 0 ;; - adds r16=16,r12 - adds r17=24,r12 + ldf.fill f11=[r2] + adds r16=PT(CR_IPSR)+16,r12 + adds r17=PT(CR_IIP)+16,r12 ;; - ld8 rCRIPSR=[r16],16 // load cr.ipsr - ld8 rCRIIP=[r17],16 // load cr.iip + ld8 r29=[r16],16 // load cr.ipsr + ld8 r28=[r17],16 // load cr.iip ;; - ld8 rCRIFS=[r16],16 // load cr.ifs - ld8 rARUNAT=[r17],16 // load ar.unat + ld8 r30=[r16],16 // load cr.ifs + ld8 r25=[r17],16 // load ar.unat cmp.eq p9,p0=r0,r0 // set p9 to indicate that we should restore cr.ifs ;; - ld8 rARPFS=[r16],16 // load ar.pfs - ld8 rARRSC=[r17],16 // load ar.rsc + ld8 r26=[r16],16 // load ar.pfs + ld8 r27=[r17],16 // load ar.rsc ;; - ld8 rARRNAT=[r16],16 // load ar.rnat (may be garbage) - ld8 rARBSPSTORE=[r17],16 // load ar.bspstore (may be garbage) + ld8 r24=[r16],16 // load ar.rnat (may be garbage) + ld8 r23=[r17],16 // load ar.bspstore (may be garbage) ;; - ld8 rARPR=[r16],16 // load predicates - ld8 rB6=[r17],16 // load b6 + ld8 r31=[r16],16 // load predicates + ld8 r21=[r17],16 // load b0 ;; ld8 r19=[r16],16 // load ar.rsc value for "loadrs" ld8.fill r1=[r17],16 // load r1 ;; - ld8.fill r2=[r16],16 - ld8.fill r3=[r17],16 - ;; ld8.fill r12=[r16],16 ld8.fill r13=[r17],16 ;; + ld8 r20=[r16],16 + ld8.fill r15=[r17],16 + ;; ld8.fill r14=[r16] - ld8.fill r15=[r17] - shr.u r18=r19,16 // get byte size of existing "dirty" partition + ld8.fill r2=[r17],16 + adds r18=16,r16 ;; mov r16=ar.bsp // get existing backing store pointer movl r17=PERCPU_ADDR+IA64_CPU_PHYS_STACKED_SIZE_P8_OFFSET ;; + ld8.fill r3=[r18] ld4 r17=[r17] // r17 = cpu_data->phys_stacked_size_p8 + shr.u r18=r19,16 // get byte size of existing "dirty" partition (pKern) br.cond.dpnt skip_rbs_switch /* * Restore user backing store. @@ -718,7 +905,7 @@ }{ .mib mov loc3=0 mov loc4=0 -(pRecurse) br.call.sptk.many b6=rse_clear_invalid +(pRecurse) br.call.sptk.many b0=rse_clear_invalid }{ .mfi // cycle 2 mov loc5=0 @@ -727,7 +914,7 @@ }{ .mib mov loc6=0 mov loc7=0 -(pReturn) br.ret.sptk.many b6 +(pReturn) br.ret.sptk.many b0 } #else /* !CONFIG_ITANIUM */ alloc loc0=ar.pfs,2,Nregs-2,2,0 @@ -742,14 +929,14 @@ mov loc5=0 mov loc6=0 mov loc7=0 -(pRecurse) br.call.sptk.many b6=rse_clear_invalid +(pRecurse) br.call.sptk.many b0=rse_clear_invalid ;; mov loc8=0 mov loc9=0 cmp.ne pReturn,p0=r0,in1 // if recursion count != 0, we need to do a br.ret mov loc10=0 mov loc11=0 -(pReturn) br.ret.sptk.many b6 +(pReturn) br.ret.sptk.many b0 #endif /* !CONFIG_ITANIUM */ # undef pRecurse # undef pReturn @@ -759,17 +946,22 @@ loadrs ;; skip_rbs_switch: - mov b6=rB6 - mov ar.pfs=rARPFS -(pUser) mov ar.bspstore=rARBSPSTORE -(p9) mov cr.ifs=rCRIFS - mov cr.ipsr=rCRIPSR - mov cr.iip=rCRIIP - ;; -(pUser) mov ar.rnat=rARRNAT // must happen with RSE in lazy mode - mov ar.rsc=rARRSC - mov ar.unat=rARUNAT - mov pr=rARPR,-1 +(pLvSys)mov r19=r0 // clear r19 for leave_syscall, no-op otherwise + mov b0=r21 + mov ar.pfs=r26 +(pUser) mov ar.bspstore=r23 +(p9) mov cr.ifs=r30 +(pLvSys)mov r16=r0 // clear r16 for leave_syscall, no-op otherwise + mov cr.ipsr=r29 + mov ar.fpsr=r20 +(pLvSys)mov r17=r0 // clear r17 for leave_syscall, no-op otherwise + mov cr.iip=r28 + ;; +(pUser) mov ar.rnat=r24 // must happen with RSE in lazy mode +(pLvSys)mov r18=r0 // clear r18 for leave_syscall, no-op otherwise + mov ar.rsc=r27 + mov ar.unat=r25 + mov pr=r31,-1 rfi END(ia64_leave_kernel) @@ -795,7 +987,7 @@ ;; .mem.offset 0,0; st8.spill [r2]=r9 // store errno in pt_regs.r8 and set unat bit .mem.offset 8,0; st8.spill [r3]=r10 // store error indication in pt_regs.r10 and set unat bit - br.cond.sptk ia64_leave_kernel + br.cond.sptk ia64_leave_syscall END(handle_syscall_error) /* @@ -906,6 +1098,22 @@ .body cmp.eq pNonSys,pSys=r0,r0 // sigreturn isn't a normal syscall... ;; + /* After signal handler, live registers f6-f11 are restored to the previous + * executing context values for synchronized signals(from exceptions); or they + * are cleared to 0 for asynchronized signals(from syscalls). These live registers + * will be put into pt_regs to return back to user space. + */ + adds r16=PT(F6)+32,sp + adds r17=PT(F7)+32,sp + ;; + stf.spill [r16]=f6,32 + stf.spill [r17]=f7,32 + ;; + stf.spill [r16]=f8,32 + stf.spill [r17]=f9,32 + ;; + stf.spill [r16]=f10 + stf.spill [r17]=f11 adds out0=16,sp // out0 = &sigscratch br.call.sptk.many rp=ia64_rt_sigreturn .ret19: .restore sp 0 diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/kernel/entry.h linux-2.4.23-pre8/arch/ia64/kernel/entry.h --- linux-2.4.22/arch/ia64/kernel/entry.h 2001-11-09 22:26:17.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/kernel/entry.h 2003-10-22 22:48:34.000000000 +0000 @@ -4,6 +4,7 @@ * Preserved registers that are shared between code in ivt.S and entry.S. Be * careful not to step on these! */ +#define pLvSys p1 /* set 1 if leave from syscall; otherwise, set 0*/ #define pKern p2 /* will leave_kernel return to kernel-mode? */ #define pUser p3 /* will leave_kernel return to user-mode? */ #define pSys p4 /* are we processing a (synchronous) system call? */ @@ -13,7 +14,7 @@ #define SW(f) (IA64_SWITCH_STACK_##f##_OFFSET) #define PT_REGS_SAVES(off) \ - .unwabi @svr4, 'i'; \ + .unwabi 3, 'i'; \ .fframe IA64_PT_REGS_SIZE+16+(off); \ .spillsp rp, PT(CR_IIP)+16+(off); \ .spillsp ar.pfs, PT(CR_IFS)+16+(off); \ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/kernel/head.S linux-2.4.23-pre8/arch/ia64/kernel/head.S --- linux-2.4.22/arch/ia64/kernel/head.S 2003-06-13 14:51:29.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/kernel/head.S 2003-10-22 22:49:10.000000000 +0000 @@ -5,7 +5,7 @@ * to set up the kernel's global pointer and jump to the kernel * entry point. * - * Copyright (C) 1998-2001 Hewlett-Packard Co + * Copyright (C) 1998-2001, 2003 Hewlett-Packard Co * David Mosberger-Tang * Stephane Eranian * Copyright (C) 1999 VA Linux Systems @@ -15,6 +15,7 @@ * Copyright (C) 1999 Don Dugger * Copyright (C) 2002 Fenghua Yu * -Optimize __ia64_save_fpu() and __ia64_load_fpu() for Itanium 2. + * Copyright (C) 2003 Silicon Graphics, Inc. */ #include @@ -65,17 +66,29 @@ * that maps the kernel's text and data: */ rsm psr.i | psr.ic - mov r16=((ia64_rid(IA64_REGION_ID_KERNEL, PAGE_OFFSET) << 8) | (IA64_GRANULE_SHIFT << 2)) ;; srlz.i + ;; + mov r20=((ia64_rid(IA64_REGION_ID_KERNEL, (7<<61)) << 8) | (IA64_GRANULE_SHIFT << 2)) + movl r21=(7<<61) + ;; + mov rr[r21]=r20 + ;; + /* + * Now pin mappings into the TLB for kernel text and data + */ mov r18=KERNEL_TR_PAGE_SHIFT<<2 movl r17=KERNEL_START ;; - mov rr[r17]=r16 mov cr.itir=r18 mov cr.ifa=r17 mov r16=IA64_TR_KERNEL - movl r18=((1 << KERNEL_TR_PAGE_SHIFT) | PAGE_KERNEL) + mov r3=ip + movl r18=PAGE_KERNEL + ;; + dep r2=0,r3,0,KERNEL_TR_PAGE_SHIFT + ;; + or r18=r2,r18 ;; srlz.i ;; @@ -134,28 +147,63 @@ movl r3=cpucount ;; ld4 r3=[r3] // r3 <- smp_processor_id() - movl r2=init_tasks - ;; - shladd r2=r3,3,r2 - ;; - ld8 r2=[r2] #else mov r3=0 - movl r2=init_task_union - ;; #endif + ;; cmp4.ne isAP,isBP=r3,r0 - ;; // RAW on r2 - extr r3=r2,0,61 // r3 == phys addr of task struct - mov r16=KERNEL_TR_PAGE_NUM + + /* + * Make task struct pointer in init_tasks an identity mapped pointer. + * The value that is compiled into the array may not be identity mapped. + */ + movl r18=init_tasks + ;; + shladd r18=r3,3,r18 + ;; + ld8 r8=[r18] + ;; + tpa r3=r8 // r3 == phys addr of task struct + ;; + dep r2=-1,r3,61,3 // IMVA of task + ;; + st8 [r18]=r2 // and save it back in init_tasks[thiscpu] + + // load mapping for stack (virtaddr in r2, physaddr in r3) + // load dtr[2] only if the va for current (r2) isn't covered by the dtr[0] + shr.u r18=r2,KERNEL_TR_PAGE_SHIFT /* va of current in units of kernel-pages */ + movl r17=KERNEL_START>>KERNEL_TR_PAGE_SHIFT /* va of kernel-start in units of kernel-pages */ + ;; + cmp.eq p0,p6=r17,r18 + rsm psr.ic + movl r17=PAGE_KERNEL + ;; + srlz.d + dep r18=0,r3,0,12 + ;; + or r18=r17,r18 + ;; + mov r17=rr[r2] + shr.u r16=r3,IA64_GRANULE_SHIFT + ;; + dep r17=0,r17,8,24 + ;; + mov cr.itir=r17 + mov cr.ifa=r2 + + mov r19=IA64_TR_CURRENT_STACK + ;; +(p6) itr.d dtr[r19]=r18 + ;; + ssm psr.ic + srlz.d ;; // load the "current" pointer (r13) and ar.k6 with the current task - mov r13=r2 mov IA64_KR(CURRENT)=r3 // Physical address - - // initialize k4 to a safe value (64-128MB is mapped by TR_KERNEL) mov IA64_KR(CURRENT_STACK)=r16 + mov r13=r2 + /* * Reserve space at the top of the stack for "struct pt_regs". Kernel threads * don't store interesting values in that structure, but the space still needs @@ -670,14 +718,14 @@ END(__ia64_init_fpu) /* - * Switch execution mode from virtual to physical or vice versa. + * Switch execution mode from virtual to physical * * Inputs: * r16 = new psr to establish * * Note: RSE must already be in enforced lazy mode */ -GLOBAL_ENTRY(ia64_switch_mode) +GLOBAL_ENTRY(ia64_switch_mode_phys) { alloc r2=ar.pfs,0,0,0,0 rsm psr.i | psr.ic // disable interrupts and interrupt collection @@ -687,35 +735,86 @@ { flushrs // must be first insn in group srlz.i - shr.u r19=r15,61 // r19 <- top 3 bits of current IP } ;; mov cr.ipsr=r16 // set new PSR - add r3=1f-ia64_switch_mode,r15 - xor r15=0x7,r19 // flip the region bits + add r3=1f-ia64_switch_mode_phys,r15 mov r17=ar.bsp mov r14=rp // get return address into a general register + ;; - // switch RSE backing store: + // going to physical mode, use tpa to translate virt->phys + tpa r17=r17 + tpa r3=r3 + tpa sp=sp + tpa r14=r14 ;; - dep r17=r15,r17,61,3 // make ar.bsp physical or virtual + mov r18=ar.rnat // save ar.rnat - ;; mov ar.bspstore=r17 // this steps on ar.rnat - dep r3=r15,r3,61,3 // make rfi return address physical or virtual + mov cr.iip=r3 + mov cr.ifs=r0 + ;; + mov ar.rnat=r18 // restore ar.rnat + rfi // must be last insn in group + ;; +1: mov rp=r14 + br.ret.sptk.many rp +END(ia64_switch_mode_phys) + +/* + * Switch execution mode from physical to virtual + * + * Inputs: + * r16 = new psr to establish + * + * Note: RSE must already be in enforced lazy mode + */ +GLOBAL_ENTRY(ia64_switch_mode_virt) + { + alloc r2=ar.pfs,0,0,0,0 + rsm psr.i | psr.ic // disable interrupts and interrupt collection + mov r15=ip + } + ;; + { + flushrs // must be first insn in group + srlz.i + } ;; + mov cr.ipsr=r16 // set new PSR + add r3=1f-ia64_switch_mode_virt,r15 + + mov r17=ar.bsp + mov r14=rp // get return address into a general register + ;; + + // going to virtual + // - for code addresses, set upper bits of addr to KERNEL_START + // - for stack addresses, set upper 3 bits to 0xe.... Dont change any of the + // lower bits since we want it to stay identity mapped + movl r18=KERNEL_START + dep r3=0,r3,KERNEL_TR_PAGE_SHIFT,64-KERNEL_TR_PAGE_SHIFT + dep r14=0,r14,KERNEL_TR_PAGE_SHIFT,64-KERNEL_TR_PAGE_SHIFT + dep r17=-1,r17,61,3 + dep sp=-1,sp,61,3 + ;; + or r3=r3,r18 + or r14=r14,r18 + ;; + + mov r18=ar.rnat // save ar.rnat + mov ar.bspstore=r17 // this steps on ar.rnat mov cr.iip=r3 mov cr.ifs=r0 - dep sp=r15,sp,61,3 // make stack pointer physical or virtual ;; mov ar.rnat=r18 // restore ar.rnat - dep r14=r15,r14,61,3 // make function return address physical or virtual rfi // must be last insn in group ;; 1: mov rp=r14 br.ret.sptk.many rp -END(ia64_switch_mode) +END(ia64_switch_mode_virt) #ifdef CONFIG_IA64_BRL_EMU @@ -782,6 +881,9 @@ ;; // delay a little... .wait: sub tmp=tmp,timeout +#ifdef GAS_HAS_HINT_INSN + hint @pause +#endif or delay=0xf,delay // make sure delay is non-zero (otherwise we get stuck with 0) ;; cmp.lt p15,p0=tmp,r0 diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/kernel/iosapic.c linux-2.4.23-pre8/arch/ia64/kernel/iosapic.c --- linux-2.4.22/arch/ia64/kernel/iosapic.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/kernel/iosapic.c 2003-10-22 22:48:54.000000000 +0000 @@ -530,7 +530,7 @@ delivery = IOSAPIC_INIT; break; case ACPI_INTERRUPT_CPEI: - vector = IA64_PCE_VECTOR; + vector = IA64_CPE_VECTOR; delivery = IOSAPIC_LOWEST_PRIORITY; break; default: diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/kernel/ivt.S linux-2.4.23-pre8/arch/ia64/kernel/ivt.S --- linux-2.4.22/arch/ia64/kernel/ivt.S 2002-11-28 23:53:09.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/kernel/ivt.S 2003-10-22 22:47:51.000000000 +0000 @@ -1,6 +1,10 @@ /* * arch/ia64/kernel/ivt.S * + * Copyright (C) 2002-2003 Intel Co + * Suresh Siddha + * Kenneth Chen + * Fenghua Yu * Copyright (C) 1998-2001 Hewlett-Packard Co * Stephane Eranian * David Mosberger @@ -621,6 +625,23 @@ ///////////////////////////////////////////////////////////////////////////////////////// // 0x2c00 Entry 11 (size 64 bundles) Break instruction (33) ENTRY(break_fault) + +/* System call entry/exit only saves/restores part of pt_regs, i.e. no scratch registers + * are saved/restored except r15 which contains syscall number and needs to be saved in the + * entry. This optimization is based on the assumption that applications only call glibc + * system call interface which doesn't use scratch registers after break into kernel. + * Registers saved/restored during system call entry/exit are listed as follows: + * + * Registers to be saved & restored: + * CR registers: cr_ipsr, cr_iip, cr_ifs + * AR registers: ar_unat, ar_pfs, ar_rsc, ar_rnat, ar_bspstore, ar_fpsr + * others: pr, b0, loadrs, r1, r12, r13, r15 + * Registers to be restored only: + * r8~r11: output value from the system call. + * + * During system call exit, scratch registers (including r15) are modified/cleared to + * prevent leaking bits from kernel to user level. + */ DBG_FAULT(11) mov r16=cr.iim mov r17=__IA64_BREAK_SYSCALL @@ -629,22 +650,25 @@ cmp.eq p0,p7=r16,r17 // is this a system call? (p7 <- false, if so) (p7) br.cond.spnt non_syscall - SAVE_MIN // uses r31; defines r2: - - ssm psr.ic | PSR_DEFAULT_BITS + mov r21=ar.fpsr; + mov r29=cr.ipsr; + mov r20=r1; + mov r25=ar.unat; + mov r27=ar.rsc; + mov r26=ar.pfs; + mov r28=cr.iip; + mov r1=IA64_KR(CURRENT); /* r1 = current (physical) */ + ;; + invala; + extr.u r16=r29,32,2; /* extract psr.cpl */ + ;; + cmp.eq pKern,pUser=r0,r16; /* are we in kernel mode already? (psr.cpl==0) */ + /* switch from user to kernel RBS: */ + ;; + mov r30=r0 + MINSTATE_START_SAVE_MIN_VIRT + br.call.sptk.many b7=ia64_syscall_setup ;; - srlz.i // guarantee that interruption collection is on - cmp.eq pSys,pNonSys=r0,r0 // set pSys=1, pNonSys=0 - ;; -(p15) ssm psr.i // restore psr.i - adds r8=(IA64_PT_REGS_R8_OFFSET-IA64_PT_REGS_R16_OFFSET),r2 - ;; - stf8 [r8]=f1 // ensure pt_regs.r8 != 0 (see handle_syscall_error) - adds r3=8,r2 // set up second base pointer for SAVE_REST - ;; - SAVE_REST - br.call.sptk.many rp=demine_args // clear NaT bits in (potential) syscall args - mov r3=255 adds r15=-1024,r15 // r15 contains the syscall number---subtract 1024 adds r2=IA64_TASK_PTRACE_OFFSET,r13 // r2 = ¤t->ptrace @@ -664,8 +688,8 @@ // arrange things so we skip over break instruction when returning: - adds r16=16,sp // get pointer to cr_ipsr - adds r17=24,sp // get pointer to cr_iip + adds r16=PT(CR_IPSR)+16,sp // get pointer to cr_ipsr + adds r17=PT(CR_IIP)+16,sp // get pointer to cr_iip ;; ld8 r18=[r16] // fetch cr_ipsr tbit.z p8,p0=r2,PT_TRACESYS_BIT // (current->ptrace & PF_TRACESYS) == 0? @@ -685,38 +709,11 @@ st8 [r16]=r18 // store new value for cr.isr (p8) br.call.sptk.many b6=b6 // ignore this return addr + br.cond.sptk ia64_trace_syscall // NOT REACHED END(break_fault) -ENTRY(demine_args) - alloc r2=ar.pfs,8,0,0,0 - tnat.nz p8,p0=in0 - tnat.nz p9,p0=in1 - ;; -(p8) mov in0=-1 - tnat.nz p10,p0=in2 - tnat.nz p11,p0=in3 - -(p9) mov in1=-1 - tnat.nz p12,p0=in4 - tnat.nz p13,p0=in5 - ;; -(p10) mov in2=-1 - tnat.nz p14,p0=in6 - tnat.nz p15,p0=in7 - -(p11) mov in3=-1 - tnat.nz p8,p0=r15 // demining r15 is not a must, but it is safer - -(p12) mov in4=-1 -(p13) mov in5=-1 - ;; -(p14) mov in6=-1 -(p15) mov in7=-1 -(p8) mov r15=-1 - br.ret.sptk.many rp -END(demine_args) .align 1024 ///////////////////////////////////////////////////////////////////////////////////////// @@ -725,7 +722,6 @@ DBG_FAULT(12) mov r31=pr // prepare to save predicates ;; - SAVE_MIN_WITH_COVER // uses r31; defines r2 and r3 ssm psr.ic | PSR_DEFAULT_BITS ;; @@ -757,6 +753,125 @@ DBG_FAULT(14) FAULT(14) + /* + * There is no particular reason for this code to be here, other than that + * there happens to be space here that would go unused otherwise. If this + * fault ever gets "unreserved", simply moved the following code to a more + * suitable spot... + * + * ia64_syscall_setup() is a separate subroutine so that it can + * allocate stacked registers so it can safely demine any + * potential NaT values from the input registers. + * + * On entry: + * - executing on bank 0 or bank 1 register set (doesn't matter) + * - r1: stack pointer + * - r2: current task pointer + * - r3: preserved + * - r12: original contents (sp to be saved) + * - r13: original contents (tp to be saved) + * - r15: original contents (syscall # to be saved) + * - r18: saved bsp (after switching to kernel stack) + * - r20: saved r1 (gp) + * - r21: saved ar.fpsr + * - r22: kernel's register backing store base (krbs_base) + * - r23: saved ar.bspstore + * - r24: saved ar.rnat + * - r25: saved ar.unat + * - r26: saved ar.pfs + * - r27: saved ar.rsc + * - r28: saved cr.iip + * - r29: saved cr.ipsr + * - r31: saved pr + * - b0: original contents (to be saved) + * On exit: + * - executing on bank 1 registers + * - psr.ic enabled, interrupts restored + * - r1: kernel's gp + * - r3: preserved (same as on entry) + * - r12: points to kernel stack + * - r13: points to current task + * - p15: TRUE if interrupts need to be re-enabled + * - ar.fpsr: set to kernel settings + */ +ENTRY(ia64_syscall_setup) + alloc r19=ar.pfs,8,0,0,0 + tnat.nz p8,p0=in0 + add r16=PT(CR_IPSR),r1 /* initialize first base pointer */ + ;; + st8 [r16]=r29,16; /* save cr.ipsr */ + adds r17=PT(CR_IIP),r1; /* initialize second base pointer */ + ;; +(p8) mov in0=-1 + tnat.nz p9,p0=in1 + st8 [r17]=r28,16; /* save cr.iip */ + mov r28=b0; +(pKern) mov r18=r0; /* make sure r18 isn't NaT */ + ;; +(p9) mov in1=-1 + tnat.nz p10,p0=in2 + st8 [r16]=r30,16; /* save cr.ifs */ + st8 [r17]=r25,16; /* save ar.unat */ +(pUser) sub r18=r18,r22; /* r18=RSE.ndirty*8 */ + ;; + st8 [r16]=r26,16; /* save ar.pfs */ + st8 [r17]=r27,16; /* save ar.rsc */ + tbit.nz p15,p0=r29,IA64_PSR_I_BIT + ;; /* avoid RAW on r16 & r17 */ +(p10) mov in2=-1 + nop.f 0 + tnat.nz p11,p0=in3 +(pKern) adds r16=16,r16; /* skip over ar_rnat field */ +(pKern) adds r17=16,r17; /* skip over ar_bspstore field */ + shl r18=r18,16; /* compute ar.rsc to be used for "loadrs" */ + ;; +(p11) mov in3=-1 + tnat.nz p12,p0=in4 +(pUser) st8 [r16]=r24,16; /* save ar.rnat */ +(pUser) st8 [r17]=r23,16; /* save ar.bspstore */ + ;; +(p12) mov in4=-1 + tnat.nz p13,p0=in5 + st8 [r16]=r31,16; /* save predicates */ + st8 [r17]=r28,16; /* save b0 */ + dep r14=-1,r0,61,3; + ;; + st8 [r16]=r18,16; /* save ar.rsc value for "loadrs" */ + st8.spill [r17]=r20,16; /* save original r1 */ + adds r2=IA64_PT_REGS_R16_OFFSET,r1; + ;; +(p13) mov in5=-1 + tnat.nz p14,p0=in6 +.mem.offset 0,0; st8.spill [r16]=r12,16; +.mem.offset 8,0; st8.spill [r17]=r13,16; + cmp.eq pNonSys,pSys=r0,r0 /* initialize pSys=0, pNonSys=1 */ + ;; +(p14) mov in6=-1 + tnat.nz p8,p0=in7 +.mem.offset 0,0; st8 [r16]=r21,16; /* ar.fpsr */ +.mem.offset 8,0; st8.spill [r17]=r15,16; + adds r12=-16,r1; /* switch to kernel memory stack (with 16 bytes of scratch) */ + ;; + mov r13=IA64_KR(CURRENT); /* establish `current' */ + movl r1=__gp; /* establish kernel global pointer */ + ;; + MINSTATE_END_SAVE_MIN_VIRT + + tnat.nz p9,p0=r15 +(p8) mov in7=-1 + ssm psr.ic | PSR_DEFAULT_BITS + movl r17=FPSR_DEFAULT + adds r8=(IA64_PT_REGS_R8_OFFSET-IA64_PT_REGS_R16_OFFSET),r2 + ;; + srlz.i // guarantee that interruption collection is on + cmp.eq pSys,pNonSys=r0,r0 // set pSys=1, pNonSys=0 +(p9) mov r15=-1 +(p15) ssm psr.i // restore psr.i + mov.m ar.fpsr=r17 + stf8 [r8]=f1 // ensure pt_regs.r8 != 0 (see handle_syscall_error) + br.ret.sptk.many b7 +END(ia64_syscall_setup) + .align 1024 ///////////////////////////////////////////////////////////////////////////////////////// // 0x3c00 Entry 15 (size 64 bundles) Reserved @@ -808,90 +923,6 @@ DBG_FAULT(16) FAULT(16) -#ifdef CONFIG_IA32_SUPPORT - - /* - * There is no particular reason for this code to be here, other than that - * there happens to be space here that would go unused otherwise. If this - * fault ever gets "unreserved", simply moved the following code to a more - * suitable spot... - */ - - // IA32 interrupt entry point - -ENTRY(dispatch_to_ia32_handler) - SAVE_MIN - ;; - mov r14=cr.isr - ssm psr.ic | PSR_DEFAULT_BITS - ;; - srlz.i // guarantee that interruption collection is on - ;; -(p15) ssm psr.i - adds r3=8,r2 // Base pointer for SAVE_REST - ;; - SAVE_REST - ;; - mov r15=0x80 - shr r14=r14,16 // Get interrupt number - ;; - cmp.ne p6,p0=r14,r15 -(p6) br.call.dpnt.many b6=non_ia32_syscall - - adds r14=IA64_PT_REGS_R8_OFFSET + 16,sp // 16 byte hole per SW conventions - adds r15=IA64_PT_REGS_R1_OFFSET + 16,sp - ;; - cmp.eq pSys,pNonSys=r0,r0 // set pSys=1, pNonSys=0 - st8 [r15]=r8 // save original EAX in r1 (IA32 procs don't use the GP) - ;; - alloc r15=ar.pfs,0,0,6,0 // must first in an insn group - ;; - ld4 r8=[r14],8 // r8 == eax (syscall number) - mov r15=230 // number of entries in ia32 system call table - ;; - cmp.ltu.unc p6,p7=r8,r15 - ld4 out1=[r14],8 // r9 == ecx - ;; - ld4 out2=[r14],8 // r10 == edx - ;; - ld4 out0=[r14] // r11 == ebx - adds r14=(IA64_PT_REGS_R8_OFFSET-(8*3)) + 16,sp - ;; - ld4 out5=[r14],8 // r13 == ebp - ;; - ld4 out3=[r14],8 // r14 == esi - adds r2=IA64_TASK_PTRACE_OFFSET,r13 // r2 = ¤t->ptrace - ;; - ld4 out4=[r14] // r15 == edi - movl r16=ia32_syscall_table - ;; -(p6) shladd r16=r8,3,r16 // force ni_syscall if not valid syscall number - ld8 r2=[r2] // r2 = current->ptrace - ;; - ld8 r16=[r16] - tbit.z p8,p0=r2,PT_TRACESYS_BIT // (current->ptrace & PT_TRACESYS) == 0? - ;; - mov b6=r16 - movl r15=ia32_ret_from_syscall - ;; - mov rp=r15 -(p8) br.call.sptk.many b6=b6 - br.cond.sptk ia32_trace_syscall - -non_ia32_syscall: - alloc r15=ar.pfs,0,0,2,0 - mov out0=r14 // interrupt # - add out1=16,sp // pointer to pt_regs - ;; // avoid WAW on CFM - br.call.sptk.many rp=ia32_bad_interrupt -.ret1: movl r15=ia64_leave_kernel - ;; - mov rp=r15 - br.ret.sptk.many rp -END(dispatch_to_ia32_handler) - -#endif /* CONFIG_IA32_SUPPORT */ - .align 1024 ///////////////////////////////////////////////////////////////////////////////////////// // 0x4400 Entry 17 (size 64 bundles) Reserved @@ -1415,3 +1446,89 @@ // 0x7f00 Entry 67 (size 16 bundles) Reserved DBG_FAULT(67) FAULT(67) + +#ifdef CONFIG_IA32_SUPPORT + + /* + * There is no particular reason for this code to be here, other than that + * there happens to be space here that would go unused otherwise. If this + * fault ever gets "unreserved", simply moved the following code to a more + * suitable spot... + */ + + // IA32 interrupt entry point + +ENTRY(dispatch_to_ia32_handler) + SAVE_MIN + ;; + mov r14=cr.isr + ssm psr.ic | PSR_DEFAULT_BITS + ;; + srlz.i // guarantee that interruption collection is on + ;; +(p15) ssm psr.i + adds r3=8,r2 // Base pointer for SAVE_REST + ;; + SAVE_REST + ;; + mov r15=0x80 + shr r14=r14,16 // Get interrupt number + ;; + cmp.ne p6,p0=r14,r15 +(p6) br.call.dpnt.many b6=non_ia32_syscall + + adds r14=IA64_PT_REGS_R8_OFFSET + 16,sp // 16 byte hole per SW conventions + adds r15=IA64_PT_REGS_R1_OFFSET + 16,sp + ;; + cmp.eq pSys,pNonSys=r0,r0 // set pSys=1, pNonSys=0 + ld8 r8=[r14] // get r8 + ;; + st8 [r15]=r8 // save original EAX in r1 (IA32 procs don't use the GP) + ;; + alloc r15=ar.pfs,0,0,6,0 // must first in an insn group + ;; + ld4 r8=[r14],8 // r8 == eax (syscall number) + mov r15=230 // number of entries in ia32 system call table + ;; + cmp.ltu.unc p6,p7=r8,r15 + ld4 out1=[r14],8 // r9 == ecx + ;; + ld4 out2=[r14],8 // r10 == edx + ;; + ld4 out0=[r14] // r11 == ebx + adds r14=(IA64_PT_REGS_R13_OFFSET) + 16,sp + ;; + ld4 out5=[r14],PT(R14)-PT(R13) // r13 == ebp + ;; + ld4 out3=[r14],PT(R15)-PT(R14) // r14 == esi + adds r2=IA64_TASK_PTRACE_OFFSET,r13 // r2 = ¤t->ptrace + ;; + ld4 out4=[r14] // r15 == edi + movl r16=ia32_syscall_table + ;; +(p6) shladd r16=r8,3,r16 // force ni_syscall if not valid syscall number + ld8 r2=[r2] // r2 = current->ptrace + ;; + ld8 r16=[r16] + tbit.z p8,p0=r2,PT_TRACESYS_BIT // (current->ptrace & PT_TRACESYS) == 0? + ;; + mov b6=r16 + movl r15=ia32_ret_from_syscall + ;; + mov rp=r15 +(p8) br.call.sptk.many b6=b6 + br.cond.sptk ia32_trace_syscall + +non_ia32_syscall: + alloc r15=ar.pfs,0,0,2,0 + mov out0=r14 // interrupt # + add out1=16,sp // pointer to pt_regs + ;; // avoid WAW on CFM + br.call.sptk.many rp=ia32_bad_interrupt +.ret1: movl r15=ia64_leave_kernel + ;; + mov rp=r15 + br.ret.sptk.many rp +END(dispatch_to_ia32_handler) + +#endif /* CONFIG_IA32_SUPPORT */ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/kernel/mca.c linux-2.4.23-pre8/arch/ia64/kernel/mca.c --- linux-2.4.22/arch/ia64/kernel/mca.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/kernel/mca.c 2003-10-22 22:48:54.000000000 +0000 @@ -59,13 +59,13 @@ #include #include -#include #include #include #undef MCA_PRT_XTRA_DATA -#define print_symbol(fmt, addr) printk(fmt, ""); +#define print_symbol(fmt, addr) printk(fmt, "(no symbol)"); +extern void show_stack(struct task_struct *); typedef struct ia64_fptr { unsigned long fp; @@ -99,6 +99,12 @@ .name = "cmc_hndlr" }; +static struct irqaction cmcp_irqaction = { + .handler = ia64_mca_cmc_int_caller, + .flags = SA_INTERRUPT, + .name = "cmc_poll" +}; + static struct irqaction mca_rdzv_irqaction = { .handler = ia64_mca_rendez_int_handler, .flags = SA_INTERRUPT, @@ -117,6 +123,12 @@ .name = "cpe_hndlr" }; +static struct irqaction mca_cpep_irqaction = { + .handler = ia64_mca_cpe_int_caller, + .flags = SA_INTERRUPT, + .name = "cpe_poll" +}; + #define MAX_CPE_POLL_INTERVAL (15*60*HZ) /* 15 minutes */ #define MIN_CPE_POLL_INTERVAL (2*60*HZ) /* 2 minutes */ #define CMC_POLL_INTERVAL (1*60*HZ) /* 1 minute */ @@ -125,11 +137,20 @@ static struct timer_list cpe_poll_timer; static struct timer_list cmc_poll_timer; /* + * This variable tells whether we are currently in polling mode. * Start with this in the wrong state so we won't play w/ timers * before the system is ready. */ static int cmc_polling_enabled = 1; +/* + * Clearing this variable prevents CPE polling from getting activated + * in mca_late_init. Use it if your system doesn't provide a CPEI, + * but encounters problems retrieving CPE logs. This should only be + * necessary for debugging. + */ +static int cpe_poll_enabled = 1; + extern void salinfo_log_wakeup(int); /* @@ -179,6 +200,9 @@ IA64_MCA_DEBUG("ia64_mca_cpe_int_handler: received interrupt. CPU:%d vector = %#x\n", smp_processor_id(), cpe_irq); + /* SAL spec states this should run w/ interrupts enabled */ + local_irq_enable(); + /* Get the CMC error record and log it */ ia64_mca_log_sal_error_record(SAL_INFO_TYPE_CPE, 0); } @@ -322,7 +346,7 @@ } void -init_handler_platform (sal_log_processor_info_t *proc_ptr, +init_handler_platform (pal_min_state_area_t *ms, struct pt_regs *pt, struct switch_stack *sw) { struct unw_frame_info info; @@ -337,12 +361,33 @@ */ printk("Delaying for 5 seconds...\n"); udelay(5*1000000); - show_min_state(&SAL_LPI_PSI_INFO(proc_ptr)->min_state_area); + show_min_state(ms); - fetch_min_state(&SAL_LPI_PSI_INFO(proc_ptr)->min_state_area, pt, sw); + printk("Backtrace of current task (pid %d, %s)\n", current->pid, current->comm); + fetch_min_state(ms, pt, sw); unw_init_from_interruption(&info, current, pt, sw); ia64_do_show_stack(&info, NULL); +#ifdef CONFIG_SMP + /* read_trylock() would be handy... */ + if (!tasklist_lock.write_lock) + read_lock(&tasklist_lock); +#endif + { + struct task_struct *t; + for_each_task(t) { + if (t == current) + continue; + + printk("\nBacktrace of pid %d (%s)\n", t->pid, t->comm); + show_stack(t); + } + } +#ifdef CONFIG_SMP + if (!tasklist_lock.write_lock) + read_unlock(&tasklist_lock); +#endif + printk("\nINIT dump complete. Please reboot now.\n"); while (1); /* hang city if no debugger */ } @@ -653,17 +698,17 @@ IA64_MCA_DEBUG("ia64_mca_init: registered mca rendezvous spinloop and wakeup mech.\n"); - ia64_mc_info.imi_mca_handler = __pa(mca_hldlr_ptr->fp); + ia64_mc_info.imi_mca_handler = ia64_tpa(mca_hldlr_ptr->fp); /* * XXX - disable SAL checksum by setting size to 0; should be - * __pa(ia64_os_mca_dispatch_end) - __pa(ia64_os_mca_dispatch); + * ia64_tpa(ia64_os_mca_dispatch_end) - ia64_tpa(ia64_os_mca_dispatch); */ ia64_mc_info.imi_mca_handler_size = 0; /* Register the os mca handler with SAL */ if ((rc = ia64_sal_set_vectors(SAL_VECTOR_OS_MCA, ia64_mc_info.imi_mca_handler, - mca_hldlr_ptr->gp, + ia64_tpa(mca_hldlr_ptr->gp), ia64_mc_info.imi_mca_handler_size, 0, 0, 0))) { @@ -673,15 +718,15 @@ } IA64_MCA_DEBUG("ia64_mca_init: registered os mca handler with SAL at 0x%lx, gp = 0x%lx\n", - ia64_mc_info.imi_mca_handler, mca_hldlr_ptr->gp); + ia64_mc_info.imi_mca_handler, ia64_tpa(mca_hldlr_ptr->gp)); /* * XXX - disable SAL checksum by setting size to 0, should be * IA64_INIT_HANDLER_SIZE */ - ia64_mc_info.imi_monarch_init_handler = __pa(mon_init_ptr->fp); + ia64_mc_info.imi_monarch_init_handler = ia64_tpa(mon_init_ptr->fp); ia64_mc_info.imi_monarch_init_handler_size = 0; - ia64_mc_info.imi_slave_init_handler = __pa(slave_init_ptr->fp); + ia64_mc_info.imi_slave_init_handler = ia64_tpa(slave_init_ptr->fp); ia64_mc_info.imi_slave_init_handler_size = 0; IA64_MCA_DEBUG("ia64_mca_init: os init handler at %lx\n", @@ -690,10 +735,10 @@ /* Register the os init handler with SAL */ if ((rc = ia64_sal_set_vectors(SAL_VECTOR_OS_INIT, ia64_mc_info.imi_monarch_init_handler, - __pa(ia64_get_gp()), + ia64_tpa(ia64_get_gp()), ia64_mc_info.imi_monarch_init_handler_size, ia64_mc_info.imi_slave_init_handler, - __pa(ia64_get_gp()), + ia64_tpa(ia64_get_gp()), ia64_mc_info.imi_slave_init_handler_size))) { printk(KERN_ERR "ia64_mca_init: Failed to register m/s init handlers with SAL. " @@ -704,10 +749,11 @@ IA64_MCA_DEBUG("ia64_mca_init: registered os init handler with SAL\n"); /* - * Configure the CMCI vector and handler. Interrupts for CMC are + * Configure the CMCI/P vector and handler. Interrupts for CMC are * per-processor, so AP CMC interrupts are setup in smp_callin() (smpboot.c). */ register_percpu_irq(IA64_CMC_VECTOR, &cmci_irqaction); + register_percpu_irq(IA64_CMCP_VECTOR, &cmcp_irqaction); ia64_mca_cmc_vector_setup(); /* Setup vector on BSP & enable */ /* Setup the MCA rendezvous interrupt vector */ @@ -822,9 +868,12 @@ int cpu; /* Clear the Rendez checkin flag for all cpus */ - for(cpu = 0; cpu < smp_num_cpus; cpu++) + for(cpu = 0; cpu < NR_CPUS; cpu++) { + if (!cpu_online(cpu)) + continue; if (ia64_mc_info.imi_rendez_checkin[cpu] == IA64_MCA_RENDEZ_CHECKIN_DONE) ia64_mca_wakeup(cpu); + } } @@ -841,11 +890,11 @@ void ia64_mca_rendez_int_handler(int rendez_irq, void *arg, struct pt_regs *ptregs) { - int flags; + unsigned long flags; int cpu = smp_processor_id(); /* Mask all interrupts */ - save_and_cli(flags); + local_irq_save(flags); ia64_mc_info.imi_rendez_checkin[cpu] = IA64_MCA_RENDEZ_CHECKIN_DONE; /* Register with the SAL monarch that the slave has @@ -860,7 +909,7 @@ ia64_mca_wakeup_ipi_wait(); /* Enable all interrupts */ - restore_flags(flags); + local_irq_restore(flags); } @@ -882,7 +931,6 @@ void ia64_mca_wakeup_int_handler(int wakeup_irq, void *arg, struct pt_regs *ptregs) { - } /* @@ -987,6 +1035,9 @@ IA64_MCA_DEBUG("ia64_mca_cmc_int_handler: received interrupt vector = %#x on CPU %d\n", cmc_irq, smp_processor_id()); + /* SAL spec states this should run w/ interrupts enabled */ + local_irq_enable(); + /* Get the CMC error record and log it */ ia64_mca_log_sal_error_record(SAL_INFO_TYPE_CMC, 0); @@ -994,7 +1045,7 @@ if (!cmc_polling_enabled) { int i, count = 1; /* we know 1 happened now */ unsigned long now = jiffies; - + for (i = 0; i < CMC_HISTORY_LENGTH; i++) { if (now - cmc_history[i] <= HZ) count++; @@ -1002,34 +1053,24 @@ IA64_MCA_DEBUG(KERN_INFO "CMC threshold %d/%d\n", count, CMC_HISTORY_LENGTH); if (count >= CMC_HISTORY_LENGTH) { - /* - * CMC threshold exceeded, clear the history - * so we have a fresh start when we return - */ - for (index = 0 ; index < CMC_HISTORY_LENGTH; index++) - cmc_history[index] = 0; - index = 0; - /* Switch to polling mode */ cmc_polling_enabled = 1; + spin_unlock(&cmc_history_lock); /* - * Unlock & enable interrupts before - * smp_call_function or risk deadlock + * We rely on the local_irq_enable() above so + * that this can't deadlock. */ - spin_unlock(&cmc_history_lock); ia64_mca_cmc_vector_disable(NULL); - local_irq_enable(); - smp_call_function(ia64_mca_cmc_vector_disable, NULL, 1, 1); + smp_call_function(ia64_mca_cmc_vector_disable, NULL, 1, 0); /* * Corrected errors will still be corrected, but * make sure there's a log somewhere that indicates * something is generating more than we can handle. */ - printk(KERN_WARNING "ia64_mca_cmc_int_handler: WARNING: Switching to polling CMC handler, error records may be lost\n"); - + printk(KERN_WARNING "%s: WARNING: Switching to polling CMC handler, error records may be lost\n", __FUNCTION__); mod_timer(&cmc_poll_timer, jiffies + CMC_POLL_INTERVAL); @@ -1082,16 +1123,62 @@ /* * ia64_mca_cmc_int_caller * - * Call CMC interrupt handler, only purpose is to have a - * smp_call_function callable entry. + * Triggered by sw interrupt from CMC polling routine. Calls + * real interrupt handler and either triggers a sw interrupt + * on the next cpu or does cleanup at the end. * - * Inputs : dummy(unused) - * Outputs : None - * */ -static void -ia64_mca_cmc_int_caller(void *dummy) + * Inputs + * interrupt number + * client data arg ptr + * saved registers ptr + * Outputs + * None + */ +void +ia64_mca_cmc_int_caller(int cpe_irq, void *arg, struct pt_regs *ptregs) { - ia64_mca_cmc_int_handler(0, NULL, NULL); + static int start_count = -1; + unsigned int cpuid; + + cpuid = smp_processor_id(); + + /* If first cpu, update count */ + if (start_count == -1) + start_count = IA64_LOG_COUNT(SAL_INFO_TYPE_CMC); + + ia64_mca_cmc_int_handler(cpe_irq, arg, ptregs); + + for (++cpuid ; cpuid < NR_CPUS && !cpu_online(cpuid) ; cpuid++); + + if (cpuid < NR_CPUS) { + platform_send_ipi(cpuid, IA64_CMCP_VECTOR, IA64_IPI_DM_INT, 0); + } else { + /* If no log recored, switch out of polling mode */ + if (start_count == IA64_LOG_COUNT(SAL_INFO_TYPE_CMC)) { + + printk(KERN_WARNING "%s: Returning to interrupt driven CMC handler\n", __FUNCTION__); + + /* + * The cmc interrupt handler enabled irqs, so + * this can't deadlock. + */ + smp_call_function(ia64_mca_cmc_vector_enable, NULL, 1, 0); + + /* + * Turn off interrupts before re-enabling the + * cmc vector locally. Make sure we get out. + */ + local_irq_disable(); + ia64_mca_cmc_vector_enable(NULL); + cmc_polling_enabled = 0; + + } else { + + mod_timer(&cmc_poll_timer, jiffies + CMC_POLL_INTERVAL); + } + + start_count = -1; + } } /* @@ -1106,49 +1193,63 @@ static void ia64_mca_cmc_poll (unsigned long dummy) { - int start_count; - - start_count = IA64_LOG_COUNT(SAL_INFO_TYPE_CMC); - - /* Call the interrupt handler */ - smp_call_function(ia64_mca_cmc_int_caller, NULL, 1, 1); - local_irq_disable(); - ia64_mca_cmc_int_caller(NULL); - local_irq_enable(); - - /* - * If no log recored, switch out of polling mode. - */ - if (start_count == IA64_LOG_COUNT(SAL_INFO_TYPE_CMC)) { - printk(KERN_WARNING "ia64_mca_cmc_poll: Returning to interrupt driven CMC handler\n"); - cmc_polling_enabled = 0; - smp_call_function(ia64_mca_cmc_vector_enable, NULL, 1, 1); - ia64_mca_cmc_vector_enable(NULL); - } else { - mod_timer(&cmc_poll_timer, jiffies + CMC_POLL_INTERVAL); - } + /* Trigger a CMC interrupt cascade */ + platform_send_ipi(__ffs(cpu_online_map), IA64_CMCP_VECTOR, IA64_IPI_DM_INT, 0); } /* * ia64_mca_cpe_int_caller * - * Call CPE interrupt handler, only purpose is to have a - * smp_call_function callable entry. + * Triggered by sw interrupt from CPE polling routine. Calls + * real interrupt handler and either triggers a sw interrupt + * on the next cpu or does cleanup at the end. * - * Inputs : dummy(unused) - * Outputs : None - * */ -static void -ia64_mca_cpe_int_caller(void *dummy) + * Inputs + * interrupt number + * client data arg ptr + * saved registers ptr + * Outputs + * None + */ +void +ia64_mca_cpe_int_caller(int cpe_irq, void *arg, struct pt_regs *ptregs) { - ia64_mca_cpe_int_handler(0, NULL, NULL); + static int start_count = -1; + static int poll_time = MAX_CPE_POLL_INTERVAL; + unsigned int cpuid; + + cpuid = smp_processor_id(); + + /* If first cpu, update count */ + if (start_count == -1) + start_count = IA64_LOG_COUNT(SAL_INFO_TYPE_CPE); + + ia64_mca_cpe_int_handler(cpe_irq, arg, ptregs); + + for (++cpuid ; cpuid < NR_CPUS && !cpu_online(cpuid) ; cpuid++); + + if (cpuid < NR_CPUS) { + platform_send_ipi(cpuid, IA64_CPEP_VECTOR, IA64_IPI_DM_INT, 0); + } else { + /* + * If a log was recorded, increase our polling frequency, + * otherwise, backoff. + */ + if (start_count != IA64_LOG_COUNT(SAL_INFO_TYPE_CPE)) { + poll_time = max(MIN_CPE_POLL_INTERVAL, poll_time / 2); + } else { + poll_time = min(MAX_CPE_POLL_INTERVAL, poll_time * 2); + } + start_count = -1; + mod_timer(&cpe_poll_timer, jiffies + poll_time); + } } /* * ia64_mca_cpe_poll * - * Poll for Corrected Platform Errors (CPEs), dynamically adjust - * polling interval based on occurance of an event. + * Poll for Corrected Platform Errors (CPEs), trigger interrupt + * on first cpu, from there it will trickle through all the cpus. * * Inputs : dummy(unused) * Outputs : None @@ -1157,27 +1258,8 @@ static void ia64_mca_cpe_poll (unsigned long dummy) { - int start_count; - static int poll_time = MAX_CPE_POLL_INTERVAL; - - start_count = IA64_LOG_COUNT(SAL_INFO_TYPE_CPE); - - /* Call the interrupt handler */ - smp_call_function(ia64_mca_cpe_int_caller, NULL, 1, 1); - local_irq_disable(); - ia64_mca_cpe_int_caller(NULL); - local_irq_enable(); - - /* - * If a log was recorded, increase our polling frequency, - * otherwise, backoff. - */ - if (start_count != IA64_LOG_COUNT(SAL_INFO_TYPE_CPE)) { - poll_time = max(MIN_CPE_POLL_INTERVAL, poll_time/2); - } else { - poll_time = min(MAX_CPE_POLL_INTERVAL, poll_time * 2); - } - mod_timer(&cpe_poll_timer, jiffies + poll_time); + /* Trigger a CPE interrupt cascade */ + platform_send_ipi(__ffs(cpu_online_map), IA64_CPEP_VECTOR, IA64_IPI_DM_INT, 0); } /* @@ -1203,8 +1285,10 @@ cpe_poll_timer.function = ia64_mca_cpe_poll; /* If platform doesn't support CPEI, get the timer going. */ - if (acpi_request_vector(ACPI_INTERRUPT_CPEI) < 0) + if (acpi_request_vector(ACPI_INTERRUPT_CPEI) < 0 && cpe_poll_enabled) { + register_percpu_irq(IA64_CPEP_VECTOR, &mca_cpep_irqaction); ia64_mca_cpe_poll(0UL); + } return 0; } @@ -1226,29 +1310,19 @@ void ia64_init_handler (struct pt_regs *pt, struct switch_stack *sw) { - sal_log_processor_info_t *proc_ptr; - ia64_err_rec_t *plog_ptr; + pal_min_state_area_t *ms; - printk(KERN_INFO "Entered OS INIT handler\n"); - - /* Get the INIT processor log */ - if (!ia64_log_get(SAL_INFO_TYPE_INIT, (prfunc_t)printk)) - return; // no record retrieved - -#ifdef IA64_DUMP_ALL_PROC_INFO - ia64_log_print(SAL_INFO_TYPE_INIT, (prfunc_t)printk); -#endif + printk(KERN_INFO "Entered OS INIT handler. PSP=%lx\n", + ia64_sal_to_os_handoff_state.proc_state_param); /* - * get pointer to min state save area - * + * Address of minstate area provided by PAL is physical, + * uncacheable (bit 63 set). Convert to Linux virtual + * address in region 6. */ - plog_ptr=(ia64_err_rec_t *)IA64_LOG_CURR_BUFFER(SAL_INFO_TYPE_INIT); - proc_ptr = &plog_ptr->proc_err; + ms = (pal_min_state_area_t *)(ia64_sal_to_os_handoff_state.pal_min_state | (6ul<<61)); - ia64_process_min_state_save(&SAL_LPI_PSI_INFO(proc_ptr)->min_state_area); - - init_handler_platform(proc_ptr, pt, sw); /* call platform specific routines */ + init_handler_platform(ms, pt, sw); /* call platform specific routines */ } /* @@ -1271,7 +1345,8 @@ static void ia64_log_hexdump(unsigned char *p, unsigned long n_ch, prfunc_t prfunc) { - int i, j; + unsigned long i; + int j; if (!p) return; @@ -1912,9 +1987,9 @@ ia64_log_prt_guid(&psei->guid, prfunc); } if (psei->valid.oem_data) { - platform_plat_specific_err_print((int)psei->header.len, - (int)sizeof(sal_log_plat_specific_err_info_t) - 1, - &(psei->oem_data[0]), prfunc); + platform_plat_specific_err_print((int) psei->header.len, + (char *) psei->oem_data - (char *) psei, + &psei->oem_data[0], prfunc); } prfunc("\n"); } @@ -2119,7 +2194,7 @@ { sal_log_section_hdr_t *slsh; int n_sects; - int ercd_pos; + u32 ercd_pos; if (!lh) return; @@ -2181,7 +2256,7 @@ { sal_log_section_hdr_t *slsh; int n_sects; - int ercd_pos; + u32 ercd_pos; int platform_err = 0; if (!lh) @@ -2319,3 +2394,12 @@ } return platform_err; } + +static int __init +ia64_mca_disable_cpe_polling(char *str) +{ + cpe_poll_enabled = 0; + return 1; +} + +__setup("disable_cpe_poll", ia64_mca_disable_cpe_polling); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/kernel/mca_asm.S linux-2.4.23-pre8/arch/ia64/kernel/mca_asm.S --- linux-2.4.22/arch/ia64/kernel/mca_asm.S 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/kernel/mca_asm.S 2003-10-22 22:48:24.000000000 +0000 @@ -57,7 +57,9 @@ st8 [_tmp]=r9,0x08;; \ st8 [_tmp]=r10,0x08;; \ st8 [_tmp]=r11,0x08;; \ - st8 [_tmp]=r12,0x08 + st8 [_tmp]=r12,0x08;; \ + st8 [_tmp]=r17,0x08;; \ + st8 [_tmp]=r18,0x08 /* * OS_MCA_TO_SAL_HANDOFF_STATE (SAL 3.0 spec) diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/kernel/minstate.h linux-2.4.23-pre8/arch/ia64/kernel/minstate.h --- linux-2.4.22/arch/ia64/kernel/minstate.h 2002-11-28 23:53:09.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/kernel/minstate.h 2003-10-22 22:49:21.000000000 +0000 @@ -3,43 +3,25 @@ #include "entry.h" /* - * A couple of convenience macros that make writing and reading - * SAVE_MIN and SAVE_REST easier. - */ -#define rARPR r31 -#define rCRIFS r30 -#define rCRIPSR r29 -#define rCRIIP r28 -#define rARRSC r27 -#define rARPFS r26 -#define rARUNAT r25 -#define rARRNAT r24 -#define rARBSPSTORE r23 -#define rKRBS r22 -#define rB6 r21 -#define rR1 r20 - -/* - * Here start the source dependent macros. - */ - -/* - * For ivt.s we want to access the stack virtually so we dont have to disable translation + * For ivt.s we want to access the stack virtually so we don't have to disable translation * on interrupts. + * + * On entry: + * r1: pointer to current task (ar.k6) */ #define MINSTATE_START_SAVE_MIN_VIRT \ dep r1=-1,r1,61,3; /* r1 = current (virtual) */ \ (pUser) mov ar.rsc=0; /* set enforced lazy mode, pl 0, little-endian, loadrs=0 */ \ ;; \ -(pUser) addl rKRBS=IA64_RBS_OFFSET,r1; /* compute base of RBS */ \ -(pUser) mov rARRNAT=ar.rnat; \ +(pUser) addl r22=IA64_RBS_OFFSET,r1; /* compute base of RBS */ \ +(pUser) mov r24=ar.rnat; \ (pKern) mov r1=sp; /* get sp */ \ ;; \ (pUser) addl r1=IA64_STK_OFFSET-IA64_PT_REGS_SIZE,r1; /* compute base of memory stack */ \ -(pUser) mov rARBSPSTORE=ar.bspstore; /* save ar.bspstore */ \ +(pUser) mov r23=ar.bspstore; /* save ar.bspstore */ \ ;; \ (pKern) addl r1=-IA64_PT_REGS_SIZE,r1; /* if in kernel mode, use sp (r12) */ \ -(pUser) mov ar.bspstore=rKRBS; /* switch to kernel RBS */ \ +(pUser) mov ar.bspstore=r22; /* switch to kernel RBS */ \ ;; \ (pUser) mov r18=ar.bsp; \ (pUser) mov ar.rsc=0x3; /* set eager mode, pl 0, little-endian, loadrs=0 */ \ @@ -51,21 +33,21 @@ /* * For mca_asm.S we want to access the stack physically since the state is saved before we - * go virtual and dont want to destroy the iip or ipsr. + * go virtual and don't want to destroy the iip or ipsr. */ #define MINSTATE_START_SAVE_MIN_PHYS \ (pKern) movl sp=ia64_init_stack+IA64_STK_OFFSET-IA64_PT_REGS_SIZE; \ (pUser) mov ar.rsc=0; /* set enforced lazy mode, pl 0, little-endian, loadrs=0 */ \ -(pUser) addl rKRBS=IA64_RBS_OFFSET,r1; /* compute base of register backing store */ \ +(pUser) addl r22=IA64_RBS_OFFSET,r1; /* compute base of register backing store */ \ ;; \ -(pUser) mov rARRNAT=ar.rnat; \ +(pUser) mov r24=ar.rnat; \ (pKern) dep r1=0,sp,61,3; /* compute physical addr of sp */ \ (pUser) addl r1=IA64_STK_OFFSET-IA64_PT_REGS_SIZE,r1; /* compute base of memory stack */ \ -(pUser) mov rARBSPSTORE=ar.bspstore; /* save ar.bspstore */ \ -(pUser) dep rKRBS=-1,rKRBS,61,3; /* compute kernel virtual addr of RBS */\ +(pUser) mov r23=ar.bspstore; /* save ar.bspstore */ \ +(pUser) dep r22=-1,r22,61,3; /* compute kernel virtual addr of RBS */\ ;; \ (pKern) addl r1=-IA64_PT_REGS_SIZE,r1; /* if in kernel mode, use sp (r12) */ \ -(pUser) mov ar.bspstore=rKRBS; /* switch to kernel RBS */ \ +(pUser) mov ar.bspstore=r22; /* switch to kernel RBS */ \ ;; \ (pUser) mov r18=ar.bsp; \ (pUser) mov ar.rsc=0x3; /* set eager mode, pl 0, little-endian, loadrs=0 */ \ @@ -96,143 +78,168 @@ * * Upon exit, the state is as follows: * psr.ic: off - * r2 = points to &pt_regs.r16 + * r2 = points to &pt_regs.r16 + * r8 = contents of ar.ccv + * r9 = contents of ar.csd + * r10 = contents of ar.ssd + * r11 = FPSR_DEFAULT * r12 = kernel sp (kernel virtual address) * r13 = points to current task_struct (kernel virtual address) * p15 = TRUE if psr.i is set in cr.ipsr - * predicate registers (other than p2, p3, and p15), b6, r3, r8, r9, r10, r11, r14, r15: + * predicate registers (other than p2, p3, and p15), b6, r3, r14, r15: * preserved * * Note that psr.ic is NOT turned on by this macro. This is so that * we can pass interruption state as arguments to a handler. */ -#define DO_SAVE_MIN(COVER,SAVE_IFS,EXTRA) \ - mov rARRSC=ar.rsc; \ - mov rARPFS=ar.pfs; \ - mov rR1=r1; \ - mov rARUNAT=ar.unat; \ - mov rCRIPSR=cr.ipsr; \ - mov rB6=b6; /* rB6 = branch reg 6 */ \ - mov rCRIIP=cr.iip; \ - mov r1=IA64_KR(CURRENT); /* r1 = current (physical) */ \ - COVER; \ - ;; \ - invala; \ - extr.u r16=rCRIPSR,32,2; /* extract psr.cpl */ \ - ;; \ - cmp.eq pKern,pUser=r0,r16; /* are we in kernel mode already? (psr.cpl==0) */ \ - /* switch from user to kernel RBS: */ \ - ;; \ - SAVE_IFS; \ - MINSTATE_START_SAVE_MIN \ - ;; \ - mov r16=r1; /* initialize first base pointer */ \ - adds r17=8,r1; /* initialize second base pointer */ \ - ;; \ - st8 [r16]=rCRIPSR,16; /* save cr.ipsr */ \ - st8 [r17]=rCRIIP,16; /* save cr.iip */ \ -(pKern) mov r18=r0; /* make sure r18 isn't NaT */ \ - ;; \ - st8 [r16]=rCRIFS,16; /* save cr.ifs */ \ - st8 [r17]=rARUNAT,16; /* save ar.unat */ \ -(pUser) sub r18=r18,rKRBS; /* r18=RSE.ndirty*8 */ \ - ;; \ - st8 [r16]=rARPFS,16; /* save ar.pfs */ \ - st8 [r17]=rARRSC,16; /* save ar.rsc */ \ - tbit.nz p15,p0=rCRIPSR,IA64_PSR_I_BIT \ - ;; /* avoid RAW on r16 & r17 */ \ -(pKern) adds r16=16,r16; /* skip over ar_rnat field */ \ -(pKern) adds r17=16,r17; /* skip over ar_bspstore field */ \ -(pUser) st8 [r16]=rARRNAT,16; /* save ar.rnat */ \ -(pUser) st8 [r17]=rARBSPSTORE,16; /* save ar.bspstore */ \ - ;; \ - st8 [r16]=rARPR,16; /* save predicates */ \ - st8 [r17]=rB6,16; /* save b6 */ \ - shl r18=r18,16; /* compute ar.rsc to be used for "loadrs" */ \ - ;; \ - st8 [r16]=r18,16; /* save ar.rsc value for "loadrs" */ \ - st8.spill [r17]=rR1,16; /* save original r1 */ \ - ;; \ -.mem.offset 0,0; st8.spill [r16]=r2,16; \ -.mem.offset 8,0; st8.spill [r17]=r3,16; \ - adds r2=IA64_PT_REGS_R16_OFFSET,r1; \ - ;; \ -.mem.offset 0,0; st8.spill [r16]=r12,16; \ -.mem.offset 8,0; st8.spill [r17]=r13,16; \ - cmp.eq pNonSys,pSys=r0,r0 /* initialize pSys=0, pNonSys=1 */ \ - ;; \ -.mem.offset 0,0; st8.spill [r16]=r14,16; \ -.mem.offset 8,0; st8.spill [r17]=r15,16; \ - dep r14=-1,r0,61,3; \ - ;; \ -.mem.offset 0,0; st8.spill [r16]=r8,16; \ -.mem.offset 8,0; st8.spill [r17]=r9,16; \ - adds r12=-16,r1; /* switch to kernel memory stack (with 16 bytes of scratch) */ \ - ;; \ -.mem.offset 0,0; st8.spill [r16]=r10,16; \ -.mem.offset 8,0; st8.spill [r17]=r11,16; \ - mov r13=IA64_KR(CURRENT); /* establish `current' */ \ - ;; \ - EXTRA; \ - movl r1=__gp; /* establish kernel global pointer */ \ - ;; \ +#define DO_SAVE_MIN(COVER,SAVE_IFS,EXTRA) \ + mov r29=cr.ipsr; \ + mov r17=IA64_KR(CURRENT); /* r1 = current (physical) */ \ + mov r20=r1; \ + mov r27=ar.rsc; \ + mov r25=ar.unat; \ + mov r26=ar.pfs; \ + mov r21=ar.fpsr; \ + mov r28=cr.iip; \ + COVER; \ + ;; \ + invala; \ + extr.u r16=r29,32,2; /* extract psr.cpl */ \ + ;; \ + cmp.eq pKern,pUser=r0,r16; /* are we in kernel mode already? (psr.cpl==0) */ \ + mov r1=r17; \ + /* switch from user to kernel RBS: */ \ + ;; \ + SAVE_IFS; \ + MINSTATE_START_SAVE_MIN \ + adds r17=2*L1_CACHE_BYTES,r1; /* really: biggest cache-line size */ \ + adds r16=PT(CR_IPSR),r1; \ + ;; \ + lfetch.fault.excl.nt1 [r17],L1_CACHE_BYTES; \ + st8 [r16]=r29; /* save cr.ipsr */ \ + ;; \ + lfetch.fault.excl.nt1 [r17]; \ + ;; \ + adds r16=PT(R8),r1; /* initialize first base pointer */ \ + adds r17=PT(R9),r1; /* initialize second base pointer */ \ + ;; \ +.mem.offset 0,0; st8.spill [r16]=r8,16; \ +.mem.offset 8,0; st8.spill [r17]=r9,16; \ + ;; \ +.mem.offset 0,0; st8.spill [r16]=r10,24; \ +.mem.offset 8,0; st8.spill [r17]=r11,32; \ + ;; \ + st8 [r16]=r28,8; /* save cr.iip */ \ + mov r28=b0; /* rCRIIP=branch reg b0 */ \ +(pKern) mov r18=r0; /* make sure r18 isn't NaT */ \ + mov r8=ar.ccv; \ + mov r9=ar.csd; \ + mov r10=ar.ssd; \ + movl r11=FPSR_DEFAULT; /* L-unit */ \ + ;; \ + st8 [r16]=r30,16; /* save cr.ifs */ \ + st8 [r17]=r25,16; /* save ar.unat */ \ +(pUser) sub r18=r18,r22; /* r18=RSE.ndirty*8 */ \ + ;; \ + st8 [r16]=r26,16; /* save ar.pfs */ \ + st8 [r17]=r27,16; /* save ar.rsc */ \ + tbit.nz p15,p0=r29,IA64_PSR_I_BIT \ + ;; /* avoid RAW on r16 & r17 */ \ +(pKern) adds r16=16,r16; /* skip over ar_rnat field */ \ +(pKern) adds r17=16,r17; /* skip over ar_bspstore field */ \ +(pUser) st8 [r16]=r24,16; /* save ar.rnat */ \ +(pUser) st8 [r17]=r23,16; /* save ar.bspstore */ \ + ;; \ + st8 [r16]=r31,16; /* save predicates */ \ + st8 [r17]=r28,16; /* save b0 */ \ + shl r18=r18,16; /* compute ar.rsc to be used for "loadrs" */ \ + ;; \ + st8 [r16]=r18,16; /* save ar.rsc value for "loadrs" */ \ + st8.spill [r17]=r20,16; /* save original r1 */ \ + ;; \ +.mem.offset 0,0; st8.spill [r16]=r12,16; \ +.mem.offset 8,0; st8.spill [r17]=r13,16; \ + cmp.eq pNonSys,pSys=r0,r0 /* initialize pSys=0, pNonSys=1 */ \ + ;; \ +.mem.offset 0,0; st8 [r16]=r21,PT(R14)-PT(AR_FPSR); /* ar.fpsr */ \ +.mem.offset 8,0; st8.spill [r17]=r15,PT(R3)-PT(R15); \ + adds r12=-16,r1; /* switch to kernel memory stack (with 16 bytes of scratch) */ \ + ;; \ + mov r13=IA64_KR(CURRENT); /* establish `current' */ \ +.mem.offset 0,0; st8.spill [r16]=r14,8; \ + dep r14=-1,r0,61,3; \ + ;; \ +.mem.offset 0,0; st8.spill [r16]=r2,16; \ +.mem.offset 8,0; st8.spill [r17]=r3,16; \ + adds r2=IA64_PT_REGS_R16_OFFSET,r1; \ + ;; \ + EXTRA; \ + movl r1=__gp; /* establish kernel global pointer */ \ + ;; \ MINSTATE_END_SAVE_MIN /* - * SAVE_REST saves the remainder of pt_regs (with psr.ic on). This - * macro guarantees to preserve all predicate registers, r8, r9, r10, - * r11, r14, and r15. + * SAVE_REST saves the remainder of pt_regs (with psr.ic on). * * Assumed state upon entry: * psr.ic: on * r2: points to &pt_regs.r16 * r3: points to &pt_regs.r17 + * r8: contents of ar.ccv + * r9: contents of ar.csd + * r10: contents of ar.ssd + * r11: FPSR_DEFAULT + * + * Registers r14 and r15 are guaranteed not to be touched by SAVE_REST. */ #define SAVE_REST \ -.mem.offset 0,0; st8.spill [r2]=r16,16; \ -.mem.offset 8,0; st8.spill [r3]=r17,16; \ - ;; \ -.mem.offset 0,0; st8.spill [r2]=r18,16; \ -.mem.offset 8,0; st8.spill [r3]=r19,16; \ +.mem.offset 0,0; st8.spill [r2]=r16,16; \ +.mem.offset 8,0; st8.spill [r3]=r17,16; \ ;; \ - mov r16=ar.ccv; /* M-unit */ \ - movl r18=FPSR_DEFAULT /* L-unit */ \ +.mem.offset 0,0; st8.spill [r2]=r18,16; \ +.mem.offset 8,0; st8.spill [r3]=r19,16; \ ;; \ - mov r17=ar.fpsr; /* M-unit */ \ - mov ar.fpsr=r18; /* M-unit */ \ +.mem.offset 0,0; st8.spill [r2]=r20,16; \ +.mem.offset 8,0; st8.spill [r3]=r21,16; \ + mov r18=b6; \ ;; \ -.mem.offset 0,0; st8.spill [r2]=r20,16; \ -.mem.offset 8,0; st8.spill [r3]=r21,16; \ - mov r18=b0; \ - ;; \ -.mem.offset 0,0; st8.spill [r2]=r22,16; \ -.mem.offset 8,0; st8.spill [r3]=r23,16; \ +.mem.offset 0,0; st8.spill [r2]=r22,16; \ +.mem.offset 8,0; st8.spill [r3]=r23,16; \ mov r19=b7; \ ;; \ -.mem.offset 0,0; st8.spill [r2]=r24,16; \ -.mem.offset 8,0; st8.spill [r3]=r25,16; \ - ;; \ -.mem.offset 0,0; st8.spill [r2]=r26,16; \ -.mem.offset 8,0; st8.spill [r3]=r27,16; \ +.mem.offset 0,0; st8.spill [r2]=r24,16; \ +.mem.offset 8,0; st8.spill [r3]=r25,16; \ ;; \ -.mem.offset 0,0; st8.spill [r2]=r28,16; \ -.mem.offset 8,0; st8.spill [r3]=r29,16; \ +.mem.offset 0,0; st8.spill [r2]=r26,16; \ +.mem.offset 8,0; st8.spill [r3]=r27,16; \ ;; \ -.mem.offset 0,0; st8.spill [r2]=r30,16; \ -.mem.offset 8,0; st8.spill [r3]=r31,16; \ +.mem.offset 0,0; st8.spill [r2]=r28,16; \ +.mem.offset 8,0; st8.spill [r3]=r29,16; \ ;; \ - st8 [r2]=r16,16; /* ar.ccv */ \ - st8 [r3]=r17,16; /* ar.fpsr */ \ +.mem.offset 0,0; st8.spill [r2]=r30,16; \ +.mem.offset 8,0; st8.spill [r3]=r31,32; \ ;; \ - st8 [r2]=r18,16; /* b0 */ \ - st8 [r3]=r19,16+8; /* b7 */ \ + mov ar.fpsr=r11; /* M-unit */ \ + st8 [r2]=r8,8; /* ar.ccv */ \ + adds r24=PT(B6)-PT(F7),r3; \ ;; \ stf.spill [r2]=f6,32; \ stf.spill [r3]=f7,32; \ ;; \ stf.spill [r2]=f8,32; \ - stf.spill [r3]=f9,32 + stf.spill [r3]=f9,32; \ + ;; \ + stf.spill [r2]=f10; \ + stf.spill [r3]=f11; \ + adds r25=PT(B7)-PT(F11),r3; \ + ;; \ + st8 [r24]=r18,16; /* b6 */ \ + st8 [r25]=r19,16; /* b7 */ \ + ;; \ + st8 [r24]=r9; /* ar.csd */ \ + st8 [r25]=r10; /* ar.ssd */ \ + ;; -#define SAVE_MIN_WITH_COVER DO_SAVE_MIN(cover, mov rCRIFS=cr.ifs,) -#define SAVE_MIN_WITH_COVER_R19 DO_SAVE_MIN(cover, mov rCRIFS=cr.ifs, mov r15=r19) -#define SAVE_MIN DO_SAVE_MIN( , mov rCRIFS=r0, ) +#define SAVE_MIN_WITH_COVER DO_SAVE_MIN(cover, mov r30=cr.ifs,) +#define SAVE_MIN_WITH_COVER_R19 DO_SAVE_MIN(cover, mov r30=cr.ifs, mov r15=r19) +#define SAVE_MIN DO_SAVE_MIN( , mov r30=r0, ) diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/kernel/pal.S linux-2.4.23-pre8/arch/ia64/kernel/pal.S --- linux-2.4.22/arch/ia64/kernel/pal.S 2003-06-13 14:51:29.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/kernel/pal.S 2003-10-22 22:49:48.000000000 +0000 @@ -164,7 +164,7 @@ ;; mov loc4=ar.rsc // save RSE configuration dep.z loc2=loc2,0,61 // convert pal entry point to physical - dep.z r8=r8,0,61 // convert rp to physical + tpa r8=r8 // convert rp to physical ;; mov b7 = loc2 // install target to branch reg mov ar.rsc=0 // put RSE in enforced lazy, LE mode @@ -174,13 +174,13 @@ or loc3=loc3,r17 // add in psr the bits to set ;; andcm r16=loc3,r16 // removes bits to clear from psr - br.call.sptk.many rp=ia64_switch_mode + br.call.sptk.many rp=ia64_switch_mode_phys .ret1: mov rp = r8 // install return address (physical) br.cond.sptk.many b7 1: mov ar.rsc=0 // put RSE in enforced lazy, LE mode mov r16=loc3 // r16= original psr - br.call.sptk.many rp=ia64_switch_mode // return to virtual mode + br.call.sptk.many rp=ia64_switch_mode_virt // return to virtual mode .ret2: mov psr.l = loc3 // restore init PSR @@ -228,13 +228,13 @@ mov b7 = loc2 // install target to branch reg ;; andcm r16=loc3,r16 // removes bits to clear from psr - br.call.sptk.many rp=ia64_switch_mode + br.call.sptk.many rp=ia64_switch_mode_phys .ret6: br.call.sptk.many rp=b7 // now make the call .ret7: mov ar.rsc=0 // put RSE in enforced lazy, LE mode mov r16=loc3 // r16= original psr - br.call.sptk.many rp=ia64_switch_mode // return to virtual mode + br.call.sptk.many rp=ia64_switch_mode_virt // return to virtual mode .ret8: mov psr.l = loc3 // restore init PSR mov ar.pfs = loc1 diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/kernel/palinfo.c linux-2.4.23-pre8/arch/ia64/kernel/palinfo.c --- linux-2.4.22/arch/ia64/kernel/palinfo.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/kernel/palinfo.c 2003-10-22 22:47:30.000000000 +0000 @@ -91,7 +91,7 @@ "eager loads and stores" }; -#define RSE_HINTS_COUNT (sizeof(rse_hints)/sizeof(const char *)) +#define RSE_HINTS_COUNT ARRAY_SIZE(rse_hints) static const char *mem_attrib[]={ "WB", /* 000 */ @@ -192,15 +192,15 @@ for (i=0; i < 8 ; i++ ) { if (halt_info[i].pal_power_mgmt_info_s.im == 1) { - p += sprintf(p, "Power level %d:\n" \ - "\tentry_latency : %d cycles\n" \ - "\texit_latency : %d cycles\n" \ - "\tpower consumption : %d mW\n" \ - "\tCache+TLB coherency : %s\n", i, - halt_info[i].pal_power_mgmt_info_s.entry_latency, - halt_info[i].pal_power_mgmt_info_s.exit_latency, - halt_info[i].pal_power_mgmt_info_s.power_consumption, - halt_info[i].pal_power_mgmt_info_s.co ? "Yes" : "No"); + p += sprintf(p, "Power level %d:\n" + "\tentry_latency : %d cycles\n" + "\texit_latency : %d cycles\n" + "\tpower consumption : %d mW\n" + "\tCache+TLB coherency : %s\n", i, + halt_info[i].pal_power_mgmt_info_s.entry_latency, + halt_info[i].pal_power_mgmt_info_s.exit_latency, + halt_info[i].pal_power_mgmt_info_s.power_consumption, + halt_info[i].pal_power_mgmt_info_s.co ? "Yes" : "No"); } else { p += sprintf(p,"Power level %d: not implemented\n",i); } @@ -212,9 +212,9 @@ cache_info(char *page) { char *p = page; - u64 levels, unique_caches; + u64 i, levels, unique_caches; pal_cache_config_info_t cci; - int i,j, k; + int j, k; s64 status; if ((status = ia64_pal_cache_summary(&levels, &unique_caches)) != 0) { @@ -232,48 +232,50 @@ if ((status=ia64_pal_cache_config_info(i,j, &cci)) != 0) { continue; } - p += sprintf(p, "%s Cache level %d:\n" \ - "\tSize : %ld bytes\n" \ - "\tAttributes : ", - cache_types[j+cci.pcci_unified], i+1, - cci.pcci_cache_size); + p += sprintf(p, + "%s Cache level %lu:\n" + "\tSize : %lu bytes\n" + "\tAttributes : ", + cache_types[j+cci.pcci_unified], i+1, + cci.pcci_cache_size); if (cci.pcci_unified) p += sprintf(p, "Unified "); p += sprintf(p, "%s\n", cache_mattrib[cci.pcci_cache_attr]); - p += sprintf(p, "\tAssociativity : %d\n" \ - "\tLine size : %d bytes\n" \ - "\tStride : %d bytes\n", - cci.pcci_assoc, - 1<>=1; } p += sprintf(p, "\n\tLoad hints : "); for(k=0; k < 8; k++ ) { - if ( cci.pcci_ld_hints & 0x1) p += sprintf(p, "[%s]", cache_ld_hints[k]); + if (cci.pcci_ld_hints & 0x1) + p += sprintf(p, "[%s]", cache_ld_hints[k]); cci.pcci_ld_hints >>=1; } - p += sprintf(p, "\n\tAlias boundary : %d byte(s)\n" \ - "\tTag LSB : %d\n" \ - "\tTag MSB : %d\n", - 1<0 ; j--) { @@ -379,15 +380,14 @@ continue; } - p += sprintf(p, "\n%s Translation Cache Level %d:\n" \ - "\tHash sets : %d\n" \ - "\tAssociativity : %d\n" \ - "\tNumber of entries : %d\n" \ - "\tFlags : ", - cache_types[j+tc_info.tc_unified], i+1, - tc_info.tc_num_sets, - tc_info.tc_associativity, - tc_info.tc_num_entries); + p += sprintf(p, + "\n%s Translation Cache Level %d:\n" + "\tHash sets : %d\n" + "\tAssociativity : %d\n" + "\tNumber of entries : %d\n" + "\tFlags : ", + cache_types[j+tc_info.tc_unified], i+1, tc_info.tc_num_sets, + tc_info.tc_associativity, tc_info.tc_num_entries); if (tc_info.tc_pf) p += sprintf(p, "PreferredPageSizeOptimized "); if (tc_info.tc_unified) p += sprintf(p, "Unified "); @@ -436,17 +436,18 @@ if (ia64_pal_rse_info(&phys_stacked, &hints) != 0) return 0; - p += sprintf(p, "RSE stacked physical registers : %ld\n" \ - "RSE load/store hints : %ld (%s)\n", - phys_stacked, - hints.ph_data, - hints.ph_data < RSE_HINTS_COUNT ? rse_hints[hints.ph_data]: "(\?\?)"); - - if (ia64_pal_debug_info(&iregs, &dregs)) return 0; - - p += sprintf(p, "Instruction debug register pairs : %ld\n" \ - "Data debug register pairs : %ld\n", - iregs, dregs); + p += sprintf(p, + "RSE stacked physical registers : %ld\n" + "RSE load/store hints : %ld (%s)\n", + phys_stacked, hints.ph_data, + hints.ph_data < RSE_HINTS_COUNT ? rse_hints[hints.ph_data]: "(\?\?)"); + + if (ia64_pal_debug_info(&iregs, &dregs)) + return 0; + + p += sprintf(p, + "Instruction debug register pairs : %ld\n" + "Data debug register pairs : %ld\n", iregs, dregs); return p - page; } @@ -563,26 +564,21 @@ */ if (ia64_pal_version(&min_ver, &cur_ver) != 0) return 0; - p += sprintf(p, "PAL_vendor : 0x%02x (min=0x%02x)\n" \ - "PAL_A : %x.%x.%x (min=%x.%x.%x)\n" \ - "PAL_B : %x.%x.%x (min=%x.%x.%x)\n", - cur_ver.pal_version_s.pv_pal_vendor, - min_ver.pal_version_s.pv_pal_vendor, - - cur_ver.pal_version_s.pv_pal_a_model>>4, - cur_ver.pal_version_s.pv_pal_a_model&0xf, - cur_ver.pal_version_s.pv_pal_a_rev, - min_ver.pal_version_s.pv_pal_a_model>>4, - min_ver.pal_version_s.pv_pal_a_model&0xf, - min_ver.pal_version_s.pv_pal_a_rev, - - cur_ver.pal_version_s.pv_pal_b_model>>4, - cur_ver.pal_version_s.pv_pal_b_model&0xf, - cur_ver.pal_version_s.pv_pal_b_rev, - min_ver.pal_version_s.pv_pal_b_model>>4, - min_ver.pal_version_s.pv_pal_b_model&0xf, - min_ver.pal_version_s.pv_pal_b_rev); - + p += sprintf(p, + "PAL_vendor : 0x%02x (min=0x%02x)\n" + "PAL_A : %x.%x.%x (min=%x.%x.%x)\n" + "PAL_B : %x.%x.%x (min=%x.%x.%x)\n", + cur_ver.pal_version_s.pv_pal_vendor, min_ver.pal_version_s.pv_pal_vendor, + + cur_ver.pal_version_s.pv_pal_a_model>>4, + cur_ver.pal_version_s.pv_pal_a_model&0xf, cur_ver.pal_version_s.pv_pal_a_rev, + min_ver.pal_version_s.pv_pal_a_model>>4, + min_ver.pal_version_s.pv_pal_a_model&0xf, min_ver.pal_version_s.pv_pal_a_rev, + + cur_ver.pal_version_s.pv_pal_b_model>>4, + cur_ver.pal_version_s.pv_pal_b_model&0xf, cur_ver.pal_version_s.pv_pal_b_rev, + min_ver.pal_version_s.pv_pal_b_model>>4, + min_ver.pal_version_s.pv_pal_b_model&0xf, min_ver.pal_version_s.pv_pal_b_rev); return p - page; } @@ -595,26 +591,20 @@ if (ia64_pal_perf_mon_info(pm_buffer, &pm_info) != 0) return 0; - p += sprintf(p, "PMC/PMD pairs : %d\n" \ - "Counter width : %d bits\n" \ - "Cycle event number : %d\n" \ - "Retired event number : %d\n" \ - "Implemented PMC : ", - pm_info.pal_perf_mon_info_s.generic, - pm_info.pal_perf_mon_info_s.width, - pm_info.pal_perf_mon_info_s.cycles, - pm_info.pal_perf_mon_info_s.retired); + p += sprintf(p, + "PMC/PMD pairs : %d\n" + "Counter width : %d bits\n" + "Cycle event number : %d\n" + "Retired event number : %d\n" + "Implemented PMC : ", + pm_info.pal_perf_mon_info_s.generic, pm_info.pal_perf_mon_info_s.width, + pm_info.pal_perf_mon_info_s.cycles, pm_info.pal_perf_mon_info_s.retired); p = bitregister_process(p, pm_buffer, 256); - p += sprintf(p, "\nImplemented PMD : "); - p = bitregister_process(p, pm_buffer+4, 256); - p += sprintf(p, "\nCycles count capable : "); - p = bitregister_process(p, pm_buffer+8, 256); - p += sprintf(p, "\nRetired bundles count capable : "); #ifdef CONFIG_ITANIUM @@ -646,12 +636,11 @@ if (ia64_pal_freq_ratios(&proc, &bus, &itc) != 0) return 0; - p += sprintf(p, "Processor/Clock ratio : %ld/%ld\n" \ - "Bus/Clock ratio : %ld/%ld\n" \ - "ITC/Clock ratio : %ld/%ld\n", - proc.num, proc.den, - bus.num, bus.den, - itc.num, itc.den); + p += sprintf(p, + "Processor/Clock ratio : %ld/%ld\n" + "Bus/Clock ratio : %ld/%ld\n" + "ITC/Clock ratio : %ld/%ld\n", + proc.num, proc.den, bus.num, bus.den, itc.num, itc.den); return p - page; } @@ -665,7 +654,7 @@ u64 tr_buffer[4]; pal_vm_info_1_u_t vm_info_1; pal_vm_info_2_u_t vm_info_2; - int i, j; + u64 i, j; u64 max[3], pgm; struct ifa_reg { u64 valid:1; @@ -711,7 +700,7 @@ status = ia64_pal_tr_read(j, i, tr_buffer, &tr_valid); if (status != 0) { - printk(KERN_ERR "palinfo: pal call failed on tr[%d:%d]=%ld\n", + printk(KERN_ERR "palinfo: pal call failed on tr[%lu:%lu]=%ld\n", i, j, status); continue; } @@ -725,34 +714,29 @@ rid_reg = (struct rid_reg *)&tr_buffer[3]; pgm = -1 << (itir_reg->ps - 12); - p += sprintf(p, "%cTR%d: av=%d pv=%d dv=%d mv=%d\n" \ - "\tppn : 0x%lx\n" \ - "\tvpn : 0x%lx\n" \ - "\tps : ", - - "ID"[i], - j, - tr_valid.pal_tr_valid_s.access_rights_valid, - tr_valid.pal_tr_valid_s.priv_level_valid, - tr_valid.pal_tr_valid_s.dirty_bit_valid, - tr_valid.pal_tr_valid_s.mem_attr_valid, - (gr_reg->ppn & pgm)<< 12, - (ifa_reg->vpn & pgm)<< 12); + p += sprintf(p, + "%cTR%lu: av=%d pv=%d dv=%d mv=%d\n" + "\tppn : 0x%lx\n" + "\tvpn : 0x%lx\n" + "\tps : ", + "ID"[i], j, + tr_valid.pal_tr_valid_s.access_rights_valid, + tr_valid.pal_tr_valid_s.priv_level_valid, + tr_valid.pal_tr_valid_s.dirty_bit_valid, + tr_valid.pal_tr_valid_s.mem_attr_valid, + (gr_reg->ppn & pgm)<< 12, (ifa_reg->vpn & pgm)<< 12); p = bitvector_process(p, 1<< itir_reg->ps); - p += sprintf(p, "\n\tpl : %d\n" \ - "\tar : %d\n" \ - "\trid : %x\n" \ - "\tp : %d\n" \ - "\tma : %d\n" \ - "\td : %d\n", - gr_reg->pl, - gr_reg->ar, - rid_reg->rid, - gr_reg->p, - gr_reg->ma, - gr_reg->d); + p += sprintf(p, + "\n\tpl : %d\n" + "\tar : %d\n" + "\trid : %x\n" + "\tp : %d\n" + "\tma : %d\n" + "\td : %d\n", + gr_reg->pl, gr_reg->ar, rid_reg->rid, gr_reg->p, gr_reg->ma, + gr_reg->d); } } return p - page; @@ -776,7 +760,7 @@ { "tr_info", tr_info, } }; -#define NR_PALINFO_ENTRIES (sizeof(palinfo_entries)/sizeof(palinfo_entry_t)) +#define NR_PALINFO_ENTRIES (int) ARRAY_SIZE(palinfo_entries) /* * this array is used to keep track of the proc entries we create. This is diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/kernel/pci.c linux-2.4.23-pre8/arch/ia64/kernel/pci.c --- linux-2.4.22/arch/ia64/kernel/pci.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/kernel/pci.c 2003-10-22 22:48:42.000000000 +0000 @@ -235,7 +235,7 @@ } static u64 -add_io_space (acpi_resource_address64 *addr) +add_io_space (struct acpi_resource_address64 *addr) { u64 offset; int sparse = 0; @@ -266,10 +266,10 @@ } static acpi_status -count_window (acpi_resource *resource, void *data) +count_window (struct acpi_resource *resource, void *data) { unsigned int *windows = (unsigned int *) data; - acpi_resource_address64 addr; + struct acpi_resource_address64 addr; acpi_status status; status = acpi_resource_to_address64(resource, &addr); @@ -287,11 +287,11 @@ }; static acpi_status -add_window (acpi_resource *res, void *data) +add_window (struct acpi_resource *res, void *data) { struct pci_root_info *info = (struct pci_root_info *) data; struct pci_window *window; - acpi_resource_address64 addr; + struct acpi_resource_address64 addr; acpi_status status; unsigned long flags, offset = 0; struct resource *root; @@ -390,9 +390,6 @@ void __init pcibios_init (void) { - int i = 0; - struct pci_controller *controller; - #ifdef CONFIG_IA64_MCA ia64_mca_check_errors(); /* For post-failure MCA error logging */ #endif diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/kernel/perfmon.c linux-2.4.23-pre8/arch/ia64/kernel/perfmon.c --- linux-2.4.22/arch/ia64/kernel/perfmon.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/kernel/perfmon.c 2003-10-22 22:49:39.000000000 +0000 @@ -447,7 +447,9 @@ * forward declarations */ static void pfm_reset_pmu(struct task_struct *); +#ifndef CONFIG_SMP static unsigned long pfm_lazy_save_regs (struct task_struct *ta); +#endif #if defined(CONFIG_ITANIUM) #include "perfmon_itanium.h" @@ -472,13 +474,13 @@ static inline void pfm_clear_psr_up(void) { - __asm__ __volatile__ ("rum psr.up;; srlz.i;;"::: "memory"); + __asm__ __volatile__ ("rsm psr.up;; srlz.i;;"::: "memory"); } static inline void pfm_set_psr_up(void) { - __asm__ __volatile__ ("sum psr.up;; srlz.i;;"::: "memory"); + __asm__ __volatile__ ("ssm psr.up;; srlz.i;;"::: "memory"); } static inline unsigned long diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/kernel/process.c linux-2.4.23-pre8/arch/ia64/kernel/process.c --- linux-2.4.22/arch/ia64/kernel/process.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/kernel/process.c 2003-10-22 22:48:54.000000000 +0000 @@ -1,7 +1,7 @@ /* * Architecture-specific setup. * - * Copyright (C) 1998-2002 Hewlett-Packard Co + * Copyright (C) 1998-2003 Hewlett-Packard Co * David Mosberger-Tang */ #define __KERNEL_SYSCALLS__ /* see */ @@ -33,15 +33,15 @@ #include #endif -#define print_symbol(fmt, addr) printk(fmt, ""); +#define print_symbol(fmt, addr) printk(fmt, "(no symbol)"); void ia64_do_show_stack (struct unw_frame_info *info, void *arg) { unsigned long ip, sp, bsp; - char buf[80]; /* don't make it so big that it overflows the stack! */ + char buf[128]; /* don't make it so big that it overflows the stack! */ - printk("\nCall Trace: "); + printk("\nCall Trace:\n"); do { unw_get_ip(info, &ip); if (ip == 0) @@ -49,19 +49,15 @@ unw_get_sp(info, &sp); unw_get_bsp(info, &bsp); - snprintf(buf, sizeof(buf), " [<%016lx>] %%s\n\t\t\t\tsp=%016lx bsp=%016lx\n", + snprintf(buf, sizeof(buf), + " [<%016lx>] %%s\n" + " sp=%016lx bsp=%016lx\n", ip, sp, bsp); print_symbol(buf, ip); } while (unw_unwind(info) >= 0); } void -show_trace_task (struct task_struct *task) -{ - show_stack(task); -} - -void show_stack (struct task_struct *task) { if (!task) @@ -75,19 +71,27 @@ } void +show_trace_task (struct task_struct *task) +{ + show_stack(task); +} + +void show_regs (struct pt_regs *regs) { unsigned long ip = regs->cr_iip + ia64_psr(regs)->ri; - printk("\nPid: %d, comm: %20s\n", current->pid, current->comm); + printk("\nPid: %d, CPU %d, comm: %20s\n", current->pid, smp_processor_id(), current->comm); printk("psr : %016lx ifs : %016lx ip : [<%016lx>] %s\n", regs->cr_ipsr, regs->cr_ifs, ip, print_tainted()); + print_symbol("ip is at %s\n", ip); printk("unat: %016lx pfs : %016lx rsc : %016lx\n", regs->ar_unat, regs->ar_pfs, regs->ar_rsc); printk("rnat: %016lx bsps: %016lx pr : %016lx\n", regs->ar_rnat, regs->ar_bspstore, regs->pr); printk("ldrs: %016lx ccv : %016lx fpsr: %016lx\n", regs->loadrs, regs->ar_ccv, regs->ar_fpsr); + printk("csd : %016lx ssd : %016lx\n", regs->ar_csd, regs->ar_ssd); printk("b0 : %016lx b6 : %016lx b7 : %016lx\n", regs->b0, regs->b6, regs->b7); printk("f6 : %05lx%016lx f7 : %05lx%016lx\n", regs->f6.u.bits[1], regs->f6.u.bits[0], @@ -95,6 +99,9 @@ printk("f8 : %05lx%016lx f9 : %05lx%016lx\n", regs->f8.u.bits[1], regs->f8.u.bits[0], regs->f9.u.bits[1], regs->f9.u.bits[0]); + printk("f10 : %05lx%016lx f11 : %05lx%016lx\n", + regs->f10.u.bits[1], regs->f10.u.bits[0], + regs->f11.u.bits[1], regs->f11.u.bits[0]); printk("r1 : %016lx r2 : %016lx r3 : %016lx\n", regs->r1, regs->r2, regs->r3); printk("r8 : %016lx r9 : %016lx r10 : %016lx\n", regs->r8, regs->r9, regs->r10); @@ -124,16 +131,32 @@ show_stack(NULL); } +/* + * We use this if we don't have any better idle routine.. + */ +void +default_idle (void) +{ +#ifdef CONFIG_IA64_PAL_IDLE + if (!current->need_resched) + safe_halt(); +#endif +} + void __attribute__((noreturn)) cpu_idle (void *unused) { - /* endless idle loop with no priority at all */ init_idle(); current->nice = 20; current->counter = -100; + /* endless idle loop with no priority at all */ while (1) { + void (*idle)(void) = pm_idle; + if (!idle) + idle = default_idle; + #ifdef CONFIG_SMP if (!current->need_resched) min_xtp(); @@ -143,7 +166,7 @@ #ifdef CONFIG_IA64_SGI_SN snidle(); #endif - continue; + (*idle)(); } #ifdef CONFIG_IA64_SGI_SN @@ -155,8 +178,6 @@ #endif schedule(); check_pgt_cache(); - if (pm_idle) - (*pm_idle)(); } } @@ -426,6 +447,8 @@ dst[52] = pt->ar_pfs; /* UNW_AR_PFS is == to pt->cr_ifs for interrupt frames */ unw_get_ar(info, UNW_AR_LC, &dst[53]); unw_get_ar(info, UNW_AR_EC, &dst[54]); + unw_get_ar(info, UNW_AR_CSD, &dst[55]); + unw_get_ar(info, UNW_AR_SSD, &dst[56]); } void diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/kernel/ptrace.c linux-2.4.23-pre8/arch/ia64/kernel/ptrace.c --- linux-2.4.22/arch/ia64/kernel/ptrace.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/kernel/ptrace.c 2003-10-22 22:49:48.000000000 +0000 @@ -28,6 +28,8 @@ #include #endif +#define offsetof(type,field) ((unsigned long) &((type *) 0)->field) + /* * Bits in the PSR that we allow ptrace() to change: * be, up, ac, mfl, mfh (the user mask; five bits total) @@ -690,9 +692,12 @@ else ia64_flush_fph(child); ptr = (unsigned long *) ((unsigned long) &child->thread.fph + addr); - } else if (addr >= PT_F10 && addr < PT_F15 + 16) { + } else if ((addr >= PT_F10) && (addr < PT_F11 + 16)) { + /* scratch registers untouched by kernel (saved in pt_regs) */ + ptr = (unsigned long *) ((long) pt + offsetof(struct pt_regs, f10) + addr - PT_F10); + } else if (addr >= PT_F12 && addr < PT_F15 + 16) { /* scratch registers untouched by kernel (saved in switch_stack) */ - ptr = (unsigned long *) ((long) sw + addr - PT_NAT_BITS); + ptr = (unsigned long *) ((long) sw + (addr - PT_NAT_BITS - 32)); } else if (addr < PT_AR_LC + 8) { /* preserved state: */ unsigned long nat_bits, scratch_unat, dummy = 0; @@ -828,22 +833,69 @@ else return ia64_peek(child, sw, urbs_end, rnat_addr, data); - case PT_R1: case PT_R2: case PT_R3: + case PT_R1: + ptr = (unsigned long *) ((long) pt + offsetof(struct pt_regs, r1)); + break; + + case PT_R2: case PT_R3: + ptr = (unsigned long *) ((long) pt + offsetof(struct pt_regs, r2) + addr - PT_R2); + break; case PT_R8: case PT_R9: case PT_R10: case PT_R11: - case PT_R12: case PT_R13: case PT_R14: case PT_R15: + ptr = (unsigned long *) ((long) pt + offsetof(struct pt_regs, r8)+ addr - PT_R8); + break; + case PT_R12: case PT_R13: + ptr = (unsigned long *) ((long) pt + offsetof(struct pt_regs, r12)+ addr - PT_R12); + break; + case PT_R14: + ptr = (unsigned long *) ((long) pt + offsetof(struct pt_regs, r14)); + break; + case PT_R15: + ptr = (unsigned long *) ((long) pt + offsetof(struct pt_regs, r15)); + break; case PT_R16: case PT_R17: case PT_R18: case PT_R19: case PT_R20: case PT_R21: case PT_R22: case PT_R23: case PT_R24: case PT_R25: case PT_R26: case PT_R27: case PT_R28: case PT_R29: case PT_R30: case PT_R31: - case PT_B0: case PT_B6: case PT_B7: + ptr = (unsigned long *) ((long) pt + offsetof(struct pt_regs, r16) + addr - PT_R16); + break; + case PT_B0: + ptr = (unsigned long *) ((long) pt + offsetof(struct pt_regs, b0)); + break; + case PT_B6: + ptr = (unsigned long *) ((long) pt + offsetof(struct pt_regs, b6)); + break; + case PT_B7: + ptr = (unsigned long *) ((long) pt + offsetof(struct pt_regs, b7)); + break; case PT_F6: case PT_F6+8: case PT_F7: case PT_F7+8: case PT_F8: case PT_F8+8: case PT_F9: case PT_F9+8: + ptr = (unsigned long *) ((long) pt + offsetof(struct pt_regs, f6) + addr - PT_F6); + break; case PT_AR_BSPSTORE: - case PT_AR_RSC: case PT_AR_UNAT: case PT_AR_PFS: - case PT_AR_CCV: case PT_AR_FPSR: case PT_CR_IIP: case PT_PR: - /* scratch register */ - ptr = (unsigned long *) ((long) pt + addr - PT_CR_IPSR); + ptr = (unsigned long *) ((long) pt + offsetof(struct pt_regs, ar_bspstore)); + break; + case PT_AR_RSC: + ptr = (unsigned long *) ((long) pt + offsetof(struct pt_regs, ar_rsc)); + break; + case PT_AR_UNAT: + ptr = (unsigned long *) ((long) pt + offsetof(struct pt_regs, ar_unat)); + break; + case PT_AR_PFS: + ptr = (unsigned long *) ((long) pt + offsetof(struct pt_regs, ar_pfs)); break; + case PT_AR_CCV: + ptr = (unsigned long *) ((long) pt + offsetof(struct pt_regs, ar_ccv)); + break; + case PT_AR_FPSR: + ptr = (unsigned long *) ((long) pt + offsetof(struct pt_regs, ar_fpsr)); + break; + case PT_CR_IIP: + ptr = (unsigned long *) ((long) pt + offsetof(struct pt_regs, cr_iip)); + break; + case PT_PR: + ptr = (unsigned long *) ((long) pt + offsetof(struct pt_regs, pr)); + break; + /* scratch register */ default: /* disallow accessing anything else... */ @@ -851,6 +903,8 @@ addr); return -1; } + } else if (addr <= PT_AR_SSD) { + ptr = (unsigned long *) ((long) pt + offsetof(struct pt_regs, ar_csd) + addr - PT_AR_CSD); } else { /* access debug registers */ @@ -957,7 +1011,8 @@ /* gr1-gr3 */ - retval |= __copy_to_user(&ppr->gr[1], &pt->r1, sizeof(long) * 3); + retval |= __copy_to_user(&ppr->gr[1], &pt->r1, sizeof(long)); + retval |= __copy_to_user(&ppr->gr[2], &pt->r2, sizeof(long) *2); /* gr4-gr7 */ @@ -971,7 +1026,9 @@ /* gr12-gr15 */ - retval |= __copy_to_user(&ppr->gr[12], &pt->r12, sizeof(long) * 4); + retval |= __copy_to_user(&ppr->gr[12], &pt->r12, sizeof(long) * 2); + retval |= __copy_to_user(&ppr->gr[14], &pt->r14, sizeof(long)); + retval |= __copy_to_user(&ppr->gr[15], &pt->r15, sizeof(long)); /* gr16-gr31 */ @@ -999,13 +1056,13 @@ retval |= access_fr(&info, i, 1, (unsigned long *) &ppr->fr[i] + 1, 0); } - /* fr6-fr9 */ + /* fr6-fr11 */ - retval |= __copy_to_user(&ppr->fr[6], &pt->f6, sizeof(struct ia64_fpreg) * 4); + retval |= __copy_to_user(&ppr->fr[6], &pt->f6, sizeof(struct ia64_fpreg) * 6); - /* fp scratch regs(10-15) */ + /* fp scratch regs(12-15) */ - retval |= __copy_to_user(&ppr->fr[10], &sw->f10, sizeof(struct ia64_fpreg) * 6); + retval |= __copy_to_user(&ppr->fr[12], &sw->f12, sizeof(struct ia64_fpreg) * 4); /* fr16-fr31 */ @@ -1082,7 +1139,8 @@ /* gr1-gr3 */ - retval |= __copy_from_user(&pt->r1, &ppr->gr[1], sizeof(long) * 3); + retval |= __copy_from_user(&pt->r1, &ppr->gr[1], sizeof(long)); + retval |= __copy_from_user(&pt->r2, &ppr->gr[2], sizeof(long) * 2); /* gr4-gr7 */ @@ -1100,7 +1158,9 @@ /* gr12-gr15 */ - retval |= __copy_from_user(&pt->r12, &ppr->gr[12], sizeof(long) * 4); + retval |= __copy_from_user(&pt->r12, &ppr->gr[12], sizeof(long) * 2); + retval |= __copy_from_user(&pt->r14, &ppr->gr[14], sizeof(long)); + retval |= __copy_from_user(&pt->r15, &ppr->gr[15], sizeof(long)); /* gr16-gr31 */ @@ -1128,13 +1188,13 @@ retval |= access_fr(&info, i, 1, (unsigned long *) &ppr->fr[i] + 1, 1); } - /* fr6-fr9 */ + /* fr6-fr11 */ - retval |= __copy_from_user(&pt->f6, &ppr->fr[6], sizeof(ppr->fr[6]) * 4); + retval |= __copy_from_user(&pt->f6, &ppr->fr[6], sizeof(ppr->fr[6]) * 6); - /* fp scratch regs(10-15) */ + /* fp scratch regs(12-15) */ - retval |= __copy_from_user(&sw->f10, &ppr->fr[10], sizeof(ppr->fr[10]) * 6); + retval |= __copy_from_user(&sw->f12, &ppr->fr[12], sizeof(ppr->fr[12]) * 4); /* fr16-fr31 */ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/kernel/salinfo.c linux-2.4.23-pre8/arch/ia64/kernel/salinfo.c --- linux-2.4.22/arch/ia64/kernel/salinfo.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/kernel/salinfo.c 2003-10-22 22:48:42.000000000 +0000 @@ -42,7 +42,7 @@ { "itc_drift", IA64_SAL_PLATFORM_FEATURE_ITC_DRIFT, }, }; -#define NR_SALINFO_ENTRIES (sizeof(salinfo_entries)/sizeof(salinfo_entry_t)) +#define NR_SALINFO_ENTRIES ARRAY_SIZE(salinfo_entries) static char *salinfo_log_name[] = { "mca", @@ -98,9 +98,6 @@ static int salinfo_event_open(struct inode *inode, struct file *file) { - struct proc_dir_entry *entry = (struct proc_dir_entry *) inode->u.generic_ip; - struct salinfo_event *event = entry->data; - if (!suser()) return -EPERM; return 0; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/kernel/setup.c linux-2.4.23-pre8/arch/ia64/kernel/setup.c --- linux-2.4.22/arch/ia64/kernel/setup.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/kernel/setup.c 2003-10-22 22:47:49.000000000 +0000 @@ -32,6 +32,10 @@ #include #include +#ifdef CONFIG_BLK_DEV_RAM +# include +#endif + #include #include #include @@ -39,6 +43,8 @@ #include #include #include +#include +#include #include #ifdef CONFIG_BLK_DEV_RAM @@ -55,7 +61,7 @@ extern char _end; #ifdef CONFIG_NUMA - struct cpuinfo_ia64 *boot_cpu_data; + struct cpuinfo_ia64 *_cpu_data[NR_CPUS]; #else struct cpuinfo_ia64 _cpu_data[NR_CPUS] __attribute__ ((section ("__special_page_section"))); #endif @@ -97,6 +103,7 @@ static struct rsvd_region rsvd_region[IA64_MAX_RSVD_REGIONS + 1]; static int num_rsvd_regions; +#ifndef CONFIG_DISCONTIGMEM static unsigned long bootmap_start; /* physical address where the bootmem map is located */ static int @@ -109,18 +116,74 @@ *max_pfn = pfn; return 0; } +#endif /* !CONFIG_DISCONTIGMEM */ #define IGNORE_PFN0 1 /* XXX fix me: ignore pfn 0 until TLB miss handler is updated... */ +#ifdef CONFIG_DISCONTIGMEM /* - * Free available memory based on the primitive map created from - * the boot parameters. This routine does not assume the incoming - * segments are sorted. + * efi_memmap_walk() knows nothing about layout of memory across nodes. Find + * out to which node a block of memory belongs. Ignore memory that we cannot + * identify, and split blocks that run across multiple nodes. + * + * Take this opportunity to round the start address up and the end address + * down to page boundaries. */ +void +call_pernode_memory (unsigned long start, unsigned long end, void *arg) +{ + unsigned long rs, re; + void (*func)(unsigned long, unsigned long, int); + int i; + + start = PAGE_ALIGN(start); + end &= PAGE_MASK; + if (start >= end) + return; + + func = arg; + + if (!num_memblks) { + /* this machine doesn't have SRAT, */ + /* so call func with nid=0, bank=0 */ + if (start < end) + (*func)(start, end, 0); + return; + } + + for (i = 0; i < num_memblks; i++) { + rs = MAX(__pa(start), node_memblk[i].start_paddr); + re = MIN(__pa(end), node_memblk[i].start_paddr+node_memblk[i].size); + + if (rs < re) + (*func)((unsigned long)__va(rs), (unsigned long)__va(re), node_memblk[i].nid); + if ((unsigned long)__va(re) == end) + break; + } +} + +#else /* CONFIG_DISCONTIGMEM */ + static int free_available_memory (unsigned long start, unsigned long end, void *arg) { + free_bootmem(__pa(start), end - start); + return 0; +} +#endif /* CONFIG_DISCONTIGMEM */ + +/* + * Filter incoming memory segments based on the primitive map created from + * the boot parameters. Segments contained in the map are removed from the + * memory ranges. A caller-specified function is called with the memory + * ranges that remain after filtering. + * This routine does not assume the incoming segments are sorted. + */ +int +filter_rsvd_memory (unsigned long start, unsigned long end, void *arg) +{ unsigned long range_start, range_end, prev_start; + void (*func)(unsigned long, unsigned long, int); int i; #if IGNORE_PFN0 @@ -134,13 +197,18 @@ * lowest possible address(walker uses virtual) */ prev_start = PAGE_OFFSET; + func = arg; for (i = 0; i < num_rsvd_regions; ++i) { range_start = MAX(start, prev_start); range_end = MIN(end, rsvd_region[i].start); if (range_start < range_end) - free_bootmem(__pa(range_start), range_end - range_start); +#ifdef CONFIG_DISCONTIGMEM + call_pernode_memory(range_start, range_end, func); +#else + (*func)(range_start, range_end, 0); +#endif /* nothing more available in this segment */ if (range_end == end) return 0; @@ -152,6 +220,7 @@ } +#ifndef CONFIG_DISCONTIGMEM /* * Find a place to put the bootmap and return its starting address in bootmap_start. * This address must be page-aligned. @@ -190,6 +259,7 @@ } return 0; } +#endif /* CONFIG_DISCONTIGMEM */ static void sort_regions (struct rsvd_region *rsvd_region, int max) @@ -233,8 +303,8 @@ + strlen(__va(ia64_boot_param->command_line)) + 1); n++; - rsvd_region[n].start = KERNEL_START; - rsvd_region[n].end = KERNEL_END; + rsvd_region[n].start = ia64_imva(KERNEL_START); + rsvd_region[n].end = ia64_imva(KERNEL_END); n++; #ifdef CONFIG_BLK_DEV_INITRD @@ -254,6 +324,14 @@ sort_regions(rsvd_region, num_rsvd_regions); +#ifdef CONFIG_DISCONTIGMEM + { + extern void discontig_mem_init(void); + bootmap_size = max_pfn = 0; /* stop gcc warnings */ + discontig_mem_init(); + } +#else /* !CONFIG_DISCONTIGMEM */ + /* first find highest page frame number */ max_pfn = 0; efi_memmap_walk(find_max_pfn, &max_pfn); @@ -270,8 +348,9 @@ bootmap_size = init_bootmem(bootmap_start >> PAGE_SHIFT, max_pfn); /* Free all available memory, then mark bootmem-map as being in use. */ - efi_memmap_walk(free_available_memory, 0); + efi_memmap_walk(filter_rsvd_memory, free_available_memory); reserve_bootmem(bootmap_start, bootmap_size); +#endif /* !CONFIG_DISCONTIGMEM */ #ifdef CONFIG_BLK_DEV_INITRD if (ia64_boot_param->initrd_start) { @@ -297,9 +376,22 @@ saved_command_line[COMMAND_LINE_SIZE-1] = '\0'; /* for safety */ efi_init(); + find_memory(); + +#ifdef CONFIG_ACPI_BOOT + /* Initialize the ACPI boot-time table parser */ + acpi_table_init(); + +# ifdef CONFIG_ACPI_NUMA + acpi_numa_init(); +# endif +#else +# ifdef CONFIG_SMP + smp_build_cpu_map(); /* happens, e.g., with the Ski simulator */ +# endif +#endif /* CONFIG_APCI_BOOT */ iomem_resource.end = ~0UL; /* FIXME probably belongs elsewhere */ - find_memory(); #if 0 /* XXX fix me */ @@ -353,7 +445,7 @@ cpu_init(); /* initialize the bootstrap CPU */ #ifdef CONFIG_ACPI_BOOT - acpi_boot_init(*cmdline_p); + acpi_boot_init(); #endif #ifdef CONFIG_SERIAL_HCDP if (efi.hcdp) { @@ -446,6 +538,8 @@ c->itc_freq / 1000000, c->itc_freq % 1000000, lpj*HZ/500000, (lpj*HZ/5000) % 100); return 0; +#undef lpj +#undef cpu } static void * @@ -546,7 +640,7 @@ unsigned int max_ctx; struct cpuinfo_ia64 *my_cpu_data; #ifdef CONFIG_NUMA - int cpu, order; + int cpu; /* * If NUMA is configured, the cpu_data array is not preallocated. The boot cpu @@ -555,28 +649,14 @@ * is required because some boot code references all cpu_data structures * before the cpus are actually started. */ - if (!boot_cpu_data) { - my_cpu_data = alloc_bootmem_pages_node(NODE_DATA(numa_node_id()), - sizeof(struct cpuinfo_ia64)); - boot_cpu_data = my_cpu_data; - my_cpu_data->cpu_data[0] = my_cpu_data; - for (cpu = 1; cpu < NR_CPUS; ++cpu) - my_cpu_data->cpu_data[cpu] - = alloc_bootmem_pages_node(NODE_DATA(numa_node_id()), - sizeof(struct cpuinfo_ia64)); - for (cpu = 1; cpu < NR_CPUS; ++cpu) - memcpy(my_cpu_data->cpu_data[cpu]->cpu_data, - my_cpu_data->cpu_data, sizeof(my_cpu_data->cpu_data)); - } else { - order = get_order(sizeof(struct cpuinfo_ia64)); - my_cpu_data = page_address(alloc_pages_node(numa_node_id(), GFP_KERNEL, order)); - memcpy(my_cpu_data, boot_cpu_data->cpu_data[smp_processor_id()], - sizeof(struct cpuinfo_ia64)); - __free_pages(virt_to_page(boot_cpu_data->cpu_data[smp_processor_id()]), - order); - for (cpu = 0; cpu < NR_CPUS; ++cpu) - boot_cpu_data->cpu_data[cpu]->cpu_data[smp_processor_id()] = my_cpu_data; - } + for (cpu=0; cpu < NR_CPUS; cpu++) + if (node_cpuid[cpu].phys_id == hard_smp_processor_id()) + break; + my_cpu_data = _cpu_data[cpu]; + my_cpu_data->node_data->active_cpu_count++; + + for (cpu=0; cpucpu_data[smp_processor_id()] = my_cpu_data; #else my_cpu_data = cpu_data(smp_processor_id()); #endif diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/kernel/signal.c linux-2.4.23-pre8/arch/ia64/kernel/signal.c --- linux-2.4.22/arch/ia64/kernel/signal.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/kernel/signal.c 2003-10-22 22:49:03.000000000 +0000 @@ -115,18 +115,28 @@ err |= __get_user(cfm, &sc->sc_cfm); err |= __get_user(um, &sc->sc_um); /* user mask */ err |= __get_user(scr->pt.ar_rsc, &sc->sc_ar_rsc); - err |= __get_user(scr->pt.ar_ccv, &sc->sc_ar_ccv); err |= __get_user(scr->pt.ar_unat, &sc->sc_ar_unat); err |= __get_user(scr->pt.ar_fpsr, &sc->sc_ar_fpsr); err |= __get_user(scr->pt.ar_pfs, &sc->sc_ar_pfs); err |= __get_user(scr->pt.pr, &sc->sc_pr); /* predicates */ err |= __get_user(scr->pt.b0, &sc->sc_br[0]); /* b0 (rp) */ - err |= __get_user(scr->pt.b6, &sc->sc_br[6]); /* b6 */ - err |= __get_user(scr->pt.b7, &sc->sc_br[7]); /* b7 */ - err |= __copy_from_user(&scr->pt.r1, &sc->sc_gr[1], 3*8); /* r1-r3 */ + err |= __copy_from_user(&scr->pt.r1, &sc->sc_gr[1], 8); /* r1 */ err |= __copy_from_user(&scr->pt.r8, &sc->sc_gr[8], 4*8); /* r8-r11 */ - err |= __copy_from_user(&scr->pt.r12, &sc->sc_gr[12], 4*8); /* r12-r15 */ - err |= __copy_from_user(&scr->pt.r16, &sc->sc_gr[16], 16*8); /* r16-r31 */ + err |= __copy_from_user(&scr->pt.r12, &sc->sc_gr[12], 2*8); /* r12-r13 */ + err |= __copy_from_user(&scr->pt.r15, &sc->sc_gr[15], 8); /* r15 */ + + if ((flags & IA64_SC_FLAG_IN_SYSCALL)==0) + { + // Only get user sig context when not in syscall. + err |= __get_user(scr->pt.ar_ccv, &sc->sc_ar_ccv); + err |= __get_user(scr->pt.ar_csd, &sc->sc_ar25); /* ar.csd */ + err |= __get_user(scr->pt.ar_ssd, &sc->sc_ar26); /* ar.ssd */ + err |= __get_user(scr->pt.b6, &sc->sc_br[6]); /* b6 */ + err |= __get_user(scr->pt.b7, &sc->sc_br[7]); /* b7 */ + err |= __copy_from_user(&scr->pt.r2, &sc->sc_gr[2], 2*8); /* r2-r3 */ + err |= __copy_from_user(&scr->pt.r14, &sc->sc_gr[14], 8); /* r14 */ + err |= __copy_from_user(&scr->pt.r16, &sc->sc_gr[16], 16*8); /* r16-r31 */ + } scr->pt.cr_ifs = cfm | (1UL << 63); @@ -354,21 +364,42 @@ err |= __put_user(cfm, &sc->sc_cfm); err |= __put_user(scr->pt.cr_ipsr & IA64_PSR_UM, &sc->sc_um); err |= __put_user(scr->pt.ar_rsc, &sc->sc_ar_rsc); - err |= __put_user(scr->pt.ar_ccv, &sc->sc_ar_ccv); err |= __put_user(scr->pt.ar_unat, &sc->sc_ar_unat); /* ar.unat */ err |= __put_user(scr->pt.ar_fpsr, &sc->sc_ar_fpsr); /* ar.fpsr */ err |= __put_user(scr->pt.ar_pfs, &sc->sc_ar_pfs); err |= __put_user(scr->pt.pr, &sc->sc_pr); /* predicates */ err |= __put_user(scr->pt.b0, &sc->sc_br[0]); /* b0 (rp) */ - err |= __put_user(scr->pt.b6, &sc->sc_br[6]); /* b6 */ - err |= __put_user(scr->pt.b7, &sc->sc_br[7]); /* b7 */ - - err |= __copy_to_user(&sc->sc_gr[1], &scr->pt.r1, 3*8); /* r1-r3 */ + err |= __copy_to_user(&sc->sc_gr[1], &scr->pt.r1, 8); /* r1 */ err |= __copy_to_user(&sc->sc_gr[8], &scr->pt.r8, 4*8); /* r8-r11 */ - err |= __copy_to_user(&sc->sc_gr[12], &scr->pt.r12, 4*8); /* r12-r15 */ - err |= __copy_to_user(&sc->sc_gr[16], &scr->pt.r16, 16*8); /* r16-r31 */ - + err |= __copy_to_user(&sc->sc_gr[12], &scr->pt.r12, 2*8); /* r12-r13 */ + err |= __copy_to_user(&sc->sc_gr[15], &scr->pt.r15, 8); /* r15 */ err |= __put_user(scr->pt.cr_iip + ia64_psr(&scr->pt)->ri, &sc->sc_ip); + + if (flags & IA64_SC_FLAG_IN_SYSCALL) + { + // Clear scratch registers in sig context for asynchronized signal. + err |= __clear_user(&sc->sc_ar_ccv, 8); + err |= __clear_user(&sc->sc_ar25,8); /* ar.csd */ + err |= __clear_user(&sc->sc_ar26,8); /* ar.ssd */ + err |= __clear_user(&sc->sc_br[6],8); /* b6 */ + err |= __clear_user(&sc->sc_br[7],8); /* b7 */ + + err |= __clear_user(&sc->sc_gr[2], 2*8); /* r2-r3 */ + err |= __clear_user(&sc->sc_gr[14],8); /* r14 */ + err |= __clear_user(&sc->sc_gr[16],16*8); /* r16-r31 */ + } else + { + // Copy scratch registers in sig context from pt_regs for synchronized signal. + err |= __put_user(scr->pt.ar_ccv, &sc->sc_ar_ccv); + err |= __put_user(scr->pt.ar_csd, &sc->sc_ar25); /* ar.csd */ + err |= __put_user(scr->pt.ar_ssd, &sc->sc_ar26); /* ar.ssd */ + err |= __put_user(scr->pt.b6, &sc->sc_br[6]); /* b6 */ + err |= __put_user(scr->pt.b7, &sc->sc_br[7]); /* b7 */ + + err |= __copy_to_user(&sc->sc_gr[2], &scr->pt.r2, 2*8); /* r2-r3 */ + err |= __copy_to_user(&sc->sc_gr[14], &scr->pt.r14, 8); /* r14 */ + err |= __copy_to_user(&sc->sc_gr[16], &scr->pt.r16, 16*8); /* r16-r31 */ + } return err; } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/kernel/smpboot.c linux-2.4.23-pre8/arch/ia64/kernel/smpboot.c --- linux-2.4.22/arch/ia64/kernel/smpboot.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/kernel/smpboot.c 2003-10-22 22:48:13.000000000 +0000 @@ -320,6 +320,7 @@ { int cpuid, phys_id; extern void ia64_init_itm(void); + extern void ia64_cpu_local_tick(void); #ifdef CONFIG_PERFMON extern void pfm_init_percpu(void); @@ -576,7 +577,7 @@ /* Tell SAL where to drop the AP's. */ ap_startup = (struct fptr *) start_ap; sal_ret = ia64_sal_set_vectors(SAL_VECTOR_OS_BOOT_RENDEZ, - __pa(ap_startup->fp), __pa(ap_startup->gp), 0, 0, 0, 0); + ia64_tpa(ap_startup->fp), ia64_tpa(ap_startup->gp), 0, 0, 0, 0); if (sal_ret < 0) { printk(KERN_ERR "SMP: Can't set SAL AP Boot Rendezvous: %s\n Forcing UP mode\n", ia64_sal_strerror(sal_ret)); @@ -584,3 +585,27 @@ smp_num_cpus = 1; } } + +/* + * Initialize the logical CPU number to SAPICID mapping + */ +void __init +smp_build_cpu_map (void) +{ + int sapicid, cpu, i; + int boot_cpu_id = hard_smp_processor_id(); + + for (cpu = 0; cpu < NR_CPUS; cpu++) + ia64_cpu_to_sapicid[cpu] = -1; + + ia64_cpu_to_sapicid[0] = boot_cpu_id; + + for (cpu = 1, i = 0; i < smp_boot_data.cpu_count; i++) { + sapicid = smp_boot_data.cpu_phys_id[i]; + if (sapicid == boot_cpu_id) + continue; + ia64_cpu_to_sapicid[cpu] = sapicid; + cpu++; + } +} + diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/kernel/traps.c linux-2.4.23-pre8/arch/ia64/kernel/traps.c --- linux-2.4.22/arch/ia64/kernel/traps.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/kernel/traps.c 2003-10-22 22:49:45.000000000 +0000 @@ -273,7 +273,6 @@ fp_emulate (int fp_fault, void *bundle, long *ipsr, long *fpsr, long *isr, long *pr, long *ifs, struct pt_regs *regs) { - struct ia64_fpreg f6_11[6]; fp_state_t fp_state; fpswa_ret_t ret; @@ -288,11 +287,8 @@ * pointer to point to these registers. */ fp_state.bitmask_low64 = 0xfc0; /* bit6..bit11 */ - f6_11[0] = regs->f6; f6_11[1] = regs->f7; - f6_11[2] = regs->f8; f6_11[3] = regs->f9; - __asm__ ("stf.spill %0=f10%P0" : "=m"(f6_11[4])); - __asm__ ("stf.spill %0=f11%P0" : "=m"(f6_11[5])); - fp_state.fp_state_low_volatile = (fp_state_low_volatile_t *) f6_11; + + fp_state.fp_state_low_volatile = (fp_state_low_volatile_t *) ®s->f6; /* * unsigned long (*EFI_FPSWA) ( * unsigned long trap_type, @@ -308,10 +304,7 @@ (unsigned long *) ipsr, (unsigned long *) fpsr, (unsigned long *) isr, (unsigned long *) pr, (unsigned long *) ifs, &fp_state); - regs->f6 = f6_11[0]; regs->f7 = f6_11[1]; - regs->f8 = f6_11[2]; regs->f9 = f6_11[3]; - __asm__ ("ldf.fill f10=%0%P0" :: "m"(f6_11[4])); - __asm__ ("ldf.fill f11=%0%P0" :: "m"(f6_11[5])); + return ret.status; } @@ -335,8 +328,9 @@ if (jiffies - last_time > 5*HZ) fpu_swa_count = 0; - if ((++fpu_swa_count < 5) && !(current->thread.flags & IA64_THREAD_FPEMU_NOPRINT)) { + if ((fpu_swa_count < 4) && !(current->thread.flags & IA64_THREAD_FPEMU_NOPRINT)) { last_time = jiffies; + ++fpu_swa_count; printk(KERN_WARNING "%s(%d): floating-point assist fault at ip %016lx, isr %016lx\n", current->comm, current->pid, regs->cr_iip + ia64_psr(regs)->ri, isr); } @@ -361,6 +355,10 @@ siginfo.si_addr = (void *) (regs->cr_iip + ia64_psr(regs)->ri); if (isr & 0x11) { siginfo.si_code = FPE_FLTINV; + } else if (isr & 0x22) { + /* denormal operand gets the same si_code as underflow + * see arch/i386/kernel/traps.c:math_error() */ + siginfo.si_code = FPE_FLTUND; } else if (isr & 0x44) { siginfo.si_code = FPE_FLTDIV; } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/kernel/unaligned.c linux-2.4.23-pre8/arch/ia64/kernel/unaligned.c --- linux-2.4.22/arch/ia64/kernel/unaligned.c 2003-06-13 14:51:29.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/kernel/unaligned.c 2003-10-22 22:49:35.000000000 +0000 @@ -217,8 +217,9 @@ RSW(f2), RSW(f3), RSW(f4), RSW(f5), RPT(f6), RPT(f7), RPT(f8), RPT(f9), + RPT(f10), RPT(f11), - RSW(f10), RSW(f11), RSW(f12), RSW(f13), RSW(f14), + RSW(f12), RSW(f13), RSW(f14), RSW(f15), RSW(f16), RSW(f17), RSW(f18), RSW(f19), RSW(f20), RSW(f21), RSW(f22), RSW(f23), RSW(f24), RSW(f25), RSW(f26), RSW(f27), RSW(f28), RSW(f29), diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/kernel/unwind.c linux-2.4.23-pre8/arch/ia64/kernel/unwind.c --- linux-2.4.22/arch/ia64/kernel/unwind.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/kernel/unwind.c 2003-10-22 22:48:57.000000000 +0000 @@ -1,4 +1,7 @@ /* + * Copyright (C) 2003 Fenghua Yu + * - Change pt_regs_off() to make it less dependant on pt_regs structure. + * * Copyright (C) 1999-2003 Hewlett-Packard Co * David Mosberger-Tang */ @@ -209,7 +212,11 @@ #endif }; - +#define OFF_CASE(reg, reg_num) \ + case reg: \ + off=struct_offset(struct pt_regs, reg_num); \ + break; + /* Unwind accessors. */ /* @@ -220,16 +227,40 @@ { unsigned long off =0; - if (reg >= 1 && reg <= 3) - off = struct_offset(struct pt_regs, r1) + 8*(reg - 1); - else if (reg <= 11) - off = struct_offset(struct pt_regs, r8) + 8*(reg - 8); - else if (reg <= 15) - off = struct_offset(struct pt_regs, r12) + 8*(reg - 12); - else if (reg <= 31) - off = struct_offset(struct pt_regs, r16) + 8*(reg - 16); - else - UNW_DPRINT(0, "unwind.%s: bad scratch reg r%lu\n", __FUNCTION__, reg); + switch (reg) + { + OFF_CASE(1,r1) + OFF_CASE(2,r2) + OFF_CASE(3,r3) + OFF_CASE(8,r8) + OFF_CASE(9,r9) + OFF_CASE(10,r10) + OFF_CASE(11,r11) + OFF_CASE(12,r12) + OFF_CASE(13,r13) + OFF_CASE(14,r14) + OFF_CASE(15,r15) + OFF_CASE(16,r16) + OFF_CASE(17,r17) + OFF_CASE(18,r18) + OFF_CASE(19,r19) + OFF_CASE(20,r20) + OFF_CASE(21,r21) + OFF_CASE(22,r22) + OFF_CASE(23,r23) + OFF_CASE(24,r24) + OFF_CASE(25,r25) + OFF_CASE(26,r26) + OFF_CASE(27,r27) + OFF_CASE(28,r28) + OFF_CASE(29,r29) + OFF_CASE(30,r30) + OFF_CASE(31,r31) + default: + UNW_DPRINT(0, "unwind.%s: bad scratch reg r%lu\n", __FUNCTION__, reg); + break; + } + return off; } @@ -416,12 +447,12 @@ if (!addr) addr = &info->sw->f2 + (regnum - 2); } else if (regnum <= 15) { - if (regnum <= 9) { + if (regnum <= 11) { pt = get_scratch_regs(info); addr = &pt->f6 + (regnum - 6); } else - addr = &info->sw->f10 + (regnum - 10); + addr = &info->sw->f12 + (regnum - 12); } else if (regnum <= 31) { addr = info->fr_loc[regnum - 16]; if (!addr) @@ -512,6 +543,16 @@ addr = &pt->ar_ccv; break; + case UNW_AR_CSD: + pt = get_scratch_regs(info); + addr = &pt->ar_csd; + break; + + case UNW_AR_SSD: + pt = get_scratch_regs(info); + addr = &pt->ar_ssd; + break; + default: UNW_DPRINT(0, "unwind.%s: trying to access non-existent ar%u\n", __FUNCTION__, regnum); @@ -685,7 +726,7 @@ * First, resolve implicit register save locations (see Section "11.4.2.3 Rules * for Using Unwind Descriptors", rule 3): */ - for (i = 0; i < (int) sizeof(unw.save_order)/sizeof(unw.save_order[0]); ++i) { + for (i = 0; i < (int) ARRAY_SIZE(unw.save_order); ++i) { reg = sr->curr.reg + unw.save_order[i]; if (reg->where == UNW_WHERE_GR_SAVE) { reg->where = UNW_WHERE_GR; @@ -701,7 +742,7 @@ */ if (sr->imask) { unsigned char kind, mask = 0, *cp = sr->imask; - unsigned long t; + int t; static const unsigned char limit[3] = { UNW_REG_F31, UNW_REG_R7, UNW_REG_B5 }; @@ -1379,7 +1420,7 @@ val = unw.preg_index[UNW_REG_F16 + (rval - 16)]; else { opc = UNW_INSN_MOVE_SCRATCH; - if (rval <= 9) + if (rval <= 11) val = struct_offset(struct pt_regs, f6) + 16*(rval - 6); else UNW_DPRINT(0, "unwind.%s: kernel may not touch f%lu\n", @@ -1731,8 +1772,7 @@ lazy_init: off = unw.sw_off[val]; s[val] = (unsigned long) state->sw + off; - if (off >= struct_offset(struct switch_stack, r4) - && off <= struct_offset(struct switch_stack, r7)) + if (off >= struct_offset(struct switch_stack, r4) && off <= struct_offset(struct switch_stack, r7)) /* * We're initializing a general register: init NaT info, too. Note that * the offset is a multiple of 8 which gives us the 3 bits needed for @@ -1934,7 +1974,7 @@ " pr 0x%lx\n" " sw 0x%lx\n" " sp 0x%lx\n", - __FUNCTION__, (unsigned long) task, rbslimit, rbstop, stktop, stklimit, + __FUNCTION__, (unsigned long) t, rbslimit, rbstop, stktop, stklimit, info->pr, (unsigned long) info->sw, info->sp); STAT(unw.stat.api.init_time += ia64_get_itc() - start; local_irq_restore(flags)); } @@ -1955,7 +1995,7 @@ " bsp 0x%lx\n" " sof 0x%lx\n" " ip 0x%lx\n", - info->bsp, sof, info->ip); + __FUNCTION__, info->bsp, sof, info->ip); find_save_locs(info); } @@ -1973,7 +2013,7 @@ " bsp 0x%lx\n" " sol 0x%lx\n" " ip 0x%lx\n", - info->bsp, sol, info->ip); + __FUNCTION__, info->bsp, sol, info->ip); find_save_locs(info); } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/lib/idiv64.S linux-2.4.23-pre8/arch/ia64/lib/idiv64.S --- linux-2.4.22/arch/ia64/lib/idiv64.S 2001-11-09 22:26:17.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/lib/idiv64.S 2003-10-22 22:47:39.000000000 +0000 @@ -37,57 +37,44 @@ #define NAME PASTE(PASTE(__,SGN),PASTE(OP,di3)) GLOBAL_ENTRY(NAME) - .prologue .regstk 2,0,0,0 // Transfer inputs to FP registers. setf.sig f8 = in0 setf.sig f9 = in1 ;; - .fframe 16 - .save.f 0x20 - stf.spill [sp] = f17,-16 - // Convert the inputs to FP, to avoid FP software-assist faults. INT_TO_FP(f8, f8) - ;; - - .save.f 0x10 - stf.spill [sp] = f16 - .body INT_TO_FP(f9, f9) ;; - frcpa.s1 f17, p6 = f8, f9 // y0 = frcpa(b) + frcpa.s1 f11, p6 = f8, f9 // y0 = frcpa(b) ;; -(p6) fmpy.s1 f7 = f8, f17 // q0 = a*y0 -(p6) fnma.s1 f6 = f9, f17, f1 // e0 = -b*y0 + 1 +(p6) fmpy.s1 f7 = f8, f11 // q0 = a*y0 +(p6) fnma.s1 f6 = f9, f11, f1 // e0 = -b*y0 + 1 ;; -(p6) fma.s1 f16 = f7, f6, f7 // q1 = q0*e0 + q0 +(p6) fma.s1 f10 = f7, f6, f7 // q1 = q0*e0 + q0 (p6) fmpy.s1 f7 = f6, f6 // e1 = e0*e0 ;; #ifdef MODULO sub in1 = r0, in1 // in1 = -b #endif -(p6) fma.s1 f16 = f16, f7, f16 // q2 = q1*e1 + q1 -(p6) fma.s1 f6 = f17, f6, f17 // y1 = y0*e0 + y0 +(p6) fma.s1 f10 = f10, f7, f10 // q2 = q1*e1 + q1 +(p6) fma.s1 f6 = f11, f6, f11 // y1 = y0*e0 + y0 ;; (p6) fma.s1 f6 = f6, f7, f6 // y2 = y1*e1 + y1 -(p6) fnma.s1 f7 = f9, f16, f8 // r = -b*q2 + a +(p6) fnma.s1 f7 = f9, f10, f8 // r = -b*q2 + a ;; #ifdef MODULO setf.sig f8 = in0 // f8 = a setf.sig f9 = in1 // f9 = -b #endif -(p6) fma.s1 f17 = f7, f6, f16 // q3 = r*y2 + q2 +(p6) fma.s1 f11 = f7, f6, f10 // q3 = r*y2 + q2 ;; - .restore sp - ldf.fill f16 = [sp], 16 - FP_TO_INT(f17, f17) // q = trunc(q3) + FP_TO_INT(f11, f11) // q = trunc(q3) ;; #ifdef MODULO - xma.l f17 = f17, f9, f8 // r = q*(-b) + a + xma.l f11 = f11, f9, f8 // r = q*(-b) + a ;; #endif - getf.sig r8 = f17 // transfer result to result register - ldf.fill f17 = [sp] + getf.sig r8 = f11 // transfer result to result register br.ret.sptk.many rp END(NAME) diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/mm/Makefile linux-2.4.23-pre8/arch/ia64/mm/Makefile --- linux-2.4.22/arch/ia64/mm/Makefile 2003-06-13 14:51:29.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/mm/Makefile 2003-10-22 22:48:22.000000000 +0000 @@ -12,5 +12,7 @@ export-objs := init.o obj-y := init.o fault.o tlb.o extable.o +obj-$(CONFIG_NUMA) += numa.o +obj-$(CONFIG_DISCONTIGMEM) += discontig.o include $(TOPDIR)/Rules.make diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/mm/discontig.c linux-2.4.23-pre8/arch/ia64/mm/discontig.c --- linux-2.4.22/arch/ia64/mm/discontig.c 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/mm/discontig.c 2003-10-22 22:49:55.000000000 +0000 @@ -0,0 +1,282 @@ +/* + * Copyright (c) 2000, 2003 Silicon Graphics, Inc. All rights reserved. + * Copyright (c) 2001 Intel Corp. + * Copyright (c) 2001 Tony Luck + * Copyright (c) 2002 NEC Corp. + * Copyright (c) 2002 Kimio Suganuma + */ + +/* + * Platform initialization for Discontig Memory + */ + +#include +#include +#include +#include +#include +#include +#include +#include + + +/* + * Round an address upward to the next multiple of GRANULE size. + */ +#define GRANULEROUNDDOWN(n) ((n) & ~(IA64_GRANULE_SIZE-1)) +#define GRANULEROUNDUP(n) (((n)+IA64_GRANULE_SIZE-1) & ~(IA64_GRANULE_SIZE-1)) + +/* + * Used to locate BOOT_DATA prior to initializing the node data area. + */ +#define BOOT_NODE_DATA(node) pg_data_ptr[node] + +/* + * To prevent cache aliasing effects, align per-node structures so that they + * start at addresses that are strided by node number. + */ +#define NODEDATA_ALIGN(addr, node) ((((addr) + 1024*1024-1) & ~(1024*1024-1)) + (node)*PAGE_SIZE) + + +static struct ia64_node_data *boot_node_data[NR_NODES] __initdata; +static pg_data_t *pg_data_ptr[NR_NODES] __initdata; +static bootmem_data_t bdata[NR_NODES] __initdata; +static unsigned long boot_pernode[NR_NODES] __initdata; +static unsigned long boot_pernodesize[NR_NODES] __initdata; + +extern int filter_rsvd_memory (unsigned long start, unsigned long end, void *arg); +extern struct cpuinfo_ia64 *_cpu_data[NR_CPUS]; + + + +/* + * We allocate one of the bootmem_data_t structs for each piece of memory + * that we wish to treat as a contiguous block. Each such block must start + * on a GRANULE boundary. Multiple banks per node is not supported. + * (Note: on SN2, all memory on a node is trated as a single bank. + * Holes within the bank are supported. This works because memory + * from different banks is not interleaved. The bootmap bitmap + * for the node is somewhat large but not too large). + */ +static int __init +build_maps(unsigned long start, unsigned long end, int node) +{ + bootmem_data_t *bdp; + unsigned long cstart, epfn; + + bdp = &bdata[node]; + epfn = GRANULEROUNDUP(__pa(end)) >> PAGE_SHIFT; + cstart = GRANULEROUNDDOWN(__pa(start)); + + if (!bdp->node_low_pfn) { + bdp->node_boot_start = cstart; + bdp->node_low_pfn = epfn; + } else { + bdp->node_boot_start = min(cstart, bdp->node_boot_start); + bdp->node_low_pfn = max(epfn, bdp->node_low_pfn); + } + + min_low_pfn = min(min_low_pfn, bdp->node_boot_start>>PAGE_SHIFT); + max_low_pfn = max(max_low_pfn, bdp->node_low_pfn); + + return 0; +} + + +/* + * Count the number of cpus on the node + */ +static __inline__ int +count_cpus(int node) +{ + int cpu, n=0; + + for (cpu=0; cpu < NR_CPUS; cpu++) + if (node == node_cpuid[cpu].nid) + n++; + return n; +} + + +/* + * Find space on each node for the bootmem map & other per-node data structures. + * + * Called by efi_memmap_walk to find boot memory on each node. Note that + * only blocks that are free are passed to this routine (currently filtered by + * free_available_memory). + */ +static int __init +find_pernode_space(unsigned long start, unsigned long end, int node) +{ + unsigned long mapsize, pages, epfn, map=0, cpu, cpus; + unsigned long pernodesize=0, pernode; + unsigned long cpu_data, mmu_gathers; + unsigned long pstart, length; + bootmem_data_t *bdp; + + pstart = __pa(start); + length = end - start; + epfn = (pstart + length) >> PAGE_SHIFT; + bdp = &bdata[node]; + + if (pstart < bdp->node_boot_start || epfn > bdp->node_low_pfn) + return 0; + + if (!boot_pernode[node]) { + cpus = count_cpus(node); + pernodesize += PAGE_ALIGN(sizeof(struct cpuinfo_ia64)) * cpus; + pernodesize += L1_CACHE_ALIGN(sizeof(mmu_gather_t)) * cpus; + pernodesize += L1_CACHE_ALIGN(sizeof(pg_data_t)); + pernodesize += L1_CACHE_ALIGN(sizeof(struct ia64_node_data)); + pernodesize = PAGE_ALIGN(pernodesize); + pernode = NODEDATA_ALIGN(pstart, node); + + if (pstart + length > (pernode + pernodesize)) { + boot_pernode[node] = pernode; + boot_pernodesize[node] = pernodesize; + memset(__va(pernode), 0, pernodesize); + + cpu_data = pernode; + pernode += PAGE_ALIGN(sizeof(struct cpuinfo_ia64)) * cpus; + + mmu_gathers = pernode; + pernode += L1_CACHE_ALIGN(sizeof(mmu_gather_t)) * cpus; + + pg_data_ptr[node] = __va(pernode); + pernode += L1_CACHE_ALIGN(sizeof(pg_data_t)); + + boot_node_data[node] = __va(pernode); + pernode += L1_CACHE_ALIGN(sizeof(struct ia64_node_data)); + + pg_data_ptr[node]->bdata = &bdata[node]; + pernode += L1_CACHE_ALIGN(sizeof(pg_data_t)); + + for (cpu=0; cpu < NR_CPUS; cpu++) { + if (node == node_cpuid[cpu].nid) { + _cpu_data[cpu] = __va(cpu_data); + _cpu_data[cpu]->node_data = boot_node_data[node]; + _cpu_data[cpu]->nodeid = node; + _cpu_data[cpu]->mmu_gathers = __va(mmu_gathers); + cpu_data += PAGE_ALIGN(sizeof(struct cpuinfo_ia64)); + mmu_gathers += L1_CACHE_ALIGN(sizeof(mmu_gather_t)); + } + } + + } + } + + pernode = boot_pernode[node]; + pernodesize = boot_pernodesize[node]; + if (pernode && !bdp->node_bootmem_map) { + pages = bdp->node_low_pfn - (bdp->node_boot_start>>PAGE_SHIFT); + mapsize = bootmem_bootmap_pages(pages) << PAGE_SHIFT; + + if (pernode - pstart > mapsize) + map = pstart; + else if (pstart + length - pernode - pernodesize > mapsize) + map = pernode + pernodesize; + + if (map) { + init_bootmem_node( + BOOT_NODE_DATA(node), + map>>PAGE_SHIFT, + bdp->node_boot_start>>PAGE_SHIFT, + bdp->node_low_pfn); + } + + } + + return 0; +} + + +/* + * Free available memory to the bootmem allocator. + * + * Note that only blocks that are free are passed to this routine (currently + * filtered by free_available_memory). + * + */ +static int __init +discontig_free_bootmem_node(unsigned long start, unsigned long end, int node) +{ + free_bootmem_node(BOOT_NODE_DATA(node), __pa(start), end - start); + + return 0; +} + + +/* + * Reserve the space used by the bootmem maps. + */ +static void __init +discontig_reserve_bootmem(void) +{ + int node; + unsigned long base, size, pages; + bootmem_data_t *bdp; + + for (node = 0; node < numnodes; node++) { + bdp = BOOT_NODE_DATA(node)->bdata; + + pages = bdp->node_low_pfn - (bdp->node_boot_start>>PAGE_SHIFT); + size = bootmem_bootmap_pages(pages) << PAGE_SHIFT; + base = __pa(bdp->node_bootmem_map); + reserve_bootmem_node(BOOT_NODE_DATA(node), base, size); + + size = boot_pernodesize[node]; + base = __pa(boot_pernode[node]); + reserve_bootmem_node(BOOT_NODE_DATA(node), base, size); + } +} + +/* + * Initialize per-node data + * + * Finish setting up the node data for this node, then copy it to the other nodes. + * + */ +static void __init +initialize_pernode_data(void) +{ + int cpu, node; + + memcpy(boot_node_data[0]->pg_data_ptrs, pg_data_ptr, sizeof(pg_data_ptr)); + memcpy(boot_node_data[0]->node_data_ptrs, boot_node_data, sizeof(boot_node_data)); + + for (node=1; node < numnodes; node++) { + memcpy(boot_node_data[node], boot_node_data[0], sizeof(struct ia64_node_data)); + boot_node_data[node]->node = node; + } + + for (cpu=0; cpu < NR_CPUS; cpu++) { + node = node_cpuid[cpu].nid; + _cpu_data[cpu]->node_data = boot_node_data[node]; + _cpu_data[cpu]->nodeid = node; + } +} + + +/* + * Called early in boot to setup the boot memory allocator, and to + * allocate the node-local pg_data & node-directory data structures.. + */ +void __init +discontig_mem_init(void) +{ + if (numnodes == 0) { + printk("node info missing!\n"); + numnodes = 1; + } + + min_low_pfn = -1; + max_low_pfn = 0; + + efi_memmap_walk(filter_rsvd_memory, build_maps); + efi_memmap_walk(filter_rsvd_memory, find_pernode_space); + efi_memmap_walk(filter_rsvd_memory, discontig_free_bootmem_node); + + discontig_reserve_bootmem(); + initialize_pernode_data(); +} + diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/mm/init.c linux-2.4.23-pre8/arch/ia64/mm/init.c --- linux-2.4.22/arch/ia64/mm/init.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/mm/init.c 2003-10-22 22:48:39.000000000 +0000 @@ -16,12 +16,14 @@ #include #include #include +#include #include #include #include #include #include +#include #include #include #include @@ -34,11 +36,14 @@ extern char _stext, _etext, _edata, __init_begin, __init_end; extern void ia64_tlb_init (void); +extern int filter_rsvd_memory (unsigned long, unsigned long, void *); +/* Note - may be changed by platform_setup */ unsigned long MAX_DMA_ADDRESS = PAGE_OFFSET + 0x100000000UL; #define LARGE_GAP 0x40000000 /* Use virtual mem map if a hole is > than this */ -static unsigned long totalram_pages; +static unsigned long totalram_pages, reserved_pages; +struct page *zero_page_memmap_ptr; /* map entry for zero page */ unsigned long vmalloc_end = VMALLOC_END_INIT; @@ -63,6 +68,16 @@ return freed; } +inline void +ia64_set_rbs_bot (void) +{ + unsigned long stack_size = current->rlim[RLIMIT_STACK].rlim_max & -16; + + if (stack_size > MAX_USER_STACK_SIZE) + stack_size = MAX_USER_STACK_SIZE; + current->thread.rbs_bot = STACK_TOP - stack_size; +} + /* * This performs some platform-dependent address space initialization. * On IA-64, we want to setup the VM area for the register backing @@ -74,6 +89,8 @@ { struct vm_area_struct *vma; + ia64_set_rbs_bot(); + /* * If we're out of memory and kmem_cache_alloc() returns NULL, we simply ignore * the problem. When the process attempts to write to the register backing store @@ -82,7 +99,7 @@ vma = kmem_cache_alloc(vm_area_cachep, SLAB_KERNEL); if (vma) { vma->vm_mm = current->mm; - vma->vm_start = IA64_RBS_BOT; + vma->vm_start = current->thread.rbs_bot & PAGE_MASK; vma->vm_end = vma->vm_start + PAGE_SIZE; vma->vm_page_prot = PAGE_COPY; vma->vm_flags = VM_READ|VM_WRITE|VM_MAYREAD|VM_MAYWRITE|VM_GROWSUP; @@ -110,10 +127,11 @@ void free_initmem (void) { - unsigned long addr; + unsigned long addr, eaddr; - addr = (unsigned long) &__init_begin; - for (; addr < (unsigned long) &__init_end; addr += PAGE_SIZE) { + addr = (unsigned long) ia64_imva(&__init_begin); + eaddr = (unsigned long) ia64_imva(&__init_end); + for (; addr < eaddr; addr += PAGE_SIZE) { clear_bit(PG_reserved, &virt_to_page((void *)addr)->flags); set_page_count(virt_to_page((void *)addr), 1); free_page(addr); @@ -189,58 +207,39 @@ void show_mem(void) { - int i, total = 0, reserved = 0; - int shared = 0, cached = 0; + int i, reserved; + int shared, cached; + pg_data_t *pgdat; + char *tchar = (numnodes > 1) ? "\t" : ""; printk("Mem-info:\n"); show_free_areas(); -#ifdef CONFIG_DISCONTIGMEM - { - pg_data_t *pgdat = pgdat_list; - - printk("Free swap: %6dkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); - do { - printk("Node ID: %d\n", pgdat->node_id); - for(i = 0; i < pgdat->node_size; i++) { - if (PageReserved(pgdat->node_mem_map+i)) - reserved++; - else if (PageSwapCache(pgdat->node_mem_map+i)) - cached++; - else if (page_count(pgdat->node_mem_map + i)) - shared += page_count(pgdat->node_mem_map + i) - 1; - } - printk("\t%d pages of RAM\n", pgdat->node_size); - printk("\t%d reserved pages\n", reserved); - printk("\t%d pages shared\n", shared); - printk("\t%d pages swap cached\n", cached); - pgdat = pgdat->node_next; - } while (pgdat); - printk("Total of %ld pages in page table cache\n", pgtable_cache_size); - show_buffers(); - printk("%d free buffer pages\n", nr_free_buffer_pages()); - } -#else /* !CONFIG_DISCONTIGMEM */ printk("Free swap: %6dkB\n", nr_swap_pages<<(PAGE_SHIFT-10)); - i = max_mapnr; - while (i-- > 0) { - if (!VALID_PAGE(mem_map + i)) - continue; - total++; - if (PageReserved(mem_map+i)) - reserved++; - else if (PageSwapCache(mem_map+i)) - cached++; - else if (page_count(mem_map + i)) - shared += page_count(mem_map + i) - 1; + for_each_pgdat(pgdat) { + reserved=0; + cached=0; + shared=0; + if (numnodes > 1) + printk("Node ID: %d\n", pgdat->node_id); + for(i = 0; i < pgdat->node_size; i++) { + if (!VALID_PAGE(pgdat->node_mem_map+i)) + continue; + if (PageReserved(pgdat->node_mem_map+i)) + reserved++; + else if (PageSwapCache(pgdat->node_mem_map+i)) + cached++; + else if (page_count(pgdat->node_mem_map + i)) + shared += page_count(pgdat->node_mem_map + i) - 1; + } + printk("%s%ld pages of RAM\n", tchar, pgdat->node_size); + printk("%s%d reserved pages\n", tchar, reserved); + printk("%s%d pages shared\n", tchar, shared); + printk("%s%d pages swap cached\n", tchar, cached); } - printk("%d pages of RAM\n", total); - printk("%d reserved pages\n", reserved); - printk("%d pages shared\n", shared); - printk("%d pages swap cached\n", cached); - printk("%ld pages in page table cache\n", pgtable_cache_size); + printk("Total of %ld pages in page table cache\n", pgtable_cache_size); show_buffers(); -#endif /* !CONFIG_DISCONTIGMEM */ + printk("%d free buffer pages\n", nr_free_buffer_pages()); } /* @@ -360,8 +359,10 @@ static int create_mem_map_page_table (u64 start, u64 end, void *arg) { - unsigned long address, start_page, end_page; + unsigned long address, start_page, end_page, next_blk_page; + unsigned long blk_start; struct page *map_start, *map_end; + int node=0; pgd_t *pgd; pmd_t *pmd; pte_t *pte; @@ -374,18 +375,35 @@ start_page = (unsigned long) map_start & PAGE_MASK; end_page = PAGE_ALIGN((unsigned long) map_end); + /* force the first iteration to get node id */ + blk_start = start; + next_blk_page = 0; + for (address = start_page; address < end_page; address += PAGE_SIZE) { + + /* if we went across a node boundary, get new nid */ + if (address >= next_blk_page) { + struct page *map_next_blk; + + node = paddr_to_nid(__pa(blk_start)); + + /* get end addr of this memblk as next blk_start */ + blk_start = (unsigned long) __va(min(end, memblk_endpaddr(__pa(blk_start)))); + map_next_blk = vmem_map + MAP_NR_DENSE(blk_start); + next_blk_page = PAGE_ALIGN((unsigned long) map_next_blk); + } + pgd = pgd_offset_k(address); if (pgd_none(*pgd)) - pgd_populate(&init_mm, pgd, alloc_bootmem_pages(PAGE_SIZE)); + pgd_populate(&init_mm, pgd, alloc_bootmem_pages_node(NODE_DATA(node), PAGE_SIZE)); pmd = pmd_offset(pgd, address); if (pmd_none(*pmd)) - pmd_populate(&init_mm, pmd, alloc_bootmem_pages(PAGE_SIZE)); + pmd_populate(&init_mm, pmd, alloc_bootmem_pages_node(NODE_DATA(node), PAGE_SIZE)); pte = pte_offset(pmd, address); if (pte_none(*pte)) - set_pte(pte, mk_pte_phys(__pa(alloc_bootmem_pages(PAGE_SIZE)), + set_pte(pte, mk_pte_phys(__pa(alloc_bootmem_pages_node(NODE_DATA(node), PAGE_SIZE)), PAGE_KERNEL)); } return 0; @@ -399,6 +417,14 @@ int highmem; }; +struct memmap_count_callback_data { + int node; + unsigned long num_physpages; + unsigned long num_dma_physpages; + unsigned long min_pfn; + unsigned long max_pfn; +} cdata; + static int virtual_memmap_init (u64 start, u64 end, void *arg) { @@ -454,17 +480,7 @@ efi_memmap_walk(virtual_memmap_init, &args); } - return page_to_phys(end); -} - -static int -count_dma_pages (u64 start, u64 end, void *arg) -{ - unsigned long *count = arg; - - if (end <= MAX_DMA_ADDRESS) - *count += (end - start) >> PAGE_SHIFT; - return 0; + return page_to_phys(end-1) + PAGE_SIZE;; } int @@ -475,16 +491,27 @@ return __get_user(byte, (char *) page) == 0; } +#define GRANULEROUNDDOWN(n) ((n) & ~(IA64_GRANULE_SIZE-1)) +#define GRANULEROUNDUP(n) (((n)+IA64_GRANULE_SIZE-1) & ~(IA64_GRANULE_SIZE-1)) +#define ORDERROUNDDOWN(n) ((n) & ~((PAGE_SIZE<> PAGE_SHIFT; + start = __pa(start); + end = __pa(end); + if (node == cdata.node) { + cdata.num_physpages += (end - start) >> PAGE_SHIFT; + if (start <= __pa(MAX_DMA_ADDRESS)) + cdata.num_dma_physpages += (min(end, __pa(MAX_DMA_ADDRESS)) - start) >> PAGE_SHIFT; + start = GRANULEROUNDDOWN(__pa(start)); + start = ORDERROUNDDOWN(start); + end = GRANULEROUNDUP(__pa(end)); + cdata.max_pfn = max(cdata.max_pfn, end >> PAGE_SHIFT); + cdata.min_pfn = min(cdata.min_pfn, start >> PAGE_SHIFT); + } return 0; } -#ifndef CONFIG_DISCONTIGMEM static int find_largest_hole(u64 start, u64 end, void *arg) { @@ -498,7 +525,6 @@ last_end = end; return 0; } -#endif /* * Set up the page tables. @@ -509,73 +535,76 @@ unsigned long max_dma; unsigned long zones_size[MAX_NR_ZONES]; unsigned long zholes_size[MAX_NR_ZONES]; -#ifndef CONFIG_DISCONTIGMEM unsigned long max_gap; -#endif + int node; /* initialize mem_map[] */ - memset(zones_size, 0, sizeof(zones_size)); - memset(zholes_size, 0, sizeof(zholes_size)); - - num_physpages = 0; - efi_memmap_walk(count_pages, &num_physpages); - - num_dma_physpages = 0; - efi_memmap_walk(count_dma_pages, &num_dma_physpages); - max_dma = virt_to_phys((void *) MAX_DMA_ADDRESS) >> PAGE_SHIFT; - - if (max_low_pfn < max_dma) { - zones_size[ZONE_DMA] = max_low_pfn; - zholes_size[ZONE_DMA] = max_low_pfn - num_dma_physpages; - } else { - zones_size[ZONE_DMA] = max_dma; - zholes_size[ZONE_DMA] = max_dma - num_dma_physpages; - if (num_physpages > num_dma_physpages) { - zones_size[ZONE_NORMAL] = max_low_pfn - max_dma; - zholes_size[ZONE_NORMAL] = (max_low_pfn - max_dma) - - (num_physpages - num_dma_physpages); - } - } - -#ifdef CONFIG_DISCONTIGMEM - free_area_init_node(0, NULL, NULL, zones_size, 0, zholes_size); -#else max_gap = 0; efi_memmap_walk(find_largest_hole, (u64 *)&max_gap); - if (max_gap < LARGE_GAP) { - vmem_map = (struct page *)0; - free_area_init_node(0, NULL, NULL, zones_size, 0, zholes_size); + for (node=0; node < numnodes; node++) { + memset(zones_size, 0, sizeof(zones_size)); + memset(zholes_size, 0, sizeof(zholes_size)); + memset(&cdata, 0, sizeof(cdata)); + + cdata.node = node; + cdata.min_pfn = ~0; + + efi_memmap_walk(filter_rsvd_memory, count_pages); + num_dma_physpages += cdata.num_dma_physpages; + num_physpages += cdata.num_physpages; + + if (cdata.min_pfn >= max_dma) { + zones_size[ZONE_NORMAL] = cdata.max_pfn - cdata.min_pfn; + zholes_size[ZONE_NORMAL] = cdata.max_pfn - cdata.min_pfn - cdata.num_physpages; + } else if (cdata.max_pfn < max_dma) { + zones_size[ZONE_DMA] = cdata.max_pfn - cdata.min_pfn; + zholes_size[ZONE_DMA] = cdata.max_pfn - cdata.min_pfn - cdata.num_dma_physpages; + } else { + zones_size[ZONE_DMA] = max_dma - cdata.min_pfn; + zholes_size[ZONE_DMA] = zones_size[ZONE_DMA] - cdata.num_dma_physpages; + zones_size[ZONE_NORMAL] = cdata.max_pfn - max_dma; + zholes_size[ZONE_NORMAL] = zones_size[ZONE_NORMAL] - (cdata.num_physpages - cdata.num_dma_physpages); + } + + if (numnodes == 1 && max_gap < LARGE_GAP) { + vmem_map = (struct page *)0; + zones_size[ZONE_DMA] += cdata.min_pfn; + zholes_size[ZONE_DMA] += cdata.min_pfn; + free_area_init_core(0, NODE_DATA(node), &mem_map, zones_size, 0, zholes_size, NULL); + } else { + + /* allocate virtual mem_map */ + + if (node == 0) { + unsigned long map_size; + map_size = PAGE_ALIGN(max_low_pfn*sizeof(struct page)); + vmalloc_end -= map_size; + mem_map = vmem_map = (struct page *) vmalloc_end; + efi_memmap_walk(create_mem_map_page_table, 0); + printk(KERN_INFO "Virtual mem_map starts at 0x%p\n", mem_map); + } + + free_area_init_node(node, NODE_DATA(node), vmem_map+cdata.min_pfn, zones_size, + cdata.min_pfn< + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * The following structures are usually initialized by ACPI or + * similar mechanisms and describe the NUMA characteristics of the machine. + */ +int num_memblks = 0; +struct node_memblk_s node_memblk[NR_MEMBLKS]; +struct node_cpuid_s node_cpuid[NR_CPUS]; +/* + * This is a matrix with "distances" between nodes, they should be + * proportional to the memory access latency ratios. + */ +u8 numa_slit[NR_NODES * NR_NODES]; + +/* Identify which cnode a physical address resides on */ +int +paddr_to_nid(unsigned long paddr) +{ + int i; + + for (i = 0; i < num_memblks; i++) + if (paddr >= node_memblk[i].start_paddr && + paddr < node_memblk[i].start_paddr + node_memblk[i].size) + break; + + return (i < num_memblks) ? node_memblk[i].nid : (num_memblks ? -1 : 0); +} + +/* return end addr of a memblk */ +unsigned long +memblk_endpaddr(unsigned long paddr) +{ + int i; + + for (i = 0; i < num_memblks; i++) + if (paddr >= node_memblk[i].start_paddr && + paddr < node_memblk[i].start_paddr + node_memblk[i].size) + return node_memblk[i].start_paddr + node_memblk[i].size; + + return 0; +} + + +/* on which node is each logical CPU (one cacheline even for 64 CPUs) */ +volatile char cpu_to_node_map[NR_CPUS] __cacheline_aligned; + +/* which logical CPUs are on which nodes */ +volatile unsigned long node_to_cpu_mask[NR_NODES] __cacheline_aligned; + +/* + * Build cpu to node mapping and initialize the per node cpu masks. + */ +void __init +build_cpu_to_node_map (void) +{ + int cpu, i, node; + + for(cpu = 0; cpu < NR_CPUS; ++cpu) { + /* + * All Itanium NUMA platforms I know use ACPI, so maybe we + * can drop this ifdef completely. [EF] + */ +#ifdef CONFIG_SMP +# ifdef CONFIG_ACPI_NUMA + node = -1; + for (i = 0; i < NR_CPUS; ++i) { + extern volatile int ia64_cpu_to_sapicid[]; + if (ia64_cpu_to_sapicid[cpu] == node_cpuid[i].phys_id) { + node = node_cpuid[i].nid; + break; + } + } +# else +# error Fixme: Dunno how to build CPU-to-node map. +# endif + cpu_to_node_map[cpu] = node; + if (node >= 0) + __set_bit(cpu, &node_to_cpu_mask[node]); +#else + __set_bit(0, &node_to_cpu_mask[0]); +#endif + } +} + diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/mm/tlb.c linux-2.4.23-pre8/arch/ia64/mm/tlb.c --- linux-2.4.22/arch/ia64/mm/tlb.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/mm/tlb.c 2003-10-22 22:49:12.000000000 +0000 @@ -1,7 +1,7 @@ /* * TLB support routines. * - * Copyright (C) 1998-2001 Hewlett-Packard Co + * Copyright (C) 1998-2001, 2003 Hewlett-Packard Co * David Mosberger-Tang * * 08/02/00 A. Mallick @@ -16,28 +16,21 @@ #include #include +#include #include #include #include -#include -#define SUPPORTED_PGBITS ( \ - 1 << _PAGE_SIZE_256M | \ - 1 << _PAGE_SIZE_64M | \ - 1 << _PAGE_SIZE_16M | \ - 1 << _PAGE_SIZE_4M | \ - 1 << _PAGE_SIZE_1M | \ - 1 << _PAGE_SIZE_256K | \ - 1 << _PAGE_SIZE_64K | \ - 1 << _PAGE_SIZE_16K | \ - 1 << _PAGE_SIZE_8K | \ - 1 << _PAGE_SIZE_4K ) +static struct { + unsigned long mask; /* mask of supported purge page-sizes */ + unsigned long max_bits; /* log2() of largest supported purge page-size */ +} purge; struct ia64_ctx ia64_ctx = { - .lock = SPIN_LOCK_UNLOCKED, - .next = 1, - .limit =(1 << 15) - 1, /* start out with the safe (architected) limit */ - .max_ctx = ~0U + .lock = SPIN_LOCK_UNLOCKED, + .next = 1, + .limit = (1 << 15) - 1, /* start out with the safe (architected) limit */ + .max_ctx = ~0U }; /* @@ -149,22 +142,10 @@ } nbits = ia64_fls(size + 0xfff); - if (((1UL << nbits) & SUPPORTED_PGBITS) == 0) { - if (nbits > _PAGE_SIZE_256M) - nbits = _PAGE_SIZE_256M; - else - /* - * Some page sizes are not implemented in the - * IA-64 arch, so if we get asked to clear an - * unsupported page size, round up to the - * nearest page size. Note that we depend on - * the fact that if page size N is not - * implemented, 2*N _is_ implemented. - */ - ++nbits; - if (((1UL << nbits) & SUPPORTED_PGBITS) == 0) - panic("flush_tlb_range: BUG: nbits=%lu\n", nbits); - } + while (unlikely (((1UL << nbits) & purge.mask) == 0) && (nbits < purge.max_bits)) + ++nbits; + if (nbits > purge.max_bits) + nbits = purge.max_bits; start &= ~((1UL << nbits) - 1); # ifdef CONFIG_SMP @@ -185,6 +166,15 @@ ia64_tlb_init (void) { ia64_ptce_info_t ptce_info; + unsigned long tr_pgbits; + long status; + + if ((status = ia64_pal_vm_page_size(&tr_pgbits, &purge.mask)) != 0) { + printk(KERN_ERR "PAL_VM_PAGE_SIZE failed with status=%ld;" + "defaulting to architected purge page-sizes.\n", status); + purge.mask = 0x115557000; + } + purge.max_bits = ia64_fls(purge.mask); ia64_get_ptce(&ptce_info); local_cpu_data->ptce_base = ptce_info.base; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/scripts/make_gas_hint_test.c linux-2.4.23-pre8/arch/ia64/scripts/make_gas_hint_test.c --- linux-2.4.22/arch/ia64/scripts/make_gas_hint_test.c 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/scripts/make_gas_hint_test.c 2003-10-22 22:47:37.000000000 +0000 @@ -0,0 +1,15 @@ +// The code generates a test case which is used +// to detect whether Binutil supports hint +// instruction correctly or not. +#include +#include + +int main() +{ + char str[32766]; + memset(str,'\n',32765); + str[32765]=0; + printf("%s(p7) hint @pause\n",str); + + return 0; +} diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/fakeprom/fpmem.c linux-2.4.23-pre8/arch/ia64/sn/fakeprom/fpmem.c --- linux-2.4.22/arch/ia64/sn/fakeprom/fpmem.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/fakeprom/fpmem.c 2003-10-22 22:48:31.000000000 +0000 @@ -17,8 +17,58 @@ * klconfig to efi_memmap */ + +/* + * Sometimes it is useful to build a fake prom with a memmap that matches another + * platform. There are restrictions on how successful you will be, but here + * are the instructions for what I have used in the past & had good luck: + * + * - compile a kernel for the target platform (like zx1) with the following + * set: + * #define EFI_DEBUG 1 # in arch/ia64/kernel/efi.c + * #define SRAT_DEBUG # in drivers/acpi/numa.c + * + * - this causes the kernel to dump the memmap & SRAT during boot. + * + * - copy the console output to a file. + * + * - run the following script with the file as input: + * + * #!/bin/sh + * + * awk ' + * /^mem/ { + * printf "\t{%s, %sUL, %sUL, %sUL},\n", $4, $7, $11, $12 + * } + * /SRAT Memory/ { + * if (srat != 1) print "SRAT" + * srat = 1 + * for (i=1; i<=0;i++) + * printf "%4d |%s|\n", i, $i + * printf "\t{%s, %sUL, %sUL, %sUL},\n", $4, $6, $8, $13 + * } + * BEGIN { + * FS="[ \[\)\(\t:=,-]" + * } ' + * + * - this converts the memmap & SRAT info into C code array initilization statements. + * + * - copy & paste the initialization statements into the arrays below. Look for + * comments "PASTE xxx HERE". In general, on the MEMMAP is present on most other + * systems. If you have an SRAT, you may need to hack the number of nodes in fw-emu. + * Good luck... + * + * - set "#define FAKE_MEMMAP 1 + * + * - When running medusa, make sure you set the node1_memory_config to cover the + * amount of memory that you are going to use. Also note that you can run the + * kernel in "alias" space (starts at phy adr 0). This is kinda tricky, though + */ + + #include #include +#include #include "fpmem.h" /* @@ -77,9 +127,9 @@ /* For SN, get the index th nasid */ int -GetNasid(int index) +GetNasid(int cnode) { - return sn_memmap[index].nasid ; + return sn_memmap[cnode].nasid ; } node_memmap_t @@ -94,6 +144,21 @@ return sn_memmap[cnode].cpuconfig & (1UL<attribute = attr; } + +//#define FAKE_MEMMAP 1 +#ifdef FAKE_MEMMAP + +#define OFF 0x3000000000UL +struct { + unsigned long type; + unsigned long attr; + unsigned long start; + unsigned long end; +} mdx[] = { + /* PASTE SRAT HERE */ +}; + +struct srat { + unsigned long start; + unsigned long len; + unsigned long type; + unsigned long pxm; +} srat[] = { + + /* PASTE SRAT HERE */ + +}; + + + +void * +build_memory_srat(struct acpi_table_memory_affinity *ptr) +{ + int i; + int n = sizeof(srat)/sizeof(struct srat); + + for (i=0; iheader.type = ACPI_SRAT_MEMORY_AFFINITY; + ptr->header.length = sizeof(struct acpi_table_memory_affinity); + ptr->proximity_domain = srat[i].pxm; + ptr->base_addr_lo = srat[i].start & 0xffffffff; + ptr->length_lo = srat[i].len & 0xffffffff; + ptr->base_addr_hi = srat[i].start >> 32; + ptr->length_hi = srat[i].len >> 32; + ptr->memory_type = ACPI_ADDRESS_RANGE_MEMORY; + ptr->flags.enabled = 1; + ptr++; + } + return ptr; +} + +int +build_efi_memmap(void *md, int mdsize) +{ + int i; + + for (i=0; iheader.type = ACPI_SRAT_MEMORY_AFFINITY; + ptr->header.length = sizeof(struct acpi_table_memory_affinity); + ptr->proximity_domain = PROXIMITY_DOMAIN(nasid); + ptr->base_addr_lo = 0; + ptr->length_lo = 0; +#if defined(SGI_SN2) + ptr->base_addr_hi = (nasid<<6) | (3<<4); + ptr->length_hi = (MD_BANKSIZE*MD_BANKS_PER_NODE)>>32; +#endif + ptr->memory_type = ACPI_ADDRESS_RANGE_MEMORY; + ptr->flags.enabled = 1; + ptr++; + } + return ptr; +} + + int build_efi_memmap(void *md, int mdsize) { @@ -148,7 +316,6 @@ int cnode,bank ; int nasid ; node_memmap_t membank_info ; - int bsize; int count = 0 ; long paddr, hole, numbytes; @@ -157,18 +324,9 @@ nasid = GetNasid(cnode) ; membank_info = GetMemBankInfo(cnode) ; for (bank=0;bank>1) & 255) #define SN2_BANK_SIZE_SHIFT (MBSHIFT+6) /* 64 MB */ -#define BankPresent(bsize) (bsize<6) -#define BankSizeBytes(bsize) (BankPresent(bsize) ? 1UL<<((bsize)+SN2_BANK_SIZE_SHIFT) : 0) #define MD_BANKS_PER_NODE 4 #define MD_BANKSIZE (1UL << 34) + +#define MAX_SN_NODES 256 +#define MAX_LSAPICS 512 +#define MAX_CPUS_NODE 4 +#define MAX_CPUS (MAX_CPUS_NODE*MAX_SN_NODES) +#define CPUS_PER_FSB 2 +#define CPUS_PER_FSB_MASK (CPUS_PER_FSB-1) +#define MAX_NASID 2048 + #endif +#define FPROM_BUG() do {while (1);} while (0) + typedef struct sn_memmap_s { short nasid ; @@ -66,7 +72,9 @@ sn_memmap_t memmap[1]; /* start of array */ } sn_config_t; +struct acpi_table_memory_affinity; +extern long base_nasid; extern void build_init(unsigned long); extern int build_efi_memmap(void *, int); @@ -74,3 +82,5 @@ extern int GetNumCpus(void); extern int IsCpuPresent(int, int); extern int GetNasid(int); +extern void* build_memory_srat(struct acpi_table_memory_affinity *); +extern void GetLogicalCpu(int, int *, int *); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/fakeprom/fpromasm.S linux-2.4.23-pre8/arch/ia64/sn/fakeprom/fpromasm.S --- linux-2.4.22/arch/ia64/sn/fakeprom/fpromasm.S 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/fakeprom/fpromasm.S 2003-10-22 22:48:15.000000000 +0000 @@ -253,9 +253,10 @@ // Note: should verify that the interrupt we got was really the ap_wakeup // interrupt but this should not be an issue on medusa slave: - nop.i 0x8beef // Medusa - put cpu to sleep til interrupt occurs mov r8=cr.irr0;; // Check for interrupt pending. cmp.eq p6,p0=r8,r0 + ;; +(p6) nop.i 0x8beef // Medusa - put cpu to sleep til interrupt occurs (p6) br.cond.sptk slave;; mov r8=cr.ivr;; // Got one. Must read ivr to accept it @@ -361,6 +362,13 @@ st8 [r3]=r2 ;; +1: cmp.eq p6,p7=34,r28 /* PAL_VM_PAGE_SIZE */ +(p7) br.cond.sptk.few 1f + movl r8=0 /* status = 0 */ + movl r9=0x015557000 /* insertable page sizes */ + movl r10=0x115557000 /* purgeable page sizes */ + movl r11=0 + 1: cmp.eq p6,p7=19,r28 /* PAL_RSE_INFO */ (p7) br.cond.sptk.few 1f movl r8=0 /* status = 0 */ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/fakeprom/fw-emu.c linux-2.4.23-pre8/arch/ia64/sn/fakeprom/fw-emu.c --- linux-2.4.22/arch/ia64/sn/fakeprom/fw-emu.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/fakeprom/fw-emu.c 2003-10-22 22:49:15.000000000 +0000 @@ -47,6 +47,8 @@ #include #endif #include +#include +#include #include "fpmem.h" #define RSDP_NAME "RSDP" @@ -66,11 +68,12 @@ #define BOOT_SIG "BOOT" /* Boot table */ #define ACPI_SRAT_REVISION 1 #define ACPI_SLIT_REVISION 1 +#define ACPI_FADT_REVISION 3 +#define ACPI_DSDT_REVISION 1 #define OEMID "SGI" #ifdef SGI_SN2 #define PRODUCT "SN2" -#define PROXIMITY_DOMAIN(nasid) (((nasid)>>1) & 255) #endif #define MB (1024*1024UL) @@ -81,15 +84,6 @@ #define ABS(i) ((i) > 0 ? (i) : -(i)) #define ALIGN8(p) (((long)(p) +7) & ~7) -#define FPROM_BUG() do {while (1);} while (0) -#define MAX_SN_NODES 128 -#define MAX_LSAPICS 512 -#define MAX_CPUS 512 -#define MAX_CPUS_NODE 4 -#define CPUS_PER_NODE 4 -#define CPUS_PER_FSB 2 -#define CPUS_PER_FSB_MASK (CPUS_PER_FSB-1) - #define NUM_EFI_DESCS 2 #define RSDP_CHECKSUM_LENGTH 20 @@ -126,11 +120,10 @@ */ long base_nasid; long num_cpus; -long bsp_entry_pc=0; +long bsp_entry_pc; long num_nodes; -long app_entry_pc; -int bsp_lid; func_ptr_t ap_entry; +char nasid_present[MAX_NASID]; extern void pal_emulator(void); @@ -141,8 +134,11 @@ + sizeof(struct ia64_sal_systab) + sizeof(struct ia64_sal_desc_entry_point) + sizeof(struct ia64_sal_desc_ap_wakeup) + + sizeof(struct ia64_sal_desc_platform_feature) + sizeof(struct acpi20_table_rsdp) + sizeof(struct acpi_table_xsdt) + + sizeof(struct acpi_table_header) /* dummy DSDT */ + + sizeof(struct fadt_descriptor_rev2) + sizeof(struct acpi_table_slit) + MAX_SN_NODES*MAX_SN_NODES+8 + sizeof(struct acpi_table_madt) @@ -242,7 +238,11 @@ if (index == SAL_FREQ_BASE) { switch (in1) { case SAL_FREQ_BASE_PLATFORM: - r9 = 500000000; + /* slow down the clock on large systems to reduce the interrupt rate */ + if (num_cpus < 32) + r9 = 500000000UL; + else + r9 = 5000000000UL; break; case SAL_FREQ_BASE_INTERVAL_TIMER: @@ -446,7 +446,7 @@ } int -nasid_present(int nasid) +is_nasid_present(int nasid) { int cnode; for (cnode=0; cnodehdr.signature = EFI_SYSTEM_TABLE_SIGNATURE; @@ -598,7 +598,9 @@ acpi_xsdt->entry[0] = __fwtab_pa(base_nasid, acpi_madt); acpi_xsdt->entry[1] = __fwtab_pa(base_nasid, acpi_slit); acpi_xsdt->entry[2] = __fwtab_pa(base_nasid, acpi_srat); - acpi_checksum(&acpi_xsdt->header, sizeof(struct acpi_table_xsdt) + 16); + acpi_xsdt->entry[3] = __fwtab_pa(base_nasid, acpi_fadt); + acpi_xsdt->entry[4] = __fwtab_pa(base_nasid, acpi_dsdt); + acpi_checksum(&acpi_xsdt->header, sizeof(struct acpi_table_xsdt) + 32); /* Set up the APIC table */ acpi_table_initx(&acpi_madt->header, APIC_SIG, 4, 1, 1); @@ -614,7 +616,7 @@ lsapic20->flags.enabled = 1; #if defined(SGI_SN2) lsapic20->eid = nasid&0xffff; - lsapic20->id = (cpu<<4) | (nasid>>16); + lsapic20->id = (cpu<<4) | (nasid>>8); #endif lsapic20 = (struct acpi_table_lsapic*) ((long)lsapic20+sizeof(struct acpi_table_lsapic)); } @@ -624,23 +626,10 @@ /* Set up the SRAT table */ acpi_table_initx(&acpi_srat->header, SRAT_SIG, 4, ACPI_SRAT_REVISION, 1); ptr = acpi_srat+1; - for (cnode=0; cnodeheader.type = ACPI_SRAT_MEMORY_AFFINITY; - srat_memory_affinity->header.length = sizeof(struct acpi_table_memory_affinity); - srat_memory_affinity->proximity_domain = PROXIMITY_DOMAIN(nasid); - srat_memory_affinity->base_addr_lo = 0; - srat_memory_affinity->length_lo = 0; -#if defined(SGI_SN2) - srat_memory_affinity->base_addr_hi = (nasid<<6) | (3<<4); - srat_memory_affinity->length_hi = (MD_BANKSIZE*MD_BANKS_PER_NODE)>>32; -#endif - srat_memory_affinity->memory_type = ACPI_ADDRESS_RANGE_MEMORY; - srat_memory_affinity->flags.enabled = 1; - } + ptr = build_memory_srat(ptr); + + /* Build processor SRAT */ for (cnode=0; cnodeflags.enabled = 1; #if defined(SGI_SN2) srat_cpu_affinity->lsapic_eid = nasid&0xffff; - srat_cpu_affinity->apic_id = (cpu<<4) | (nasid>>16); + srat_cpu_affinity->apic_id = (cpu<<4) | (nasid>>8); #endif } } acpi_checksum(&acpi_srat->header, (char*)ptr - (char*)acpi_srat); + acpi_table_initx(acpi_dsdt, DSDT_SIG, 4, ACPI_DSDT_REVISION, 1); + acpi_checksum(acpi_dsdt, sizeof(*acpi_dsdt)); + + /* Set up the FADT table */ + acpi_table_initx((struct acpi_table_header *)&acpi_fadt->header, FADT_SIG, 4, ACPI_FADT_REVISION, 1); + /* + * We don't have legacy PC keyboard support etc. + */ + acpi_fadt->iapc_boot_arch = 0; + acpi_fadt->Xdsdt = (u64)__fwtab_pa(base_nasid, acpi_dsdt); + acpi_checksum((struct acpi_table_header *)&acpi_fadt->header, + sizeof(*acpi_fadt)); /* Set up the SLIT table */ acpi_table_initx(&acpi_slit->header, SLIT_SIG, 4, ACPI_SLIT_REVISION, 1); @@ -668,8 +669,10 @@ memset(cp, 255, acpi_slit->localities*acpi_slit->localities); for (i=0; i<=max_nasid; i++) + nasid_present[i] = is_nasid_present(i); + for (i=0; i<=max_nasid; i++) for (j=0; j<=max_nasid; j++) - if (nasid_present(i) && nasid_present(j)) + if (nasid_present[i] && nasid_present[j]) *(cp+PROXIMITY_DOMAIN(i)*acpi_slit->localities+PROXIMITY_DOMAIN(j)) = 10 + MIN(254, 5*ABS(i-j)); cp = acpi_slit->entry + acpi_slit->localities*acpi_slit->localities; @@ -681,7 +684,7 @@ sal_systab->size = sizeof(*sal_systab); sal_systab->sal_rev_minor = 1; sal_systab->sal_rev_major = 0; - sal_systab->entry_count = 3; + sal_systab->entry_count = 4; sal_systab->sal_b_rev_major = 0x1; /* set the SN SAL rev to */ sal_systab->sal_b_rev_minor = 0x0; /* 1.00 */ @@ -730,6 +733,10 @@ sal_apwake->mechanism = IA64_SAL_AP_EXTERNAL_INT; sal_apwake->vector = 18; + /* Setup the SAL feature descriptor */ + sal_feature->type = SAL_DESC_PLATFORM_FEATURE; + sal_feature->feature_mask = IA64_SAL_PLATFORM_FEATURE_ITC_DRIFT; + for (checksum=0, cp=(char*)sal_systab; cp < (char *)efi_memmap; ++cp) checksum += *cp; sal_systab->checksum = -checksum; @@ -754,22 +761,4 @@ bp->console_info.orig_x = 0; bp->console_info.orig_y = 24; bp->fpswa = 0; - - /* - * Now pick the BSP & store it LID value in - * a global variable. Note if BSP is greater than last cpu, - * pick the last cpu. - */ - for (cnode=0; cnode 0) - continue; - return; - } - } } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/fakeprom/main.c linux-2.4.23-pre8/arch/ia64/sn/fakeprom/main.c --- linux-2.4.22/arch/ia64/sn/fakeprom/main.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/fakeprom/main.c 2003-10-22 22:48:59.000000000 +0000 @@ -12,90 +12,60 @@ #include #include #include +#include +#include "fpmem.h" extern void klgraph_init(void); -void bedrock_init(int); -void synergy_init(int, int); -void sys_fw_init (const char *args, int arglen, int bsp); - -volatile int bootmaster=0; /* Used to pick bootmaster */ -volatile int nasidmaster[128]={0}; /* Used to pick node/synergy masters */ -int init_done=0; -extern int bsp_lid; - -#define get_bit(b,p) (((*p)>>(b))&1) +void sys_fw_init (const char *args, int arglen); int fmain(int lid, int bsp) { - int syn, nasid, cpu; + int nasid, cpu, mynasid, mycpu, bootmaster; + + /* + * * Pass the parameter base address to the build_efi_xxx routines. + */ +#if defined(SGI_SN2) + build_init(0x3000000000UL | ((long)base_nasid<<38)); +#endif /* * First lets figure out who we are. This is done from the * LID passed to us. */ - nasid = (lid>>16)&0xfff; - cpu = (lid>>28)&3; - syn = 0; - + mynasid = (lid>>16)&0xfff; + mycpu = (lid>>28)&3; + /* - * Now pick a nasid master to initialize Bedrock registers. + * Determine if THIS cpu is the bootmaster. The parameter + * is the logical cpu of the bootmaster. Cpus are numbered + * low-to-high nasid/lid. */ - if (test_and_set_bit(8, &nasidmaster[nasid]) == 0) { - bedrock_init(nasid); - test_and_set_bit(9, &nasidmaster[nasid]); - } else - while (get_bit(9, &nasidmaster[nasid]) == 0); + GetLogicalCpu(bsp, &nasid, &cpu); + bootmaster = (mynasid == nasid) && (mycpu == cpu); - /* - * Now pick a BSP & finish init. + * Initialize SAL & EFI tables. + * Note: non-bootmaster cpus will return to the slave loop + * in fpromasm.S. They spin there until they receive an + * external interrupt from the master cpu. */ - if (test_and_set_bit(0, &bootmaster) == 0) { - sys_fw_init(0, 0, bsp); - test_and_set_bit(1, &bootmaster); - } else - while (get_bit(1, &bootmaster) == 0); - - return (lid == bsp_lid); -} - - -void -bedrock_init(int nasid) -{ - nasid = nasid; /* to quiet gcc */ + if (bootmaster) { #if 0 - /* - * Undef if you need fprom to generate a 1 node klgraph - * information .. only works for 1 node for nasid 0. - */ - klgraph_init(); + /* + * Undef if you need fprom to generate a 1 node klgraph + * information .. only works for 1 node for nasid 0. + */ + klgraph_init(); #endif -} - - -void -synergy_init(int nasid, int syn) -{ - long *base; - long off; + sys_fw_init(0, 0); + } - /* - * Enable all FSB flashed interrupts. - * I'd really like defines for this...... - */ - base = (long*)0x80000e0000000000LL; /* base of synergy regs */ - for (off = 0x2a0; off < 0x2e0; off+=8) /* offset for VEC_MASK_{0-3}_A/B */ - *(base+off/8) = -1LL; - - /* - * Set the NASID in the FSB_CONFIG register. - */ - base = (long*)0x80000e0000000450LL; - *base = (long)((nasid<<16)|(syn<<9)); + return (bootmaster); } + /* Why isnt there a bcopy/memcpy in lib64.a */ void* diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/fakeprom/make_textsym linux-2.4.23-pre8/arch/ia64/sn/fakeprom/make_textsym --- linux-2.4.22/arch/ia64/sn/fakeprom/make_textsym 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/fakeprom/make_textsym 2003-10-22 22:48:57.000000000 +0000 @@ -0,0 +1,168 @@ +#!/bin/sh +# +# Build a textsym file for use in the Arium ITP probe. +# +# +# This file is subject to the terms and conditions of the GNU General Public +# License. See the file "COPYING" in the main directory of this archive +# for more details. +# +# Copyright (c) 2001-2003 Silicon Graphics, Inc. All rights reserved. +# + +help() { +cat < []] + If no input file is specified, it defaults to vmlinux. + If no output file name is specified, it defaults to "textsym". +END +exit 1 +} + +err () { + echo "ERROR - $*" >&2 + exit 1 +} + + +OPTS="H" +while getopts "$OPTS" c ; do + case $c in + H) help;; + \?) help;; + esac + +done +shift `expr $OPTIND - 1` + +if [ -f /usr/bin/ia64-linux-objdump ] ; then + OBJDUMP=${OBJDUMP:-/usr/bin/ia64-linux-objdump} +else + OBJDUMP=${OBJDUMP:-objdump} +fi + +LINUX=${1:-vmlinux} +TEXTSYM=${2:-${LINUX}.sym} +TMPSYM=${2:-${LINUX}.sym.tmp} +trap "/bin/rm -f $TMPSYM" 0 + +[ -f $VMLINUX ] || help + +$OBJDUMP -t $LINUX | egrep -v '__ks' | sort > $TMPSYM + +# pipe everything thru sort +echo "TEXTSYM V1.0" >$TEXTSYM +(cat < 0) { + n = n*16 + (index("0123456789abcdef", substr(s,1,1)) - 1) + s = substr(s,2) + } + printf "GLOBAL | %s | DATA | %s | %d\n", $1, $NF, n + } + } + if($NF == "_end") + exit + +} +' $TMPSYM ) | egrep -v " __device| __vendor" | awk ' +/GLOBAL/ { + print $0 + /* 38 bits of sn2 physical addrs, need addr space bits */ + if (substr($0,19,1) == "4") + print substr($0,1,9) "3004" substr($0,20,16) "Phy_" substr($0,36) + else + print substr($0,1,9) "3005" substr($0,20,16) "Phy_" substr($0,36) + +} ' | sort -k3 >>$TEXTSYM + +N=`wc -l $TEXTSYM|awk '{print $1}'` +echo "Generated TEXTSYM file" >&2 +echo " $LINUX --> $TEXTSYM" >&2 +echo " Found $N symbols" >&2 diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/Makefile linux-2.4.23-pre8/arch/ia64/sn/io/Makefile --- linux-2.4.22/arch/ia64/sn/io/Makefile 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/Makefile 2003-10-22 22:48:14.000000000 +0000 @@ -13,8 +13,9 @@ O_TARGET := sgiio.o -obj-y := sgi_if.o xswitch.o sgi_io_sim.o \ - cdl.o io.o +export-objs := snia_if.o + +obj-y := sgi_if.o xswitch.o cdl.o io.o snia_if.o obj-y += sn2/snio.o machvec/snio.o \ drivers/snio.o platform_init/snio.o diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/drivers/Makefile linux-2.4.23-pre8/arch/ia64/sn/io/drivers/Makefile --- linux-2.4.22/arch/ia64/sn/io/drivers/Makefile 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/drivers/Makefile 2003-10-22 22:48:53.000000000 +0000 @@ -11,7 +11,7 @@ O_TARGET := snio.o -obj-y += hubdev.o ioconfig_bus.o ifconfig_net.o +obj-y += ioconfig_bus.o ifconfig_net.o obj-$(CONFIG_PCIBA) += pciba.o diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/drivers/ifconfig_net.c linux-2.4.23-pre8/arch/ia64/sn/io/drivers/ifconfig_net.c --- linux-2.4.22/arch/ia64/sn/io/drivers/ifconfig_net.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/drivers/ifconfig_net.c 2003-10-22 22:47:29.000000000 +0000 @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -37,8 +38,11 @@ /* * Some Global definitions. */ -static devfs_handle_t ifconfig_net_handle; +static vertex_hdl_t ifconfig_net_handle; static unsigned long ifconfig_net_debug; +static struct ifname_MAC *new_devices; +static struct ifname_num *ifname_num; + /* * ifconfig_net_open - Opens the special device node "/devhw/.ifconfig_net". @@ -189,8 +193,7 @@ char temp[64]; #endif struct ifname_MAC *ifname_MAC; - struct ifname_MAC *new_devices, *temp_new_devices; - struct ifname_num *ifname_num; + struct ifname_MAC *temp_new_devices; unsigned long size; @@ -204,14 +207,24 @@ */ ifname_num = (struct ifname_num *) kmalloc(sizeof(struct ifname_num), GFP_KERNEL); - copy_from_user( ifname_num, (char *) arg, sizeof(struct ifname_num)); + if (copy_from_user( ifname_num, (char *) arg, sizeof(struct ifname_num))) + return -EFAULT; size = ifname_num->size; kfree(ifname_num); ifname_num = (struct ifname_num *) kmalloc(size, GFP_KERNEL); + if (ifname_num <= 0) + return -ENOMEM; ifname_MAC = (struct ifname_MAC *) ((char *)ifname_num + (sizeof(struct ifname_num)) ); - copy_from_user( ifname_num, (char *) arg, size); + if (copy_from_user( ifname_num, (char *) arg, size)){ + kfree(ifname_num); + return -EFAULT; + } new_devices = kmalloc(size - sizeof(struct ifname_num), GFP_KERNEL); + if (new_devices <= 0){ + kfree(ifname_num); + return -ENOMEM; + } temp_new_devices = new_devices; memset(new_devices, 0, size - sizeof(struct ifname_num)); @@ -257,10 +270,10 @@ /* * Copy back to the User Buffer area any new devices encountered. */ - copy_to_user((char *)arg + (sizeof(struct ifname_num)), new_devices, - size - sizeof(struct ifname_num)); + kfree(new_devices); + return copy_to_user((char *)arg + (sizeof(struct ifname_num)), new_devices, + size - sizeof(struct ifname_num))?-EFAULT:0; - return(0); } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/drivers/ioconfig_bus.c linux-2.4.23-pre8/arch/ia64/sn/io/drivers/ioconfig_bus.c --- linux-2.4.22/arch/ia64/sn/io/drivers/ioconfig_bus.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/drivers/ioconfig_bus.c 2003-10-22 22:48:30.000000000 +0000 @@ -17,6 +17,8 @@ #include #include +#include + #include #include #include @@ -36,6 +38,7 @@ */ static vertex_hdl_t ioconfig_bus_handle; static unsigned long ioconfig_bus_debug; +static struct ioconfig_parm parm; #ifdef IOCONFIG_BUS_DEBUG #define DBG(x...) printk(x) @@ -162,8 +165,13 @@ struct ascii_moduleid *moduleid; line = kmalloc(256, GFP_KERNEL); + if (line <= 0) + BUG(); /* Do not want to continue system boot .. */ memset(line, 0,256); name = kmalloc(125, GFP_KERNEL); + if (name <= 0){ + BUG(); /* Do not want to continue system boot .. */ + } memset(name, 0, 125); moduleid = table; current = file_contents; @@ -252,6 +260,9 @@ ret_stuff.v0, (void *)ioconfig_file, (int)ioconfig_file_size); ioconfig_bus_table = kmalloc( 512, GFP_KERNEL ); + if (ioconfig_bus_table <= 0) + BUG(); /* Seriously, we should not be out of memory at init */ + memset(ioconfig_bus_table, 0, 512); /* @@ -264,7 +275,6 @@ DBG("ioconfig_bus_init: Kernel Options given.\n"); (void) build_moduleid_table((char *)ioconfig_kernopts, ioconfig_bus_table); (void) dump_ioconfig_table(); - return; } if (ioconfig_activated) { @@ -305,16 +315,20 @@ unsigned int cmd, unsigned long arg) { - struct ioconfig_parm parm; - + int length; /* * Copy in the parameters. */ - copy_from_user(&parm, (char *)arg, sizeof(struct ioconfig_parm)); + length = copy_from_user(&parm, (char *)arg, sizeof(struct ioconfig_parm)); + if (length <= 0) + return -EFAULT; parm.number = free_entry - new_entry; parm.ioconfig_activated = ioconfig_activated; - copy_to_user((char *)arg, &parm, sizeof(struct ioconfig_parm)); - copy_to_user((char *)parm.buffer, &ioconfig_bus_table[new_entry], sizeof(struct ascii_moduleid) * (free_entry - new_entry)); + if (copy_to_user((char *)arg, &parm, sizeof(struct ioconfig_parm))) + return -EFAULT; + + if (copy_to_user((char *)parm.buffer, &ioconfig_bus_table[new_entry], sizeof(struct ascii_moduleid) * (free_entry - new_entry))) + return -EFAULT; return 0; } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/drivers/pciba.c linux-2.4.23-pre8/arch/ia64/sn/io/drivers/pciba.c --- linux-2.4.22/arch/ia64/sn/io/drivers/pciba.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/drivers/pciba.c 2003-10-22 22:47:37.000000000 +0000 @@ -341,8 +341,8 @@ TRACE(); node = kmalloc(sizeof(struct node_data), GFP_KERNEL); - if (node == NULL) - return NULL; + if (node <= 0) + return node; list_add(&node->global_node_list, &global_node_list); return node; } @@ -455,7 +455,7 @@ if present */ if (pci_resource_len(dev, PCI_ROM_RESOURCE) != 0) { nd = new_node(); - if (nd == NULL) + if (nd <= 0) return failure; node_devfs_handle = hwgraph_register(device_dir_handle, "rom", 0, DEVFS_FL_NONE, 0, 0, @@ -478,7 +478,7 @@ and free DMA buffers, as well as memory map those buffers. */ nd = new_node(); - if (nd == NULL) + if (nd <= 0) return failure; node_devfs_handle = hwgraph_register(device_dir_handle, "dma", 0, DEVFS_FL_NONE, @@ -763,7 +763,7 @@ dma_alloc = (struct dma_allocation *) kmalloc(sizeof(struct dma_allocation), GFP_KERNEL); - if (dma_alloc == NULL) + if (dma_alloc <= 0) return -ENOMEM; dma_alloc->size = (size_t)argv; @@ -899,7 +899,7 @@ /* the __pa macro is intended for region 7 on IA64, so it doesn't work for region 6 */ /* pci_pa = __pa(pci_va); */ - /* should be replaced by __tpa or equivalent (preferably a + /* should be replaced by ia64_tpa or equivalent (preferably a generic equivalent) */ pci_pa = pci_va & ~0xe000000000000000ul; DPRINTF("PCI base at physical address %lx\n", pci_pa); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/hwgdfs/hcl.c linux-2.4.23-pre8/arch/ia64/sn/io/hwgdfs/hcl.c --- linux-2.4.22/arch/ia64/sn/io/hwgdfs/hcl.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/hwgdfs/hcl.c 2003-10-22 22:48:15.000000000 +0000 @@ -233,6 +233,15 @@ __setup("hcl=", hcl_setup); +int +hwgraph_generate_path( + vertex_hdl_t de, + char *path, + int buflen) +{ + return (devfs_generate_path(de, path, buflen)); +} + /* * Set device specific "fast information". * diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/hwgdfs/hcl_util.c linux-2.4.23-pre8/arch/ia64/sn/io/hwgdfs/hcl_util.c --- linux-2.4.22/arch/ia64/sn/io/hwgdfs/hcl_util.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/hwgdfs/hcl_util.c 2003-10-22 22:49:04.000000000 +0000 @@ -1,4 +1,4 @@ -/* $Id: hcl_util.c,v 1.3 2003/04/24 13:59:39 pfg Exp $ +/* $Id: hcl_util.c,v 1.4 2003/07/31 12:24:27 edwardsg Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/hwgfs/hcl.c linux-2.4.23-pre8/arch/ia64/sn/io/hwgfs/hcl.c --- linux-2.4.22/arch/ia64/sn/io/hwgfs/hcl.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/hwgfs/hcl.c 2003-10-22 22:49:21.000000000 +0000 @@ -28,16 +28,12 @@ #include #include -#define HCL_NAME "SGI-HWGRAPH COMPATIBILITY DRIVER" -#define HCL_TEMP_NAME "HCL_TEMP_NAME_USED_FOR_HWGRAPH_VERTEX_CREATE" -#define HCL_TEMP_NAME_LEN 44 -#define HCL_VERSION "1.0" - #define vertex_hdl_t hwgfs_handle_t + vertex_hdl_t hwgraph_root; vertex_hdl_t linux_busnum; - extern void pci_bus_cvlink_init(void); +unsigned long hwgraph_debug_mask = 0; /* * Debug flag definition. @@ -157,7 +153,7 @@ */ rv = hwgraph_path_add(NULL, EDGE_LBL_HW, &hwgraph_root); if (rv) - printk ("WARNING: init_hcl: Failed to create hwgraph_root. Error = %d.\n", rv); + panic("init_hcl: Failed to create hwgraph_root.\n"); /* * Create the hcl driver to support inventory entry manipulations. @@ -235,6 +231,15 @@ __setup("hcl=", hcl_setup); +int +hwgraph_generate_path( + vertex_hdl_t de, + char *path, + int buflen) +{ + return (hwgfs_generate_path(de, path, buflen)); +} + /* * Set device specific "fast information". * @@ -492,39 +497,6 @@ return(0); } -#if 0 -/* - * hwgraph_edge_add - This routines has changed from the original conext. - * All it does now is to create a symbolic link from "from" to "to". - */ -/* ARGSUSED */ -int -hwgraph_edge_add(vertex_hdl_t from, vertex_hdl_t to, char *name) -{ - - char *path, *link; - vertex_hdl_t handle = NULL; - int rv, i; - - handle = hwgfs_find_handle(from, name, 0, 0, 0, 1); - if (handle) { - return(0); - } - - path = kmalloc(1024, GFP_KERNEL); - memset(path, 0x0, 1024); - link = kmalloc(1024, GFP_KERNEL); - memset(path, 0x0, 1024); - i = hwgfs_generate_path (to, link, 1024); - rv = hwgfs_mk_symlink (from, (const char *)name, - DEVFS_FL_DEFAULT, link, - &handle, NULL); - return(0); - - -} -#endif - int hwgraph_edge_add(vertex_hdl_t from, vertex_hdl_t to, char *name) { @@ -916,6 +888,43 @@ return(GRAPH_ILLEGAL_REQUEST); } +void +hwgraph_debug(char *file, char * function, int line, vertex_hdl_t vhdl1, vertex_hdl_t vhdl2, char *format, ...) +{ + + int pos; + char *hwpath; + va_list ap; + + if ( !hwgraph_debug_mask ) + return; + + hwpath = kmalloc(MAXDEVNAME, GFP_KERNEL); + if (!hwpath) + BUG(); + + printk("HWGRAPH_DEBUG %s %s %d : ", file, function, line); + + if (vhdl1){ + memset(hwpath, 0, MAXDEVNAME); + pos = hwgfs_generate_path(vhdl1, hwpath, MAXDEVNAME); + printk("vhdl1 = %s : ", &hwpath[pos]); + } + + if (vhdl2){ + memset(hwpath, 0, MAXDEVNAME); + pos = hwgfs_generate_path(vhdl2, hwpath, MAXDEVNAME); + printk("vhdl2 = %s :", &hwpath[pos]); + } + + memset(hwpath, 0, MAXDEVNAME); + va_start(ap, format); + vsnprintf(hwpath, 500, format, ap); + va_end(ap); + hwpath[MAXDEVNAME -1] = (char)0; /* Just in case. */ + printk(" %s", hwpath); + kfree(hwpath); +} EXPORT_SYMBOL(hwgraph_mk_dir); EXPORT_SYMBOL(hwgraph_path_add); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/hwgfs/hcl_util.c linux-2.4.23-pre8/arch/ia64/sn/io/hwgfs/hcl_util.c --- linux-2.4.22/arch/ia64/sn/io/hwgfs/hcl_util.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/hwgfs/hcl_util.c 2003-10-22 22:49:45.000000000 +0000 @@ -22,7 +22,10 @@ #include static vertex_hdl_t hwgraph_all_cnodes = GRAPH_VERTEX_NONE; +static vertex_hdl_t hwgraph_all_cpuids = GRAPH_VERTEX_NONE; extern vertex_hdl_t hwgraph_root; +extern int maxcpus; + /* @@ -96,9 +99,6 @@ } } -static vertex_hdl_t hwgraph_all_cpuids = GRAPH_VERTEX_NONE; -extern int maxcpus; - void mark_cpuvertex_as_cpu(vertex_hdl_t vhdl, cpuid_t cpuid) { @@ -161,6 +161,7 @@ (void)hwgraph_edge_add( hwgraph_all_cnodes, vhdl, cnodeid_buffer); + HWGRAPH_DEBUG((__FILE__, __FUNCTION__, __LINE__, hwgraph_all_cnodes, NULL, "Creating path vhdl1\n")); } } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/hwgfs/interface.c linux-2.4.23-pre8/arch/ia64/sn/io/hwgfs/interface.c --- linux-2.4.22/arch/ia64/sn/io/hwgfs/interface.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/hwgfs/interface.c 2003-10-22 22:49:14.000000000 +0000 @@ -38,7 +38,7 @@ memcpy(buf, *path, len); buf[len] = '\0'; - error = link_path_walk(buf, nd); + error = path_walk(buf, nd); if (unlikely(error)) return error; @@ -84,7 +84,7 @@ if (unlikely(error)) return error; - error = link_path_walk(name, &nd); + error = path_walk(name, &nd); if (unlikely(error)) return error; @@ -275,7 +275,7 @@ nd.dentry = dget(base ? base : hwgfs_vfsmount->mnt_sb->s_root); nd.flags = LOOKUP_POSITIVE | (traverse_symlinks ? LOOKUP_FOLLOW : 0); - error = link_path_walk(name, &nd); + error = path_walk(name, &nd); if (likely(!error)) { dentry = nd.dentry; path_release(&nd); /* stale data from here! */ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/io.c linux-2.4.23-pre8/arch/ia64/sn/io/io.c --- linux-2.4.22/arch/ia64/sn/io/io.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/io.c 2003-10-22 22:48:41.000000000 +0000 @@ -86,7 +86,7 @@ } hub_set_piomode(nasid, HUB_PIO_CONVEYOR); - mutex_spinlock_init(&hubinfo->h_bwlock); + spin_lock_init(&hubinfo->h_bwlock); /* * If this lock can be acquired from interrupts or bh's, add SV_INTS or SV_BHS, * respectively, to the flags here. @@ -123,7 +123,6 @@ int bigwin, free_bw_index; nasid_t nasid; volatile hubreg_t junk; - unsigned long s; caddr_t kvaddr; #ifdef PIOMAP_UNC_ACC_SPACE uint64_t addr; @@ -171,7 +170,7 @@ */ tryagain: free_bw_index = -1; - s = mutex_spinlock(&hubinfo->h_bwlock); + spin_lock(&hubinfo->h_bwlock); for (bigwin=0; bigwin < HUB_NUM_BIG_WINDOW; bigwin++) { bw_piomap = hubinfo_bwin_piomap_get(hubinfo, bigwin); @@ -191,7 +190,7 @@ if ( xtalk_addr == bw_piomap->hpio_xtalk_info.xp_xtalk_addr && widget == bw_piomap->hpio_xtalk_info.xp_target) { bw_piomap->hpio_holdcnt++; - mutex_spinunlock(&hubinfo->h_bwlock, s); + spin_unlock(&hubinfo->h_bwlock); return(bw_piomap); } } @@ -265,7 +264,7 @@ bw_piomap->hpio_flags |= HUB_PIOMAP_IS_VALID; done: - mutex_spinunlock(&hubinfo->h_bwlock, s); + spin_unlock(&hubinfo->h_bwlock); return(bw_piomap); } @@ -285,7 +284,6 @@ vertex_hdl_t hubv; hubinfo_t hubinfo; nasid_t nasid; - unsigned long s; /* * Small windows are permanently mapped to corresponding widgets, @@ -301,7 +299,7 @@ hubinfo_get(hubv, &hubinfo); nasid = hubinfo->h_nasid; - s = mutex_spinlock(&hubinfo->h_bwlock); + spin_lock(&hubinfo->h_bwlock); /* * If this is the last hold on this mapping, free it. @@ -319,7 +317,7 @@ (void)sv_signal(&hubinfo->h_bwwait); } - mutex_spinunlock(&hubinfo->h_bwlock, s); + spin_unlock(&hubinfo->h_bwlock); } /* @@ -440,7 +438,7 @@ hub_dmamap_free(hub_dmamap_t hub_dmamap) { hub_dmamap->hdma_flags &= ~HUB_DMAMAP_IS_VALID; - kern_free(hub_dmamap); + kfree(hub_dmamap); } /* @@ -461,12 +459,9 @@ if (dmamap->hdma_flags & HUB_DMAMAP_USED) { /* If the map is FIXED, re-use is OK. */ if (!(dmamap->hdma_flags & HUB_DMAMAP_IS_FIXED)) { + char name[MAXDEVNAME]; vhdl = dmamap->hdma_xtalk_info.xd_dev; -#if defined(SUPPORT_PRINTING_V_FORMAT) - printk(KERN_WARNING "%v: hub_dmamap_addr re-uses dmamap.\n",vhdl); -#else - printk(KERN_WARNING "%p: hub_dmamap_addr re-uses dmamap.\n", (void *)vhdl); -#endif + printk(KERN_WARNING "%s: hub_dmamap_addr re-uses dmamap.\n", vertex_to_name(vhdl, name, MAXDEVNAME)); } } else { dmamap->hdma_flags |= HUB_DMAMAP_USED; @@ -494,12 +489,9 @@ if (hub_dmamap->hdma_flags & HUB_DMAMAP_USED) { /* If the map is FIXED, re-use is OK. */ if (!(hub_dmamap->hdma_flags & HUB_DMAMAP_IS_FIXED)) { + char name[MAXDEVNAME]; vhdl = hub_dmamap->hdma_xtalk_info.xd_dev; -#if defined(SUPPORT_PRINTING_V_FORMAT) - printk(KERN_WARNING "%v: hub_dmamap_list re-uses dmamap\n",vhdl); -#else - printk(KERN_WARNING "%p: hub_dmamap_list re-uses dmamap\n", (void *)vhdl); -#endif + printk(KERN_WARNING "%s: hub_dmamap_list re-uses dmamap\n", vertex_to_name(vhdl, name, MAXDEVNAME)); } } else { hub_dmamap->hdma_flags |= HUB_DMAMAP_USED; @@ -523,12 +515,9 @@ } else { /* If the map is FIXED, re-done is OK. */ if (!(hub_dmamap->hdma_flags & HUB_DMAMAP_IS_FIXED)) { + char name[MAXDEVNAME]; vhdl = hub_dmamap->hdma_xtalk_info.xd_dev; -#if defined(SUPPORT_PRINTING_V_FORMAT) - printk(KERN_WARNING "%v: hub_dmamap_done already done with dmamap\n",vhdl); -#else - printk(KERN_WARNING "%p: hub_dmamap_done already done with dmamap\n", (void *)vhdl); -#endif + printk(KERN_WARNING "%s: hub_dmamap_done already done with dmamap\n", vertex_to_name(vhdl, name, MAXDEVNAME)); } } } @@ -589,6 +578,18 @@ } +int +hub_dma_enabled(vertex_hdl_t xconn_vhdl) +{ + return(0); +} + +int +hub_error_devenable(vertex_hdl_t xconn_vhdl, int devnum, int error_code) +{ + return(0); +} + /* CONFIGURATION MANAGEMENT */ @@ -807,3 +808,80 @@ (xtalk_provider_shutdown_f *) hub_provider_shutdown, }; +/* + * per_ice_init + * + * This code is executed once for each Ice chip. + */ +void +per_ice_init(cnodeid_t cnode) +{ + + /* Initialize error interrupts for this ice. */ + printk("per_ice_init: We need to init ice here ....!\n"); + /* ice_error_init(cnode); */ + +} +/* + * per_hub_init + * + * This code is executed once for each Hub chip. + */ +void +per_hub_init(cnodeid_t cnode) +{ + nasid_t nasid; + nodepda_t *npdap; + ii_icmr_u_t ii_icmr; + ii_ibcr_u_t ii_ibcr; + ii_ilcsr_u_t ii_ilcsr; + + nasid = COMPACT_TO_NASID_NODEID(cnode); + + ASSERT(nasid != INVALID_NASID); + ASSERT(NASID_TO_COMPACT_NODEID(nasid) == cnode); + + npdap = NODEPDA(cnode); + + /* Disable the request and reply errors. */ + REMOTE_HUB_S(nasid, IIO_IWEIM, 0xC000); + + /* + * Set the total number of CRBs that can be used. + */ + ii_icmr.ii_icmr_regval= 0x0; + ii_icmr.ii_icmr_fld_s.i_c_cnt = 0xf; + if (enable_shub_wars_1_1() ) { + // Set bit one of ICMR to prevent II from sending interrupt for II bug. + ii_icmr.ii_icmr_regval |= 0x1; + } + REMOTE_HUB_S(nasid, IIO_ICMR, ii_icmr.ii_icmr_regval); + + /* + * Set the number of CRBs that both of the BTEs combined + * can use minus 1. + */ + ii_ibcr.ii_ibcr_regval= 0x0; + ii_ilcsr.ii_ilcsr_regval = REMOTE_HUB_L(nasid, IIO_LLP_CSR); + if (ii_ilcsr.ii_ilcsr_fld_s.i_llp_stat & LNK_STAT_WORKING) { + ii_ibcr.ii_ibcr_fld_s.i_count = 0x8; + } else { + /* + * if the LLP is down, there is no attached I/O, so + * give BTE all the CRBs. + */ + ii_ibcr.ii_ibcr_fld_s.i_count = 0x14; + } + REMOTE_HUB_S(nasid, IIO_IBCR, ii_ibcr.ii_ibcr_regval); + + /* + * Set CRB timeout to be 10ms. + */ + REMOTE_HUB_S(nasid, IIO_ICTP, 0xffffff ); + REMOTE_HUB_S(nasid, IIO_ICTO, 0xff); + + /* Initialize error interrupts for this hub. */ + hub_error_init(cnode); +} + + diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/machvec/iomv.c linux-2.4.23-pre8/arch/ia64/sn/io/machvec/iomv.c --- linux-2.4.22/arch/ia64/sn/io/machvec/iomv.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/machvec/iomv.c 2003-10-22 22:48:54.000000000 +0000 @@ -32,7 +32,6 @@ return( (void *) (port | __IA64_UNCACHED_OFFSET)); } else { /* but the simulator uses them... */ - unsigned long io_base; unsigned long addr; /* @@ -40,13 +39,9 @@ * for accessing registers in bedrock local block * (so we don't do port&0xfff) */ - if ((port >= 0x1f0 && port <= 0x1f7) || - port == 0x3f6 || port == 0x3f7) { - io_base = (0xc000000fcc000000 | ((unsigned long)get_nasid() << 38)); - addr = io_base | ((port >> 2) << 12) | (port & 0xfff); - } else { - addr = __ia64_get_io_port_base() | ((port >> 2) << 2); - } + addr = 0xc0000087cc000000 | ((port >> 2) << 12); + if ((port >= 0x1f0 && port <= 0x1f7) || port == 0x3f6 || port == 0x3f7) + addr |= port; return(void *) addr; } } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/machvec/pci.c linux-2.4.23-pre8/arch/ia64/sn/io/machvec/pci.c --- linux-2.4.22/arch/ia64/sn/io/machvec/pci.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/machvec/pci.c 2003-10-22 22:48:17.000000000 +0000 @@ -130,13 +130,6 @@ if ( dev == (struct pci_dev *)0 ) { return PCIBIOS_DEVICE_NOT_FOUND; } - /* - * if it's an IOC3 then we bail out, we special - * case them with pci_fixup_ioc3 - */ - if (dev->vendor == PCI_VENDOR_ID_SGI && - dev->device == PCI_DEVICE_ID_SGI_IOC3 ) - return PCIBIOS_SUCCESSFUL; device_vertex = devfn_to_vertex(dev->bus->number, dev->devfn); if (!device_vertex) { @@ -163,13 +156,6 @@ if ( dev == (struct pci_dev *)0 ) { return PCIBIOS_DEVICE_NOT_FOUND; } - /* - * if it's an IOC3 then we bail out, we special - * case them with pci_fixup_ioc3 - */ - if (dev->vendor == PCI_VENDOR_ID_SGI && - dev->device == PCI_DEVICE_ID_SGI_IOC3) - return PCIBIOS_SUCCESSFUL; device_vertex = devfn_to_vertex(dev->bus->number, dev->devfn); if (!device_vertex) { @@ -196,13 +182,6 @@ if ( dev == (struct pci_dev *)0 ) { return PCIBIOS_DEVICE_NOT_FOUND; } - /* - * if it's an IOC3 then we bail out, we special - * case them with pci_fixup_ioc3 - */ - if (dev->vendor == PCI_VENDOR_ID_SGI && - dev->device == PCI_DEVICE_ID_SGI_IOC3) - return PCIBIOS_SUCCESSFUL; device_vertex = devfn_to_vertex(dev->bus->number, dev->devfn); if (!device_vertex) { @@ -241,49 +220,8 @@ /* sn_io_infrastructure_init(); */ pci_root_ops = &snia64_pci_ops; } - -void -pci_fixup_ioc3(struct pci_dev *d) -{ - int i; - unsigned int size; - - /* IOC3 only decodes 0x20 bytes of the config space, reading - * beyond that is relatively benign but writing beyond that - * (especially the base address registers) will shut down the - * pci bus...so avoid doing so. - * NOTE: this means we can't program the intr_pin into the device, - * currently we hack this with special code in - * sgi_pci_intr_support() - */ - DBG("pci_fixup_ioc3: Fixing base addresses for ioc3 device %s\n", d->slot_name); - - /* I happen to know from the spec that the ioc3 needs only 0xfffff - * The standard pci trick of writing ~0 to the baddr and seeing - * what comes back doesn't work with the ioc3 - */ - size = 0xfffff; - d->resource[0].end = (unsigned long) d->resource[0].start + (unsigned long) size; - - /* - * Zero out the resource structure .. because we did not go through - * the normal PCI Infrastructure Init, garbbage are left in these - * fileds. - */ - for (i = 1; i <= PCI_ROM_RESOURCE; i++) { - d->resource[i].start = 0UL; - d->resource[i].end = 0UL; - d->resource[i].flags = 0UL; - } - - d->subsystem_vendor = 0; - d->subsystem_device = 0; - -} - #else void sn_pci_find_bios(void) {} -void pci_fixup_ioc3(struct pci_dev *d) {} struct list_head pci_root_buses; struct list_head pci_root_buses; struct list_head pci_devices; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/machvec/pci_bus_cvlink.c linux-2.4.23-pre8/arch/ia64/sn/io/machvec/pci_bus_cvlink.c --- linux-2.4.22/arch/ia64/sn/io/machvec/pci_bus_cvlink.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/machvec/pci_bus_cvlink.c 2003-10-22 22:49:16.000000000 +0000 @@ -47,14 +47,13 @@ static int done_probing; extern irqpda_t *irqpdaindr; -static int pci_bus_map_create(vertex_hdl_t xtalk, char * io_moduleid); +static int pci_bus_map_create(vertex_hdl_t xtalk, int brick_type, char * io_moduleid); vertex_hdl_t devfn_to_vertex(unsigned char busnum, unsigned int devfn); extern void register_pcibr_intr(int irq, pcibr_intr_t intr); void sn_dma_flush_init(unsigned long start, unsigned long end, int idx, int pin, int slot); - /* * For the given device, initialize whether it is a PIC device. */ @@ -148,8 +147,7 @@ */ if (func == 0) { sprintf(name, "%d", slot); - if (hwgraph_traverse(pci_bus, name, &device_vertex) == - GRAPH_SUCCESS) { + if (hwgraph_traverse(pci_bus, name, &device_vertex) == GRAPH_SUCCESS) { if (device_vertex) { return(device_vertex); } @@ -170,54 +168,6 @@ return(device_vertex); } -/* - * For the given device, initialize the addresses for both the Device(x) Flush - * Write Buffer register and the Xbow Flush Register for the port the PCI bus - * is connected. - */ -static void -set_flush_addresses(struct pci_dev *device_dev, - struct sn_device_sysdata *device_sysdata) -{ - pciio_info_t pciio_info = pciio_info_get(device_sysdata->vhdl); - pciio_slot_t pciio_slot = pciio_info_slot_get(pciio_info); - pcibr_soft_t pcibr_soft = (pcibr_soft_t) pciio_info_mfast_get(pciio_info); - bridge_t *bridge = pcibr_soft->bs_base; - nasid_t nasid; - - /* - * Get the nasid from the bridge. - */ - nasid = NASID_GET(device_sysdata->dma_buf_sync); - if (IS_PIC_DEVICE(device_dev)) { - device_sysdata->dma_buf_sync = (volatile unsigned int *) - &bridge->b_wr_req_buf[pciio_slot].reg; - device_sysdata->xbow_buf_sync = (volatile unsigned int *) - XBOW_PRIO_LINKREGS_PTR(NODE_SWIN_BASE(nasid, 0), - pcibr_soft->bs_xid); - } else { - /* - * Accessing Xbridge and Xbow register when SHUB swapoper is on!. - */ - device_sysdata->dma_buf_sync = (volatile unsigned int *) - ((uint64_t)&(bridge->b_wr_req_buf[pciio_slot].reg)^4); - device_sysdata->xbow_buf_sync = (volatile unsigned int *) - ((uint64_t)(XBOW_PRIO_LINKREGS_PTR( - NODE_SWIN_BASE(nasid, 0), pcibr_soft->bs_xid)) ^ 4); - } - -#ifdef DEBUG - printk("set_flush_addresses: dma_buf_sync %p xbow_buf_sync %p\n", - device_sysdata->dma_buf_sync, device_sysdata->xbow_buf_sync); - -printk("set_flush_addresses: dma_buf_sync\n"); - while((volatile unsigned int )*device_sysdata->dma_buf_sync); -printk("set_flush_addresses: xbow_buf_sync\n"); - while((volatile unsigned int )*device_sysdata->xbow_buf_sync); -#endif - -} - struct sn_flush_nasid_entry flush_nasid_list[MAX_NASIDS]; // Initialize the data structures for flushing write buffers after a PIO read. @@ -247,6 +197,9 @@ if (flush_nasid_list[nasid].widget_p == NULL) { flush_nasid_list[nasid].widget_p = (struct sn_flush_device_list **)kmalloc((HUB_WIDGET_ID_MAX+1) * sizeof(struct sn_flush_device_list *), GFP_KERNEL); + if (flush_nasid_list[nasid].widget_p <= 0) + BUG(); /* Cannot afford to run out of memory. */ + memset(flush_nasid_list[nasid].widget_p, 0, (HUB_WIDGET_ID_MAX+1) * sizeof(struct sn_flush_device_list *)); } if (bwin > 0) { @@ -326,6 +279,9 @@ if (flush_nasid_list[nasid].widget_p[wid_num] == NULL) { flush_nasid_list[nasid].widget_p[wid_num] = (struct sn_flush_device_list *)kmalloc( DEV_PER_WIDGET * sizeof (struct sn_flush_device_list), GFP_KERNEL); + if (flush_nasid_list[nasid].widget_p[wid_num] <= 0) + BUG(); /* Cannot afford to run out of memory. */ + memset(flush_nasid_list[nasid].widget_p[wid_num], 0, DEV_PER_WIDGET * sizeof (struct sn_flush_device_list)); p = &flush_nasid_list[nasid].widget_p[wid_num][0]; @@ -430,13 +386,6 @@ } } - if (vendor == PCI_VENDOR_ID_SGI) { - if (device == PCI_DEVICE_ID_SGI_IOC3) { - SET_PCIA64(dev); - return; - } - } - } /* @@ -455,7 +404,7 @@ struct sn_widget_sysdata *widget_sysdata; struct sn_device_sysdata *device_sysdata; pciio_intr_t intr_handle; - int cpuid, bit; + int cpuid; vertex_hdl_t device_vertex; pciio_intr_line_t lines; extern void sn_pci_find_bios(void); @@ -488,6 +437,9 @@ pci_bus = pci_bus_b(ln); widget_sysdata = kmalloc(sizeof(struct sn_widget_sysdata), GFP_KERNEL); + if (widget_sysdata <= 0) + BUG(); /* Cannot afford to run out of memory */ + widget_sysdata->vhdl = pci_bus_to_vertex(pci_bus->number); pci_bus->sysdata = (void *)widget_sysdata; } @@ -516,24 +468,15 @@ unsigned long size; extern int bit_pos_to_irq(int); - if (device_dev->vendor == PCI_VENDOR_ID_SGI && - device_dev->device == PCI_DEVICE_ID_SGI_IOC3) { - extern void pci_fixup_ioc3(struct pci_dev *d); - pci_fixup_ioc3(device_dev); - } - /* Set the device vertex */ device_sysdata = kmalloc(sizeof(struct sn_device_sysdata), GFP_KERNEL); + if (device_sysdata <= 0) + BUG(); /* Cannot afford to run out of memory */ + device_sysdata->vhdl = devfn_to_vertex(device_dev->bus->number, device_dev->devfn); device_sysdata->isa64 = 0; - /* - * Set the xbridge Device(X) Write Buffer Flush and Xbow Flush - * register addresses. - */ - (void) set_flush_addresses(device_dev, device_sysdata); - device_dev->sysdata = (void *) device_sysdata; set_sn_pci64(device_dev); set_isPIC(device_sysdata); @@ -552,7 +495,7 @@ size = device_dev->resource[idx].end - device_dev->resource[idx].start; if (size) { - device_dev->resource[idx].start = (unsigned long)pciio_pio_addr(vhdl, 0, PCIIO_SPACE_WIN(idx), 0, size, 0, (IS_PIC_DEVICE(device_dev)) ? 0 : PCIIO_BYTE_STREAM); + device_dev->resource[idx].start = (unsigned long)pciio_pio_addr(vhdl, 0, PCIIO_SPACE_WIN(idx), 0, size, 0, 0); device_dev->resource[idx].start |= __IA64_UNCACHED_OFFSET; } else @@ -583,7 +526,7 @@ if (size) { device_dev->resource[PCI_ROM_RESOURCE].start = (unsigned long) pciio_pio_addr(vhdl, 0, PCIIO_SPACE_ROM, 0, - size, 0, (IS_PIC_DEVICE(device_dev)) ? 0 : PCIIO_BYTE_STREAM); + size, 0, 0); device_dev->resource[PCI_ROM_RESOURCE].start |= __IA64_UNCACHED_OFFSET; device_dev->resource[PCI_ROM_RESOURCE].end = device_dev->resource[PCI_ROM_RESOURCE].start + size; @@ -598,11 +541,6 @@ pci_write_config_word(device_dev, PCI_COMMAND, cmd); pci_read_config_byte(device_dev, PCI_INTERRUPT_PIN, (unsigned char *)&lines); - if (device_dev->vendor == PCI_VENDOR_ID_SGI && - device_dev->device == PCI_DEVICE_ID_SGI_IOC3 ) { - lines = 1; - } - device_sysdata = (struct sn_device_sysdata *)device_dev->sysdata; device_vertex = device_sysdata->vhdl; @@ -703,13 +641,11 @@ * */ static int -pci_bus_map_create(vertex_hdl_t xtalk, char * io_moduleid) +pci_bus_map_create(vertex_hdl_t xtalk, int brick_type, char * io_moduleid) { - vertex_hdl_t master_node_vertex = NULL; vertex_hdl_t xwidget = NULL; vertex_hdl_t pci_bus = NULL; - hubinfo_t hubinfo = NULL; xwidgetnum_t widgetnum; char pathname[128]; graph_error_t rv; @@ -720,73 +656,6 @@ int bus_number; /* - * Loop throught this vertex and get the Xwidgets .. - */ - - - /* PCI devices */ - - for (widgetnum = HUB_WIDGET_ID_MAX; widgetnum >= HUB_WIDGET_ID_MIN; widgetnum--) { - sprintf(pathname, "%d", widgetnum); - xwidget = NULL; - - /* - * Example - /hw/module/001c16/Pbrick/xtalk/8 is the xwidget - * /hw/module/001c16/Pbrick/xtalk/8/pci/1 is device - */ - rv = hwgraph_traverse(xtalk, pathname, &xwidget); - if ( (rv != GRAPH_SUCCESS) ) { - if (!xwidget) { - continue; - } - } - - sprintf(pathname, "%d/"EDGE_LBL_PCI, widgetnum); - pci_bus = NULL; - if (hwgraph_traverse(xtalk, pathname, &pci_bus) != GRAPH_SUCCESS) - if (!pci_bus) { - continue; -} - - /* - * Assign the correct bus number and also the nasid of this - * pci Xwidget. - * - * Should not be any race here ... - */ - num_bridges++; - busnum_to_pcibr_vhdl[num_bridges - 1] = pci_bus; - - /* - * Get the master node and from there get the NASID. - */ - master_node_vertex = device_master_get(xwidget); - if (!master_node_vertex) { - printk("WARNING: pci_bus_map_create: Unable to get .master for vertex 0x%p\n", (void *)xwidget); - } - - hubinfo_get(master_node_vertex, &hubinfo); - if (!hubinfo) { - printk("WARNING: pci_bus_map_create: Unable to get hubinfo for master node vertex 0x%p\n", (void *)master_node_vertex); - return(1); - } else { - busnum_to_nid[num_bridges - 1] = hubinfo->h_nasid; - } - - /* - * Pre assign DMA maps needed for 32 Bits Page Map DMA. - */ - busnum_to_atedmamaps[num_bridges - 1] = (void *) kmalloc( - sizeof(struct sn_dma_maps_s) * MAX_ATE_MAPS, GFP_KERNEL); - if (!busnum_to_atedmamaps[num_bridges - 1]) - printk("WARNING: pci_bus_map_create: Unable to precreate ATE DMA Maps for busnum %d vertex 0x%p\n", num_bridges - 1, (void *)xwidget); - - memset(busnum_to_atedmamaps[num_bridges - 1], 0x0, - sizeof(struct sn_dma_maps_s) * MAX_ATE_MAPS); - - } - - /* * PCIX devices * We number busses differently for PCI-X devices. * We start from Lowest Widget on up .. @@ -829,11 +698,11 @@ * * Should not be any race here ... */ - bus_number = basebus_num + bus + io_brick_map_widget(MODULE_PXBRICK, widgetnum); + bus_number = basebus_num + bus + io_brick_map_widget(brick_type, widgetnum); #ifdef DEBUG - printk("bus_number %d basebus_num %d bus %d io %d\n", + printk("bus_number %d basebus_num %d bus %d io %d pci_bus 0x%x brick_type %d \n", bus_number, basebus_num, bus, - io_brick_map_widget(MODULE_PXBRICK, widgetnum)); + io_brick_map_widget(brick_type, widgetnum), pci_bus, brick_type); #endif busnum_to_pcibr_vhdl[bus_number] = pci_bus; @@ -842,14 +711,71 @@ */ busnum_to_atedmamaps[bus_number] = (void *) kmalloc( sizeof(struct sn_dma_maps_s) * MAX_ATE_MAPS, GFP_KERNEL); - if (!busnum_to_atedmamaps[bus_number]) - printk("WARNING: pci_bus_map_create: Unable to precreate ATE DMA Maps for busnum %d vertex 0x%p\n", num_bridges - 1, (void *)xwidget); + if (busnum_to_atedmamaps[bus_number] <= 0) + BUG(); /* Cannot afford to run out of memory. */ memset(busnum_to_atedmamaps[bus_number], 0x0, sizeof(struct sn_dma_maps_s) * MAX_ATE_MAPS); } } + /* AGP/CGbrick */ + + for (widgetnum = HUB_WIDGET_ID_MIN; widgetnum <= HUB_WIDGET_ID_MAX; widgetnum++) { + + /* Do both buses */ + for ( bus = 0; bus < 2; bus++ ) { + sprintf(pathname, "%d", widgetnum); + xwidget = NULL; + + /* + * Example - /hw/module/001c16/slab/0/CGbrick/xtalk/15 is the xwidget + * /hw/module/001c16/slab/0/CGbrick/xtalk/15/agp/0 is the bus + * /hw/module/001c16/slab/0/CGbrick/xtalk/15/agp/0/1a is device + */ + rv = hwgraph_traverse(xtalk, pathname, &xwidget); + if ( (rv != GRAPH_SUCCESS) ) { + if (!xwidget) { + continue; + } + } + + if ( bus == 0 ) + sprintf(pathname, "%d/"EDGE_LBL_AGP_0, widgetnum); + else + sprintf(pathname, "%d/"EDGE_LBL_AGP_1, widgetnum); + pci_bus = NULL; + if (hwgraph_traverse(xtalk, pathname, &pci_bus) != GRAPH_SUCCESS) + if (!pci_bus) { + continue; + } + + /* + * Assign the correct bus number and also the nasid of this + * pci Xwidget. + * + * Should not be any race here ... + */ + bus_number = basebus_num + bus + io_brick_map_widget(brick_type, widgetnum); +#ifdef DEBUG + printk("bus_number %d basebus_num %d bus %d io %d pci_bus 0x%x\n", + bus_number, basebus_num, bus, + io_brick_map_widget(brick_type, widgetnum), pci_bus); +#endif + busnum_to_pcibr_vhdl[bus_number] = pci_bus; + + /* + * Pre assign DMA maps needed for 32 Bits Page Map DMA. + */ + busnum_to_atedmamaps[bus_number] = (void *) kmalloc( + sizeof(struct sn_dma_maps_s) * MAX_ATE_MAPS, GFP_KERNEL); + if (busnum_to_atedmamaps[bus_number] <= 0) + BUG(); /* Cannot afford to run out of memory */ + + memset(busnum_to_atedmamaps[bus_number], 0x0, + sizeof(struct sn_dma_maps_s) * MAX_ATE_MAPS); + } + } return(0); } @@ -868,11 +794,20 @@ vertex_hdl_t devfs_hdl = NULL; vertex_hdl_t xtalk = NULL; int rv = 0; - char name[256]; - char tmp_name[256]; + char *name; + char *tmp_name; int i, ii, j; char *brick_name; extern void ioconfig_bus_new_entries(void); + extern int iobrick_type_get_nasid(nasid_t); + + name = kmalloc(256, GFP_KERNEL); + if (!name) + BUG(); + + tmp_name = kmalloc(256, GFP_KERNEL); + if (!name) + BUG(); /* * Figure out which IO Brick is connected to the Compute Bricks. @@ -881,32 +816,39 @@ extern int iomoduleid_get(nasid_t); moduleid_t iobrick_id; nasid_t nasid = -1; - int nodecnt; int n = 0; - nodecnt = modules[i]->nodecnt; - for ( n = 0; n < nodecnt; n++ ) { + for ( n = 0; n <= MAX_SLABS; n++ ) { + if (modules[i]->nodes[n] == -1) + continue; /* node is not alive in module */ + nasid = cnodeid_to_nasid(modules[i]->nodes[n]); iobrick_id = iomoduleid_get(nasid); if ((int)iobrick_id > 0) { /* Valid module id */ char name[12]; memset(name, 0, 12); format_module_id((char *)&(modules[i]->io[n].moduleid), iobrick_id, MODULE_FORMAT_BRIEF); + modules[i]->io[n].iobrick_type = (uint64_t)iobrick_type_get_nasid(nasid); } } } devfs_hdl = hwgraph_path_to_vertex("hw/module"); for (i = 0; i < nummodules ; i++) { - for ( j = 0; j < 3; j++ ) { + for ( j = 0; j < 4; j++ ) { if ( j == 0 ) - brick_name = EDGE_LBL_PBRICK; + brick_name = EDGE_LBL_IXBRICK; else if ( j == 1 ) brick_name = EDGE_LBL_PXBRICK; - else - brick_name = EDGE_LBL_IXBRICK; + else if ( j == 2 ) + brick_name = EDGE_LBL_OPUSBRICK; + else /* 3 */ + brick_name = EDGE_LBL_CGBRICK; + + for ( ii = 0; ii <= MAX_SLABS ; ii++ ) { + if (modules[i]->nodes[ii] == -1) + continue; /* Missing slab */ - for ( ii = 0; ii < 2 ; ii++ ) { memset(name, 0, 256); memset(tmp_name, 0, 256); format_module_id(name, modules[i]->id, MODULE_FORMAT_BRIEF); @@ -915,11 +857,14 @@ xtalk = NULL; rv = hwgraph_edge_get(devfs_hdl, name, &xtalk); if ( rv == 0 ) - pci_bus_map_create(xtalk, (char *)&(modules[i]->io[ii].moduleid)); + pci_bus_map_create(xtalk, (int)modules[i]->io[ii].iobrick_type, (char *)&(modules[i]->io[ii].moduleid)); } } } + kfree(name); + kfree(tmp_name); + /* * Create the Linux PCI bus number vertex link. */ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/machvec/pci_dma.c linux-2.4.23-pre8/arch/ia64/sn/io/machvec/pci_dma.c --- linux-2.4.22/arch/ia64/sn/io/machvec/pci_dma.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/machvec/pci_dma.c 2003-10-22 22:48:20.000000000 +0000 @@ -182,7 +182,6 @@ * attributes or to a different memory region. */ *dma_handle = pciio_dmatrans_addr(vhdl, NULL, phys_addr, size, - ((IS_PIC_DEVICE(hwdev)) ? 0 : PCIIO_BYTE_STREAM) | PCIIO_DMA_CMD); /* @@ -201,7 +200,6 @@ */ if (!(*dma_handle)) { dma_map = pciio_dmamap_alloc(vhdl, NULL, size, - ((IS_PIC_DEVICE(hwdev)) ? 0 : PCIIO_BYTE_STREAM) | PCIIO_DMA_CMD); if (!dma_map) { printk(KERN_ERR "sn_pci_alloc_consistent: Unable to " @@ -295,10 +293,7 @@ */ if (IS_PCIA64(hwdev)) { sg->dma_address = pciio_dmatrans_addr(vhdl, NULL, phys_addr, - sg->length, - ((IS_PIC_DEVICE(hwdev)) ? 0 : PCIIO_BYTE_STREAM) | - PCIIO_DMA_DATA | - PCIIO_DMA_A64); + sg->length, PCIIO_DMA_DATA | PCIIO_DMA_A64); sg->dma_length = sg->length; continue; } @@ -308,9 +303,7 @@ */ if (IS_PCI32G(hwdev)) { sg->dma_address = pciio_dmatrans_addr(vhdl, NULL, phys_addr, - sg->length, - ((IS_PIC_DEVICE(hwdev)) ? 0 : PCIIO_BYTE_STREAM) | - PCIIO_DMA_DATA); + sg->length, PCIIO_DMA_DATA); sg->dma_length = sg->length; /* * See if we got a direct map entry @@ -325,9 +318,7 @@ * It is a 32 bit card and we cannot do direct mapping, * so we use an ATE. */ - dma_map = pciio_dmamap_alloc(vhdl, NULL, sg->length, - ((IS_PIC_DEVICE(hwdev)) ? 0 : PCIIO_BYTE_STREAM) | - PCIIO_DMA_DATA); + dma_map = pciio_dmamap_alloc(vhdl, NULL, sg->length, PCIIO_DMA_DATA); if (!dma_map) { printk(KERN_ERR "sn_pci_map_sg: Unable to allocate " "anymore 32 bit page map entries.\n"); @@ -440,9 +431,7 @@ if (IS_PCIA64(hwdev)) { /* This device supports 64 bit DMA addresses. */ dma_addr = pciio_dmatrans_addr(vhdl, NULL, phys_addr, size, - ((IS_PIC_DEVICE(hwdev)) ? 0 : PCIIO_BYTE_STREAM) | - PCIIO_DMA_DATA | - PCIIO_DMA_A64); + PCIIO_DMA_DATA | PCIIO_DMA_A64); return dma_addr; } @@ -454,7 +443,6 @@ */ if (IS_PCI32G(hwdev)) { dma_addr = pciio_dmatrans_addr(vhdl, NULL, phys_addr, size, - ((IS_PIC_DEVICE(hwdev)) ? 0 : PCIIO_BYTE_STREAM) | PCIIO_DMA_DATA); if (dma_addr) return dma_addr; @@ -465,9 +453,7 @@ * let's use the PMU instead. */ dma_map = NULL; - dma_map = pciio_dmamap_alloc(vhdl, NULL, size, - ((IS_PIC_DEVICE(hwdev)) ? 0 : PCIIO_BYTE_STREAM) | - PCIIO_DMA_DATA); + dma_map = pciio_dmamap_alloc(vhdl, NULL, size, PCIIO_DMA_DATA); if (!dma_map) { printk(KERN_ERR "pci_map_single: Unable to allocate anymore " diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/platform_init/Makefile linux-2.4.23-pre8/arch/ia64/sn/io/platform_init/Makefile --- linux-2.4.22/arch/ia64/sn/io/platform_init/Makefile 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/platform_init/Makefile 2003-10-22 22:49:48.000000000 +0000 @@ -11,6 +11,6 @@ O_TARGET := snio.o -obj-y += sgi_io_init.o irix_io_init.o +obj-y += irix_io_init.o include $(TOPDIR)/Rules.make diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/platform_init/irix_io_init.c linux-2.4.23-pre8/arch/ia64/sn/io/platform_init/irix_io_init.c --- linux-2.4.22/arch/ia64/sn/io/platform_init/irix_io_init.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/platform_init/irix_io_init.c 2003-10-22 22:49:55.000000000 +0000 @@ -23,17 +23,55 @@ extern void klhwg_add_all_modules(vertex_hdl_t); extern void klhwg_add_all_nodes(vertex_hdl_t); +extern int init_hcl(void); extern vertex_hdl_t hwgraph_root; extern void io_module_init(void); extern int pci_bus_to_hcl_cvlink(void); -extern void mlreset(void); -/* #define DEBUG_IO_INIT 1 */ -#ifdef DEBUG_IO_INIT -#define DBG(x...) printk(x) -#else -#define DBG(x...) -#endif /* DEBUG_IO_INIT */ +char arg_maxnodes[4]; +char master_baseio_wid; +nasid_t master_baseio_nasid; +nasid_t master_nasid = INVALID_NASID; /* This is the partition master nasid */ +nasid_t console_nasid = (nasid_t)-1; + +/* + * Return non-zero if the given variable was specified + */ +int +is_specified(char *s) +{ + return (strlen(s) != 0); +} + +int +check_nasid_equiv(nasid_t nasida, nasid_t nasidb) +{ + if ((nasida == nasidb) || (nasida == NODEPDA(NASID_TO_COMPACT_NODEID(nasidb))->xbow_peer)) + return 1; + else + return 0; +} + +int +is_master_baseio_nasid_widget(nasid_t test_nasid, xwidgetnum_t test_wid) +{ + + /* + * If the widget numbers are different, we're not the master. + */ + if (test_wid != (xwidgetnum_t)master_baseio_wid) { + return 0; + } + + /* + * If the NASIDs are the same or equivalent, we're the master. + */ + if (check_nasid_equiv(test_nasid, master_baseio_nasid)) { + return 1; + } else { + return 0; + } +} /* * This routine is responsible for the setup of all the IRIX hwgraph style @@ -46,14 +84,11 @@ */ void -irix_io_init(void) +sgi_master_io_infr_init(void) { cnodeid_t cnode; - /* - * This is the Master CPU. Emulate mlsetup and main.c in Irix. - */ - mlreset(); + init_hcl(); /* Sets up the hwgraph compatibility layer */ /* * Initialize platform-dependent vertices in the hwgraph: @@ -78,6 +113,12 @@ /* We can do headless hub cnodes here .. */ + /* Initialize ICE for TIO Nodes. */ + for (cnode = numnodes; cnode < numionodes; cnode++) { + extern void per_ice_init(cnodeid_t); + per_ice_init(cnode); + } + /* * * Our IO Infrastructure drivers are in place .. @@ -86,4 +127,12 @@ */ init_all_devices(); pci_bus_to_hcl_cvlink(); + +#ifdef CONFIG_KDB + { + extern void kdba_io_init(void); + kdba_io_init(); + } +#endif + } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/sgi_if.c linux-2.4.23-pre8/arch/ia64/sn/io/sgi_if.c --- linux-2.4.22/arch/ia64/sn/io/sgi_if.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/sgi_if.c 2003-10-22 22:48:55.000000000 +0000 @@ -21,11 +21,11 @@ #include void * -snia_kmem_zalloc(size_t size, int flag) +snia_kmem_zalloc(size_t size) { void *ptr = kmalloc(size, GFP_KERNEL); if ( ptr ) - BZERO(ptr, size); + memset(ptr, 0, size); return(ptr); } @@ -39,21 +39,12 @@ * the alloc/free_node routines do a simple kmalloc for now .. */ void * -snia_kmem_alloc_node(register size_t size, register int flags, cnodeid_t node) +snia_kmem_alloc_node(register size_t size, cnodeid_t node) { /* someday will Allocate on node 'node' */ return(kmalloc(size, GFP_KERNEL)); } -void * -snia_kmem_zalloc_node(register size_t size, register int flags, cnodeid_t node) -{ - void *ptr = kmalloc(size, GFP_KERNEL); - if ( ptr ) - BZERO(ptr, size); - return(ptr); -} - /* * print_register() allows formatted printing of bit fields. individual diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/sn2/Makefile linux-2.4.23-pre8/arch/ia64/sn/io/sn2/Makefile --- linux-2.4.22/arch/ia64/sn/io/sn2/Makefile 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/sn2/Makefile 2003-10-22 22:49:18.000000000 +0000 @@ -11,15 +11,14 @@ O_TARGET := snio.o -export-objs := pciio.o - obj-y += ml_SN_intr.o shub_intr.o shuberror.o shub.o \ bte_error.o pcibr/pcibr.o pic.o geo_op.o \ l1_command.o klconflib.o klgraph.o \ ml_SN_init.o ml_iograph.o module.o pciio.o \ - xbow.o xtalk.o shubio.o + xbow.o xtalk.o shubio.o ioc4/ioc4_if.o + obj-$(CONFIG_KDB) += kdba_io.o -subdir-y += pcibr +subdir-y += pcibr ioc4 include $(TOPDIR)/Rules.make diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/sn2/ioc4/Makefile linux-2.4.23-pre8/arch/ia64/sn/io/sn2/ioc4/Makefile --- linux-2.4.22/arch/ia64/sn/io/sn2/ioc4/Makefile 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/sn2/ioc4/Makefile 2003-10-22 22:49:08.000000000 +0000 @@ -0,0 +1,22 @@ +# +# This file is subject to the terms and conditions of the GNU General Public +# License. See the file "COPYING" in the main directory of this archive +# for more details. +# +# Copyright (C) 2003 Silicon Graphics, Inc. All Rights Reserved. +# +# Makefile for the sn2 io ioc4 routines. + +EXTRA_CFLAGS := -DLITTLE_ENDIAN + +ifdef CONFIG_IA64_SGI_SN2 +EXTRA_CFLAGS += -DSHUB_SWAP_WAR +endif + +O_TARGET := ioc4_if.o +export-objs := ioc4.o sio_ioc4.o + + +obj-$(CONFIG_IA64_SGI_SN2) += sio_ioc4.o ioc4.o + +include $(TOPDIR)/Rules.make diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/sn2/ioc4/ioc4.c linux-2.4.23-pre8/arch/ia64/sn/io/sn2/ioc4/ioc4.c --- linux-2.4.22/arch/ia64/sn/io/sn2/ioc4/ioc4.c 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/sn2/ioc4/ioc4.c 2003-10-22 22:49:44.000000000 +0000 @@ -0,0 +1,641 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 2003 Silicon Graphics, Inc. All Rights Reserved. + */ + + +/* This is the top level IOC4 device driver. It does very little, farming + * out actual tasks to the various slave IOC4 drivers (serial, keyboard/mouse, + * and real-time interrupt). + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* #define DEBUG_INTERRUPTS */ +#define SUPPORT_ATOMICS + +#ifdef SUPPORT_ATOMICS + +/* + * support routines for local atomic operations. + */ + +static spinlock_t local_lock; + +static inline unsigned int +atomicSetInt(atomic_t *a, unsigned int b) +{ + unsigned long s; + unsigned int ret, new; + + spin_lock_irqsave(&local_lock, s); + new = ret = atomic_read(a); + new |= b; + atomic_set(a, new); + spin_unlock_irqrestore(&local_lock, s); + + return ret; +} + +static unsigned int +atomicClearInt(atomic_t *a, unsigned int b) +{ + unsigned long s; + unsigned int ret, new; + + spin_lock_irqsave(&local_lock, s); + new = ret = atomic_read(a); + new &= ~b; + atomic_set(a, new); + spin_unlock_irqrestore(&local_lock, s); + + return ret; +} + +#else + +#define atomicAddInt(a,b) *(a) += ((unsigned int)(b)) + +static inline unsigned int +atomicSetInt(unsigned int *a, unsigned int b) +{ + unsigned int ret = *a; + + *a |= b; + return ret; +} + +#define atomicSetUint64(a,b) *(a) |= ((unsigned long long )(b)) + +static inline unsigned int +atomicClearInt(unsigned int *a, unsigned int b) +{ + unsigned int ret = *a; + + *a &= ~b; + return ret; +} + +#define atomicClearUint64(a,b) *(a) &= ~((unsigned long long)(b)) +#endif /* SUPPORT_ATOMICS */ + + +/* pci device struct */ +static const struct pci_device_id __devinitdata ioc4_s_id_table[] = +{ + { IOC4_VENDOR_ID_NUM, IOC4_DEVICE_ID_NUM, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, + { 0, 0, 0, 0, 0, 0, 0 } +}; + +int __devinit ioc4_attach(struct pci_dev *, const struct pci_device_id *); + +struct pci_driver ioc4_s_driver = +{ + name : "IOC4 Serial", + id_table: ioc4_s_id_table, + probe: ioc4_attach, +}; + +int __init +ioc4_serial_detect(void) +{ + int rc; + + rc = pci_register_driver(&ioc4_s_driver); + return 0; +} +module_init(ioc4_serial_detect); + + +/* + * Some external functions we still need. + */ +extern int ioc4_serial_attach(vertex_hdl_t conn, void *mem); +extern cpuid_t cpuvertex_to_cpuid(vertex_hdl_t vhdl); + + +/* + * per-IOC4 data structure + */ +typedef struct ioc4_soft_s { + vertex_hdl_t is_ioc4_vhdl; + vertex_hdl_t is_conn_vhdl; + + struct pci_dev *is_pci_dev; + ioc4_mem_t *is_ioc4_mem; + + /* Each interrupt type has an entry in the array */ + struct ioc4_intr_type { + + /* + * Each in-use entry in this array contains at least + * one nonzero bit in sd_bits; no two entries in this + * array have overlapping sd_bits values. + */ +#define MAX_IOC4_INTR_ENTS (8 * sizeof(ioc4reg_t)) + struct ioc4_intr_info { + ioc4reg_t sd_bits; + ioc4_intr_func_f *sd_intr; + intr_arg_t sd_info; + vertex_hdl_t sd_vhdl; + struct ioc4_soft_s *sd_soft; + } is_intr_info[MAX_IOC4_INTR_ENTS]; + + /* Number of entries active in the above array */ + atomic_t is_num_intrs; + atomic_t is_intr_bits_busy; /* Bits assigned */ + atomic_t is_intr_ents_free; /* Free active entries mask*/ + } is_intr_type[ioc4_num_intr_types]; + + /* is_ir_lock must be held while + * modifying sio_ie values, so + * we can be sure that sio_ie is + * not changing when we read it + * along with sio_ir. + */ + spinlock_t is_ir_lock; /* SIO_IE[SC] mod lock */ +} ioc4_soft_t; + +#define ioc4_soft_set(v,i) hwgraph_fastinfo_set((v), (arbitrary_info_t)(i)) +#define ioc4_soft_get(v) ((ioc4_soft_t *)hwgraph_fastinfo_get(v)) + + +/* ===================================================================== + * Function Table of Contents + */ + + +/* The IOC4 hardware provides no atomic way to determine if interrupts + * are pending since two reads are required to do so. The handler must + * read the SIO_IR and the SIO_IES, and take the logical and of the + * two. When this value is zero, all interrupts have been serviced and + * the handler may return. + * + * This has the unfortunate "hole" that, if some other CPU or + * some other thread or some higher level interrupt manages to + * modify SIO_IE between our reads of SIO_IR and SIO_IE, we may + * think we have observed SIO_IR&SIO_IE==0 when in fact this + * condition never really occurred. + * + * To solve this, we use a simple spinlock that must be held + * whenever modifying SIO_IE; holding this lock while observing + * both SIO_IR and SIO_IE guarantees that we do not falsely + * conclude that no enabled interrupts are pending. + */ + +void +ioc4_write_ireg(void *ioc4_soft, ioc4reg_t val, int which, ioc4_intr_type_t type) +{ + ioc4_mem_t *mem = ((ioc4_soft_t *) ioc4_soft)->is_ioc4_mem; + spinlock_t *lp = &((ioc4_soft_t *) ioc4_soft)->is_ir_lock; + unsigned long s; + + + spin_lock_irqsave(lp, s); + + switch (type) { + case ioc4_sio_intr_type: + switch (which) { + case IOC4_W_IES: + mem->sio_ies_ro = val; + break; + + case IOC4_W_IEC: + mem->sio_iec_ro = val; + break; + } + break; + + case ioc4_other_intr_type: + switch (which) { + case IOC4_W_IES: + mem->other_ies_ro = val; + break; + + case IOC4_W_IEC: + mem->other_iec_ro = val; + break; + } + break; + + case ioc4_num_intr_types: + break; + } + spin_unlock_irqrestore(lp, s); +} + + +static inline ioc4reg_t +ioc4_pending_intrs(ioc4_soft_t * ioc4_soft, ioc4_intr_type_t type) +{ + ioc4_mem_t *mem = ioc4_soft->is_ioc4_mem; + spinlock_t *lp = &ioc4_soft->is_ir_lock; + unsigned long s; + ioc4reg_t intrs = (ioc4reg_t)0; + + ASSERT((type == ioc4_sio_intr_type) || (type == ioc4_other_intr_type)); + + spin_lock_irqsave(lp, s); + + switch (type) { + case ioc4_sio_intr_type: + intrs = mem->sio_ir & mem->sio_ies_ro; + break; + + case ioc4_other_intr_type: + intrs = mem->other_ir & mem->other_ies_ro; + + /* Don't process any ATA interrupte, leave them for the ATA driver */ + intrs &= ~(IOC4_OTHER_IR_ATA_INT | IOC4_OTHER_IR_ATA_MEMERR); + break; + + case ioc4_num_intr_types: + break; + } + + spin_unlock_irqrestore(lp, s); + return intrs; +} + + +int __devinit +ioc4_attach(struct pci_dev *pci_handle, const struct pci_device_id *pci_id) +{ + ioc4_mem_t *mem; +/*REFERENCED*/ + graph_error_t rc; + vertex_hdl_t ioc4_vhdl; + ioc4_soft_t *soft; + vertex_hdl_t conn_vhdl = PCIDEV_VERTEX(pci_handle); + int tmp; + extern void ioc4_ss_connect_interrupt(int, void *, void *); + extern void ioc4_intr(int, void *, struct pt_regs *); + + if ( pci_enable_device(pci_handle) ) { + printk("ioc4_attach: Failed to enable device with pci_dev 0x%p... returning\n", (void *)pci_handle); + return(-1); + } + + pci_set_master(pci_handle); + snia_pciio_endian_set(pci_handle, PCIDMA_ENDIAN_LITTLE, PCIDMA_ENDIAN_BIG); + + /* + * Get PIO mappings through our "primary" + * connection point to the IOC4's CFG and + * MEM spaces. + */ + + /* + * Map in the ioc4 memory - we'll do config accesses thru the pci_????() interfaces. + */ + + mem = (ioc4_mem_t *)pci_resource_start(pci_handle, 0); + if ( !mem ) { + printk(KERN_ALERT "%p/" EDGE_LBL_IOC4 + ": unable to get PIO mapping for my MEM space\n", (void *)pci_handle); + return -1; + } + + if ( !request_region((unsigned long)mem, sizeof(*mem), "sioc4_mem")) { + printk(KERN_ALERT + "%p/" EDGE_LBL_IOC4 + ": unable to get request region for my MEM space\n", + (void *)pci_handle); + return -1; + } + + /* + * Create the "ioc4" vertex which hangs off of + * the connect points. + * This code is slightly paranoid. + */ + rc = hwgraph_path_add(conn_vhdl, EDGE_LBL_IOC4, &ioc4_vhdl); + ASSERT(rc == GRAPH_SUCCESS); + + /* + * Allocate the soft structure, fill it in a bit, + * and attach it to the ioc4 vertex. + */ + NEW(soft); + + spin_lock_init(&soft->is_ir_lock); + soft->is_ioc4_vhdl = ioc4_vhdl; + soft->is_conn_vhdl = conn_vhdl; + soft->is_ioc4_mem = mem; + soft->is_pci_dev = pci_handle; + + ioc4_soft_set(ioc4_vhdl, soft); + + /* Init the IOC4 */ + + /* SN boot PROMs allocate the PCI + * space and set up the pci_addr fields. + * Other systems need to set the base address. + * This is handled automatically if the PCI infrastructure + * is used. + * + * No need to set the latency timer since the PCI + * infrastructure sets it to 1 us. + */ + + pci_read_config_dword(pci_handle, IOC4_PCI_SCR, &tmp); + + pci_write_config_dword(pci_handle, IOC4_PCI_SCR, + tmp | PCI_CMD_BUS_MASTER | PCI_CMD_MEM_SPACE | + PCI_CMD_PAR_ERR_RESP | PCI_CMD_SERR_ENABLE); + + PCI_OUTW(&mem->sio_cr, (0xf << IOC4_SIO_CR_CMD_PULSE_SHIFT)); + + /* Enable serial port mode select generic PIO pins as outputs */ + PCI_OUTW(&mem->gpcr_s, IOC4_GPCR_UART0_MODESEL | IOC4_GPCR_UART1_MODESEL); + + /* Clear and disable all interrupts */ + IOC4_WRITE_IEC(soft, ~0, ioc4_sio_intr_type); + PCI_OUTW(&mem->sio_ir, ~0); + + IOC4_WRITE_IEC(soft, ~0, ioc4_other_intr_type); + PCI_OUTW(&mem->other_ir, ~0); + + /* + * Alloc the IOC4 intr before attaching the subdevs, so the + * cpu handling the IOC4 intr is known (for setmustrun on + * the ioc4 ithreads). + */ + + /* attach interrupt handler */ + + ioc4_ss_connect_interrupt(pci_handle->irq, (void *)ioc4_intr, (void *)soft); + + /* ============================================================= + * Attach Sub-devices + * + * NB: As subdevs start calling pciio_driver_register(), + * we can stop explicitly calling subdev drivers. + * + * The drivers attached here have not been converted + * to stand on their own. However, they *do* know + * to call ioc4_subdev_enabled() to decide whether + * to actually attach themselves. + * + * It would be nice if we could convert these + * few remaining drivers over so they would + * register as proper PCI device drivers ... + */ + + ioc4_serial_attach(conn_vhdl, (void *)soft->is_ioc4_mem); /* DMA serial ports */ + + /* Normally we'd return 0 - but we need to get the ide driver init'd too. + * Returning an error will keep the IOC4 on the pci list */ + return -1; +} + + +/* + * ioc4_intr_connect: + * Arrange for interrupts for a sub-device + * to be delivered to the right bit of + * code with the right parameter. + * + * XXX- returning an error instead of panicing + * might be a good idea (think bugs in loadable + * ioc4 sub-devices). + */ + + + +void +ioc4_intr_connect(vertex_hdl_t conn_vhdl, + ioc4_intr_type_t type, + ioc4reg_t intrbits, + ioc4_intr_func_f *intr, + intr_arg_t info, + vertex_hdl_t owner_vhdl, + vertex_hdl_t intr_dev_vhdl) +{ + graph_error_t rc; + vertex_hdl_t ioc4_vhdl; + ioc4_soft_t *soft; + ioc4reg_t old, bits; + int i; + + ASSERT((type == ioc4_sio_intr_type) || (type == ioc4_other_intr_type)); + + rc = hwgraph_traverse(conn_vhdl, EDGE_LBL_IOC4, &ioc4_vhdl); + if (rc != GRAPH_SUCCESS) { + printk(KERN_ALERT "ioc4_intr_connect(%p): ioc4_attach not yet called", (void *)owner_vhdl); + return; + } + + soft = ioc4_soft_get(ioc4_vhdl); + ASSERT(soft != NULL); + + /* + * Try to allocate a slot in the array + * that has been marked free; if there + * are none, extend the high water mark. + */ + while (1) { + bits = atomic_read(&soft->is_intr_type[type].is_intr_ents_free); + if (bits == 0) { + i = atomic_inc(&soft->is_intr_type[type].is_num_intrs) - 1; + ASSERT(i < MAX_IOC4_INTR_ENTS || (printk("i %d\n", i), 0)); + break; + } + bits &= ~(bits - 1); /* keep only the ls bit */ + old = atomicClearInt(&soft->is_intr_type[type].is_intr_ents_free, bits); + if (bits & old) { + ioc4reg_t shf; + + i = 31; + if ((shf = (bits >> 16))) + bits = shf; + else + i -= 16; + if ((shf = (bits >> 8))) + bits = shf; + else + i -= 8; + if ((shf = (bits >> 4))) + bits = shf; + else + i -= 4; + if ((shf = (bits >> 2))) + bits = shf; + else + i -= 2; + if ((shf = (bits >> 1))) + bits = shf; + else + i -= 1; + ASSERT(i < MAX_IOC4_INTR_ENTS || (printk("i %d\n", i), 0)); + break; + } + } + + soft->is_intr_type[type].is_intr_info[i].sd_bits = intrbits; + soft->is_intr_type[type].is_intr_info[i].sd_intr = intr; + soft->is_intr_type[type].is_intr_info[i].sd_info = info; + soft->is_intr_type[type].is_intr_info[i].sd_vhdl = owner_vhdl; + soft->is_intr_type[type].is_intr_info[i].sd_soft = soft; + + /* Make sure there are no bitmask overlaps */ + { + ioc4reg_t old; + + old = atomicSetInt(&soft->is_intr_type[type].is_intr_bits_busy, intrbits); + if (old & intrbits) { + printk("%p: trying to share ioc4 intr bits 0x%X\n", + (void *)owner_vhdl, old & intrbits); + +#if DEBUG && IOC4_DEBUG + { + int x; + + for (x = 0; x < i; x++) + if (intrbits & soft->is_intr_type[type].is_intr_info[x].sd_bits) { + printk("%p: ioc4 intr bits 0x%X already call " + "0x%X(0x%X, ...)\n", + (void *)soft->is_intr_type[type].is_intr_info[x].sd_vhdl, + soft->is_intr_type[type].is_intr_info[i].sd_bits, + soft->is_intr_type[type].is_intr_info[i].sd_intr, + soft->is_intr_type[type].is_intr_info[i].sd_info); + } + } +#endif + panic("ioc4_intr_connect: no IOC4 interrupt source sharing allowed"); + } + } +} + +/* + * ioc4_intr_disconnect: + * Turn off interrupt request service for a + * specific service function and argument. + * Scans the array for connections to the specified + * function with the specified info and owner; turns off + * the bits specified in intrbits. If this results in + * an empty entry, logs it in the free entry map. + */ +void +ioc4_intr_disconnect(vertex_hdl_t conn_vhdl, + ioc4_intr_type_t type, + ioc4reg_t intrbits, + ioc4_intr_func_f *intr, + intr_arg_t info, + vertex_hdl_t owner_vhdl) +{ + graph_error_t rc; + vertex_hdl_t ioc4_vhdl; + ioc4_soft_t *soft; + ioc4reg_t bits; + int i, num_intrs; + + ASSERT((type == ioc4_sio_intr_type) || (type == ioc4_other_intr_type)); + + rc = hwgraph_traverse(conn_vhdl, EDGE_LBL_IOC4, &ioc4_vhdl); + if (rc != GRAPH_SUCCESS) { + printk(KERN_ALERT "%p: ioc4_intr_disconnect: ioc4_attach not yet called", (void *)owner_vhdl); + return; + } + + soft = ioc4_soft_get(ioc4_vhdl); + ASSERT(soft != NULL); + + num_intrs = (int)atomic_read(&soft->is_intr_type[type].is_num_intrs); + for (i = 0; i < num_intrs; ++i) { + if ((soft->is_intr_type[type].is_intr_info[i].sd_intr == intr) && + (soft->is_intr_type[type].is_intr_info[i].sd_info == info) && + (soft->is_intr_type[type].is_intr_info[i].sd_vhdl == owner_vhdl) && + (bits = soft->is_intr_type[type].is_intr_info[i].sd_bits & intrbits)) { + soft->is_intr_type[type].is_intr_info[i].sd_bits &= ~bits; + atomicClearInt(&soft->is_intr_type[type].is_intr_bits_busy, bits); + if (!(soft->is_intr_type[type].is_intr_info[i].sd_bits)) { + soft->is_intr_type[type].is_intr_info[i].sd_intr = NULL; + soft->is_intr_type[type].is_intr_info[i].sd_info = NULL; + soft->is_intr_type[type].is_intr_info[i].sd_vhdl = GRAPH_VERTEX_NONE; + atomicSetInt(&soft->is_intr_type[type].is_intr_ents_free, 1 << i); + } + } + } +} + +/* Top level IOC4 interrupt handler. Farms out the interrupt to + * the various IOC4 device drivers. + */ + +void +ioc4_intr(int irq, void *arg, struct pt_regs *regs) +{ + ioc4_soft_t *soft; + ioc4reg_t this_ir; + ioc4reg_t this_mir; + int x, num_intrs = 0; + ioc4_intr_type_t t; + + soft = (ioc4_soft_t *)arg; + + if (!soft) + return; /* Polled but no console ioc4 registered */ + + for (t = ioc4_first_intr_type; t < ioc4_num_intr_types; t++) { + num_intrs = (int)atomic_read(&soft->is_intr_type[t].is_num_intrs); + + this_mir = this_ir = ioc4_pending_intrs(soft, t); +#ifdef DEBUG_INTERRUPTS + printk("%s : %d : this_mir 0x%x num_intrs %d\n", __FUNCTION__, __LINE__, this_mir, num_intrs); +#endif + + /* Farm out the interrupt to the various drivers depending on + * which interrupt bits are set. + */ + for (x = 0; x < num_intrs; x++) { + struct ioc4_intr_info *ii = &soft->is_intr_type[t].is_intr_info[x]; + if ((this_mir = this_ir & ii->sd_bits)) { + /* Disable owned interrupts, and call the interrupt handler */ + IOC4_WRITE_IEC(soft, ii->sd_bits, t); + ii->sd_intr(ii->sd_info, this_mir); + this_ir &= ~this_mir; + } + } + + if (this_ir) + printk(KERN_ALERT "unknown IOC4 %s interrupt 0x%x, sio_ir = 0x%x, sio_ies = 0x%x, other_ir = 0x%x, other_ies = 0x%x\n", + (t == ioc4_sio_intr_type) ? "sio" : "other", + this_ir, + soft->is_ioc4_mem->sio_ir, + soft->is_ioc4_mem->sio_ies_ro, + soft->is_ioc4_mem->other_ir, + soft->is_ioc4_mem->other_ies_ro); + } +#ifdef DEBUG_INTERRUPTS + { + ioc4_mem_t *mem = soft->is_ioc4_mem; + spinlock_t *lp = &soft->is_ir_lock; + unsigned long s; + + spin_lock_irqsave(lp, s); + printk("%s : %d : sio_ir 0x%x sio_ies_ro 0x%x other_ir 0x%x other_ies_ro 0x%x mask 0x%x\n", + __FUNCTION__, __LINE__, + mem->sio_ir, + mem->sio_ies_ro, + mem->other_ir, + mem->other_ies_ro, + IOC4_OTHER_IR_ATA_INT | IOC4_OTHER_IR_ATA_MEMERR); + + spin_unlock_irqrestore(lp, s); + } +#endif +} diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/sn2/ioc4/sio_ioc4.c linux-2.4.23-pre8/arch/ia64/sn/io/sn2/ioc4/sio_ioc4.c --- linux-2.4.22/arch/ia64/sn/io/sn2/ioc4/sio_ioc4.c 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/sn2/ioc4/sio_ioc4.c 2003-10-22 22:48:39.000000000 +0000 @@ -0,0 +1,2266 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 2003 Silicon Graphics, Inc. All Rights Reserved. + */ + +/* + * This is a lower level module for the modular serial I/O driver. This + * module implements all hardware dependent functions for doing serial + * I/O on the IOC4 serial ports. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* #define IOC4_SIO_DEBUG */ +/* define USE_64BIT_DMA */ + +#define PENDING(port) (PCI_INW(&(port)->ip_ioc4->sio_ir) & port->ip_ienb) + +/* Default to 4k buffers */ +#ifdef IOC4_1K_BUFFERS +#define RING_BUF_SIZE 1024 +#define IOC4_BUF_SIZE_BIT 0 +#define PROD_CONS_MASK IOC4_PROD_CONS_PTR_1K +#else +#define RING_BUF_SIZE 4096 +#define IOC4_BUF_SIZE_BIT IOC4_SBBR_L_SIZE +#define PROD_CONS_MASK IOC4_PROD_CONS_PTR_4K +#endif + +#define TOTAL_RING_BUF_SIZE (RING_BUF_SIZE * 4) + +#if PAGE_SIZE < TOTAL_RING_BUF_SIZE +#include +#endif + + +#ifdef DPRINTF +#define dprintf(x) printk x +#else +#define dprintf(x) +#endif + +#define NEWA(ptr,n) (ptr = snia_kmem_zalloc((n)*sizeof (*(ptr)))) + +#define contig_memalloc(a,b,c) kmem_zalloc(PAGE_SIZE * (a)) +#define sio_port_islocked(a) 0 // FIXME: ????? + +#define KM_PHYSCONTIG 0x0008 +#define VM_DIRECT KM_PHYSCONTIG +#define VM_PHYSCONTIG KM_PHYSCONTIG + +#ifdef DEBUG +#define PROGRESS() printk("%s : %d\n", __FUNCTION__, __LINE__) +#define NOT_PROGRESS() printk("%s : %d - Error\n", __FUNCTION__, __LINE__) +#else +#define PROGRESS() ; +#define NOT_PROGRESS() ; +#endif + +static __inline__ void * +kvpalloc(size_t size, int flags, int colour) +{ + if (flags & (VM_DIRECT|VM_PHYSCONTIG)) { + int order = 0; + while ((PAGE_SIZE << order) < (size << PAGE_SHIFT)) + order++; + return (void *) __get_free_pages(GFP_KERNEL, order); + } else + return vmalloc(size << PAGE_SHIFT); +} + +/* Local port info for the IOC4 serial ports. This contains as its + * first member the global sio port private data. + */ +typedef struct ioc4port { + sioport_t ip_sioport; /* Must be first struct entry! */ + + vertex_hdl_t ip_conn_vhdl; /* vhdl to use for pciio requests */ + vertex_hdl_t ip_port_vhdl; /* vhdl for the serial port */ + + /* Base piomap addr of the ioc4 board this port is on + * and associated serial map; serial map includes uart registers. + */ + ioc4_mem_t *ip_ioc4; + ioc4_sregs_t *ip_serial; + ioc4_uart_t *ip_uart; + + /* Ring buffer page for this port */ + caddr_t ip_ring_buf_k0; /* Ring buffer location in K0 space */ + + /* Rings for this port */ + struct ring *ip_inring; + struct ring *ip_outring; + + /* Hook to port specific values for this port */ + struct hooks *ip_hooks; + + int ip_flags; + + /* Cache of DCD/CTS bits last received */ + char ip_modem_bits; + + /* Various rx/tx parameters */ + int ip_baud; + int ip_tx_lowat; + int ip_rx_timeout; + + /* Copy of notification bits */ + int ip_notify; + + /* Shadow copies of various registers so we don't need to PIO + * read them constantly + */ + ioc4reg_t ip_ienb; /* Enabled interrupts */ + + ioc4reg_t ip_sscr; + + ioc4reg_t ip_tx_prod; + ioc4reg_t ip_rx_cons; + + /* Back pointer to ioc4 soft area */ + void *ip_ioc4_soft; +} ioc4port_t; + +#if DEBUG +#define MAXSAVEPORT 256 +static int next_saveport = 0; +static ioc4port_t *saveport[MAXSAVEPORT]; +#endif + +/* TX low water mark. We need to notify the driver whenever TX is getting + * close to empty so it can refill the TX buffer and keep things going. + * Let's assume that if we interrupt 1 ms before the TX goes idle, we'll + * have no trouble getting in more chars in time (I certainly hope so). + */ +#define TX_LOWAT_LATENCY 1000 +#define TX_LOWAT_HZ (1000000 / TX_LOWAT_LATENCY) +#define TX_LOWAT_CHARS(baud) (baud / 10 / TX_LOWAT_HZ) + +/* Flags per port */ +#define INPUT_HIGH 0x01 +#define DCD_ON 0x02 +#define LOWAT_WRITTEN 0x04 +#define READ_ABORTED 0x08 +#define TX_DISABLED 0x10 + +/* Get local port type from global sio port type */ +#define LPORT(port) ((ioc4port_t *) (port)) + +/* Get global port from local port type */ +#define GPORT(port) ((sioport_t *) (port)) + +/* Since each port has different register offsets and bitmasks + * for everything, we'll store those that we need in tables so we + * don't have to be constantly checking the port we are dealing with. + */ +struct hooks { + ioc4reg_t intr_delta_dcd; + ioc4reg_t intr_delta_cts; + ioc4reg_t intr_tx_mt; + ioc4reg_t intr_rx_timer; + ioc4reg_t intr_rx_high; + ioc4reg_t intr_tx_explicit; + ioc4reg_t intr_dma_error; + ioc4reg_t intr_clear; + ioc4reg_t intr_all; + char rs422_select_pin; +}; + +static struct hooks hooks_array[4] = +{ + /* Values for port 0 */ + { + IOC4_SIO_IR_S0_DELTA_DCD, + IOC4_SIO_IR_S0_DELTA_CTS, + IOC4_SIO_IR_S0_TX_MT, + IOC4_SIO_IR_S0_RX_TIMER, + IOC4_SIO_IR_S0_RX_HIGH, + IOC4_SIO_IR_S0_TX_EXPLICIT, + IOC4_OTHER_IR_S0_MEMERR, + (IOC4_SIO_IR_S0_TX_MT | IOC4_SIO_IR_S0_RX_FULL | + IOC4_SIO_IR_S0_RX_HIGH | IOC4_SIO_IR_S0_RX_TIMER | + IOC4_SIO_IR_S0_DELTA_DCD | IOC4_SIO_IR_S0_DELTA_CTS | + IOC4_SIO_IR_S0_INT | IOC4_SIO_IR_S0_TX_EXPLICIT), + IOC4_SIO_IR_S0, + IOC4_GPPR_UART0_MODESEL_PIN, + }, + + /* Values for port 1 */ + { + IOC4_SIO_IR_S1_DELTA_DCD, + IOC4_SIO_IR_S1_DELTA_CTS, + IOC4_SIO_IR_S1_TX_MT, + IOC4_SIO_IR_S1_RX_TIMER, + IOC4_SIO_IR_S1_RX_HIGH, + IOC4_SIO_IR_S1_TX_EXPLICIT, + IOC4_OTHER_IR_S1_MEMERR, + (IOC4_SIO_IR_S1_TX_MT | IOC4_SIO_IR_S1_RX_FULL | + IOC4_SIO_IR_S1_RX_HIGH | IOC4_SIO_IR_S1_RX_TIMER | + IOC4_SIO_IR_S1_DELTA_DCD | IOC4_SIO_IR_S1_DELTA_CTS | + IOC4_SIO_IR_S1_INT | IOC4_SIO_IR_S1_TX_EXPLICIT), + IOC4_SIO_IR_S1, + IOC4_GPPR_UART1_MODESEL_PIN, + }, + + /* Values for port 2 */ + { + IOC4_SIO_IR_S2_DELTA_DCD, + IOC4_SIO_IR_S2_DELTA_CTS, + IOC4_SIO_IR_S2_TX_MT, + IOC4_SIO_IR_S2_RX_TIMER, + IOC4_SIO_IR_S2_RX_HIGH, + IOC4_SIO_IR_S2_TX_EXPLICIT, + IOC4_OTHER_IR_S2_MEMERR, + (IOC4_SIO_IR_S2_TX_MT | IOC4_SIO_IR_S2_RX_FULL | + IOC4_SIO_IR_S2_RX_HIGH | IOC4_SIO_IR_S2_RX_TIMER | + IOC4_SIO_IR_S2_DELTA_DCD | IOC4_SIO_IR_S2_DELTA_CTS | + IOC4_SIO_IR_S2_INT | IOC4_SIO_IR_S2_TX_EXPLICIT), + IOC4_SIO_IR_S2, + IOC4_GPPR_UART2_MODESEL_PIN, + }, + + /* Values for port 3 */ + { + IOC4_SIO_IR_S3_DELTA_DCD, + IOC4_SIO_IR_S3_DELTA_CTS, + IOC4_SIO_IR_S3_TX_MT, + IOC4_SIO_IR_S3_RX_TIMER, + IOC4_SIO_IR_S3_RX_HIGH, + IOC4_SIO_IR_S3_TX_EXPLICIT, + IOC4_OTHER_IR_S3_MEMERR, + (IOC4_SIO_IR_S3_TX_MT | IOC4_SIO_IR_S3_RX_FULL | + IOC4_SIO_IR_S3_RX_HIGH | IOC4_SIO_IR_S3_RX_TIMER | + IOC4_SIO_IR_S3_DELTA_DCD | IOC4_SIO_IR_S3_DELTA_CTS | + IOC4_SIO_IR_S3_INT | IOC4_SIO_IR_S3_TX_EXPLICIT), + IOC4_SIO_IR_S3, + IOC4_GPPR_UART3_MODESEL_PIN, + } +}; + +/* Macros to get into the port hooks. Require a variable called + * hooks set to port->hooks + */ +#define H_INTR_TX_MT hooks->intr_tx_mt +#define H_INTR_RX_TIMER hooks->intr_rx_timer +#define H_INTR_RX_HIGH hooks->intr_rx_high +#define H_INTR_TX_EXPLICIT hooks->intr_tx_explicit +#define H_INTR_DMA_ERROR hooks->intr_dma_error +#define H_INTR_CLEAR hooks->intr_clear +#define H_INTR_DELTA_DCD hooks->intr_delta_dcd +#define H_INTR_DELTA_CTS hooks->intr_delta_cts +#define H_INTR_ALL hooks->intr_all +#define H_RS422 hooks->rs422_select_pin + +/* A ring buffer entry */ +struct ring_entry { + union { + struct { + uint32_t alldata; + uint32_t allsc; + } all; + struct { + char data[4]; /* data bytes */ + char sc[4]; /* status/control */ + } s; + } u; +}; + +/* Test the valid bits in any of the 4 sc chars using "allsc" member */ +#define RING_ANY_VALID \ + ((uint32_t) (IOC4_RXSB_MODEM_VALID | IOC4_RXSB_DATA_VALID) * 0x01010101) + +#define ring_sc u.s.sc +#define ring_data u.s.data +#define ring_allsc u.all.allsc + +/* Number of entries per ring buffer. */ +#define ENTRIES_PER_RING (RING_BUF_SIZE / (int) sizeof(struct ring_entry)) + +/* An individual ring */ +struct ring { + struct ring_entry entries[ENTRIES_PER_RING]; +}; + +/* The whole enchilada */ +struct ring_buffer { + struct ring TX_0_OR_2; + struct ring RX_0_OR_2; + struct ring TX_1_OR_3; + struct ring RX_1_OR_3; +}; + +/* Get a ring from a port struct */ +#define RING(port, which) \ + &(((struct ring_buffer *) ((port)->ip_ring_buf_k0))->which) + +/* Local functions: */ +static int ioc4_open (sioport_t *port); +static int ioc4_config (sioport_t *port, int baud, int byte_size, + int stop_bits, int parenb, int parodd); +static int ioc4_enable_hfc (sioport_t *port, int enable); +static int ioc4_set_extclk (sioport_t *port, int clock_factor); + +/* Data transmission */ +static int do_ioc4_write (sioport_t *port, char *buf, int len); +static int ioc4_write (sioport_t *port, char *buf, int len); +static int ioc4_sync_write (sioport_t *port, char *buf, int len); +static void ioc4_wrflush (sioport_t *port); +static int ioc4_break (sioport_t *port, int brk); +static int ioc4_enable_tx (sioport_t *port, int enb); + +/* Data reception */ +static int ioc4_read (sioport_t *port, char *buf, int len); + +/* Event notification */ +static int ioc4_notification (sioport_t *port, int mask, int on); +static int ioc4_rx_timeout (sioport_t *port, int timeout); + +/* Modem control */ +static int ioc4_set_DTR (sioport_t *port, int dtr); +static int ioc4_set_RTS (sioport_t *port, int rts); +static int ioc4_query_DCD (sioport_t *port); +static int ioc4_query_CTS (sioport_t *port); + +/* Output mode */ +static int ioc4_set_proto (sioport_t *port, enum sio_proto proto); + +/* User mapped driver support */ +static int ioc4_get_mapid (sioport_t *port, void *arg); +static int ioc4_set_sscr (sioport_t *port, int arg, int flag); + +static struct serial_calldown ioc4_calldown = { + ioc4_open, + ioc4_config, + ioc4_enable_hfc, + ioc4_set_extclk, + ioc4_write, + ioc4_sync_write, + ioc4_wrflush, /* du flush */ + ioc4_break, + ioc4_enable_tx, + ioc4_read, + ioc4_notification, + ioc4_rx_timeout, + ioc4_set_DTR, + ioc4_set_RTS, + ioc4_query_DCD, + ioc4_query_CTS, + ioc4_set_proto, + ioc4_get_mapid, + 0, + 0, + ioc4_set_sscr +}; + +/* Baud rate stuff */ +#define SET_BAUD(p, b) set_baud_ti(p, b) +static int set_baud_ti(ioc4port_t *, int); + +#ifdef DEBUG +/* Performance characterization logging */ +#define DEBUGINC(x,i) stats.x += i + +static struct { + + /* Ports present */ + uint ports; + + /* Ports killed */ + uint killed; + + /* Interrupt counts */ + uint total_intr; + uint port_0_intr; + uint port_1_intr; + uint ddcd_intr; + uint dcts_intr; + uint rx_timer_intr; + uint rx_high_intr; + uint explicit_intr; + uint mt_intr; + uint mt_lowat_intr; + + /* Write characteristics */ + uint write_bytes; + uint write_cnt; + uint wrote_bytes; + uint tx_buf_used; + uint tx_buf_cnt; + uint tx_pio_cnt;691 + + /* Read characteristics */ + uint read_bytes; + uint read_cnt; + uint drain; + uint drainwait; + uint resetdma; + uint read_ddcd; + uint rx_overrun; + uint parity; + uint framing; + uint brk; + uint red_bytes; + uint rx_buf_used; + uint rx_buf_cnt; + + /* Errors */ + uint dma_lost; + uint read_aborted; + uint read_aborted_detected; +} stats; + +#else +#define DEBUGINC(x,i) +#endif + +/* Infinite loop detection. + */ +#define MAXITER 1000000 +#define SPIN(cond, success) \ +{ \ + int spiniter = 0; \ + success = 1; \ + while(cond) { \ + spiniter++; \ + if (spiniter > MAXITER) { \ + success = 0; \ + break; \ + } \ + } \ +} + + +static iopaddr_t +ring_dmatrans(vertex_hdl_t conn_vhdl, caddr_t vaddr) +{ + extern iopaddr_t pciio_dma_addr (vertex_hdl_t, device_desc_t, paddr_t, + size_t, pciio_dmamap_t *, unsigned); + iopaddr_t paddr = (iopaddr_t)vaddr; + + if (conn_vhdl != GRAPH_VERTEX_NONE) +#ifdef USE_64BIT_DMA + /* Use 64-bit DMA address when the IOC4 supports it */ + return pciio_dmatrans_addr (conn_vhdl, 0, paddr, TOTAL_RING_BUF_SIZE, PCIIO_DMA_A64 | PCIIO_BYTE_STREAM); + +#else + /* Use 32-bit DMA address for current IOC4 */ + return pciio_dma_addr (conn_vhdl, 0, paddr, TOTAL_RING_BUF_SIZE, NULL, PCIIO_BYTE_STREAM); +#endif + + return paddr; +} + + +/* If interrupt routine called enable_intrs, then would need to write + * mask_enable_intrs() routine. + */ +static inline void +mask_disable_intrs(ioc4port_t *port, ioc4reg_t mask) +{ + port->ip_ienb &= ~mask; +} + + +static void +enable_intrs(ioc4port_t *port, ioc4reg_t mask) +{ + struct hooks *hooks = port->ip_hooks; + + if ((port->ip_ienb & mask) != mask) { + IOC4_WRITE_IES(port->ip_ioc4_soft, mask, ioc4_sio_intr_type); + port->ip_ienb |= mask; + } + + if (port->ip_ienb) + IOC4_WRITE_IES(port->ip_ioc4_soft, H_INTR_DMA_ERROR, ioc4_other_intr_type); +} + + +static void +disable_intrs(ioc4port_t *port, ioc4reg_t mask) +{ + struct hooks *hooks = port->ip_hooks; + + if (port->ip_ienb & mask) { + IOC4_WRITE_IEC(port->ip_ioc4_soft, mask, ioc4_sio_intr_type); + port->ip_ienb &= ~mask; + } + + if (!port->ip_ienb) + IOC4_WRITE_IEC(port->ip_ioc4_soft, H_INTR_DMA_ERROR, ioc4_other_intr_type); +} + + +/* Service any pending interrupts on the given port */ +static void +ioc4_serial_intr(intr_arg_t arg, ioc4reg_t sio_ir) +{ + ioc4port_t *port = (ioc4port_t *) arg; + sioport_t *gp = GPORT(port); + struct hooks *hooks = port->ip_hooks; + unsigned rx_high_rd_aborted = 0; + unsigned int flags; + + PROGRESS(); +#ifdef NOT_YET + ASSERT(sio_port_islocked(gp) == 0); +#endif + + /* Possible race condition here: The TX_MT interrupt bit may be + * cleared without the intervention of the interrupt handler, + * e.g. by a write. If the top level interrupt handler reads a + * TX_MT, then some other processor does a write, starting up + * output, then we come in here, see the TX_MT and stop DMA, the + * output started by the other processor will hang. Thus we can + * only rely on TX_MT being legitimate if it is read while the + * port lock is held. Therefore this bit must be ignored in the + * passed in interrupt mask which was read by the top level + * interrupt handler since the port lock was not held at the time + * it was read. We can only rely on this bit being accurate if it + * is read while the port lock is held. So we'll clear it for now, + * and reload it later once we have the port lock. + */ + sio_ir &= ~(H_INTR_TX_MT); + + SIO_LOCK_PORT(gp, flags); + + dprintf(("interrupt: sio_ir 0x%x\n", sio_ir)); + + do { + ioc4reg_t shadow; + + /* Handle a DCD change */ + if (sio_ir & H_INTR_DELTA_DCD) { + DEBUGINC(ddcd_intr, 1); + + PROGRESS(); + /* ACK the interrupt */ + PCI_OUTW(&port->ip_ioc4->sio_ir, H_INTR_DELTA_DCD); + + /* If DCD has raised, notify upper layer. Otherwise + * wait for a record to be posted to notify of a dropped DCD. + */ + shadow = PCI_INW(&port->ip_serial->shadow); + + if (port->ip_notify & N_DDCD) { + PROGRESS(); + if (shadow & IOC4_SHADOW_DCD) /* Notify upper layer of DCD */ + UP_DDCD(gp, 1); + else + port->ip_flags |= DCD_ON; /* Flag delta DCD/no DCD */ + } + } + + /* Handle a CTS change */ + if (sio_ir & H_INTR_DELTA_CTS) { + DEBUGINC(dcts_intr, 1); + PROGRESS(); + + /* ACK the interrupt */ + PCI_OUTW(&port->ip_ioc4->sio_ir, H_INTR_DELTA_CTS); + + shadow = PCI_INW(&port->ip_serial->shadow); + + /* Notify upper layer */ + if (port->ip_notify & N_DCTS) { + if (shadow & IOC4_SHADOW_CTS) + UP_DCTS(gp, 1); + else + UP_DCTS(gp, 0); + } + } + + /* RX timeout interrupt. Must be some data available. Put this + * before the check for RX_HIGH since servicing this condition + * may cause that condition to clear. + */ + if (sio_ir & H_INTR_RX_TIMER) { + PROGRESS(); + DEBUGINC(rx_timer_intr, 1); + + /* ACK the interrupt */ + PCI_OUTW(&port->ip_ioc4->sio_ir, H_INTR_RX_TIMER); + + if (port->ip_notify & N_DATA_READY) + UP_DATA_READY(gp); + } + + /* RX high interrupt. Must be after RX_TIMER. + */ + else if (sio_ir & H_INTR_RX_HIGH) { + DEBUGINC(rx_high_intr, 1); + + PROGRESS(); + /* Data available, notify upper layer */ + if (port->ip_notify & N_DATA_READY) + UP_DATA_READY(gp); + + /* We can't ACK this interrupt. If up_data_ready didn't + * cause the condition to clear, we'll have to disable + * the interrupt until the data is drained by the upper layer. + * If the read was aborted, don't disable the interrupt as + * this may cause us to hang indefinitely. An aborted read + * generally means that this interrupt hasn't been delivered + * to the cpu yet anyway, even though we see it as asserted + * when we read the sio_ir. + */ + if ((sio_ir = PENDING(port)) & H_INTR_RX_HIGH) { + PROGRESS(); + if ((port->ip_flags & READ_ABORTED) == 0) { + mask_disable_intrs(port, H_INTR_RX_HIGH); + port->ip_flags |= INPUT_HIGH; + } + else { + DEBUGINC(read_aborted_detected, 1); + /* We will be stuck in this loop forever, + * higher level will never get time to finish + */ + rx_high_rd_aborted++; + } + } + } + + /* We got a low water interrupt: notify upper layer to + * send more data. Must come before TX_MT since servicing + * this condition may cause that condition to clear. + */ + if (sio_ir & H_INTR_TX_EXPLICIT) { + DEBUGINC(explicit_intr, 1); + PROGRESS(); + + port->ip_flags &= ~LOWAT_WRITTEN; + + /* ACK the interrupt */ + PCI_OUTW(&port->ip_ioc4->sio_ir, H_INTR_TX_EXPLICIT); + + if (port->ip_notify & N_OUTPUT_LOWAT) + UP_OUTPUT_LOWAT(gp); + } + + /* Handle TX_MT. Must come after TX_EXPLICIT. + */ + else if (sio_ir & H_INTR_TX_MT) { + DEBUGINC(mt_intr, 1); + PROGRESS(); + + /* If the upper layer is expecting a lowat notification + * and we get to this point it probably means that for + * some reason the TX_EXPLICIT didn't work as expected + * (that can legitimately happen if the output buffer is + * filled up in just the right way). So sent the notification + * now. + */ + if (port->ip_notify & N_OUTPUT_LOWAT) { + DEBUGINC(mt_lowat_intr, 1); + PROGRESS(); + + if (port->ip_notify & N_OUTPUT_LOWAT) + UP_OUTPUT_LOWAT(gp); + + /* We need to reload the sio_ir since the upcall may + * have caused another write to occur, clearing + * the TX_MT condition. + */ + sio_ir = PENDING(port); + } + + /* If the TX_MT condition still persists even after the upcall, + * we've got some work to do. + */ + if (sio_ir & H_INTR_TX_MT) { + + PROGRESS(); + + /* If we are not currently expecting DMA input, and the + * transmitter has just gone idle, there is no longer any + * reason for DMA, so disable it. + */ + if (!(port->ip_notify & (N_DATA_READY | N_DDCD))) { + ASSERT(port->ip_sscr & IOC4_SSCR_DMA_EN); + port->ip_sscr &= ~IOC4_SSCR_DMA_EN; + PCI_OUTW(&port->ip_serial->sscr, port->ip_sscr); + } + + /* Prevent infinite TX_MT interrupt */ + mask_disable_intrs(port, H_INTR_TX_MT); + } + } + + sio_ir = PENDING(port); + + /* if the read was aborted and only H_INTR_RX_HIGH, + * clear H_INTR_RX_HIGH, so we do not loop forever. + */ + + if ( rx_high_rd_aborted && (sio_ir == H_INTR_RX_HIGH) ) { + sio_ir &= ~H_INTR_RX_HIGH; + } + } while (sio_ir & H_INTR_ALL); + + SIO_UNLOCK_PORT(gp, flags); + + /* Re-enable interrupts before returning from interrupt handler. + * Getting interrupted here is okay. It'll just v() our semaphore, and + * we'll come through the loop again. + */ + + IOC4_WRITE_IES(port->ip_ioc4_soft, port->ip_ienb, ioc4_sio_intr_type); +} + + +/*ARGSUSED*/ + +/* Service any pending DMA error interrupts on the given port */ +static void +ioc4_dma_error_intr(intr_arg_t arg, ioc4reg_t other_ir) +{ + ioc4port_t *port = (ioc4port_t *) arg; + sioport_t *gp = GPORT(port); + struct hooks *hooks = port->ip_hooks; + unsigned int flags; + + SIO_LOCK_PORT(gp, flags); + + dprintf(("interrupt: other_ir 0x%x\n", other_ir)); + + /* ACK the interrupt */ + PCI_OUTW(&port->ip_ioc4->other_ir, H_INTR_DMA_ERROR); + + printk( "DMA error on serial port %p\n", (void *)port->ip_port_vhdl); + + if (port->ip_ioc4->pci_err_addr_l & IOC4_PCI_ERR_ADDR_VLD) { + printk( "PCI error address is 0x%lx, master is serial port %c %s\n", + ((uint64_t) port->ip_ioc4->pci_err_addr_h << 32) | + (port->ip_ioc4->pci_err_addr_l & IOC4_PCI_ERR_ADDR_ADDR_MSK), + '1' + (char) ((port->ip_ioc4->pci_err_addr_l & + IOC4_PCI_ERR_ADDR_MST_NUM_MSK) >> 1), + (port->ip_ioc4->pci_err_addr_l & IOC4_PCI_ERR_ADDR_MST_TYP_MSK) + ? "RX" : "TX"); + + if (port->ip_ioc4->pci_err_addr_l & IOC4_PCI_ERR_ADDR_MUL_ERR) + printk( "Multiple errors occurred\n"); + } + + SIO_UNLOCK_PORT(gp, flags); + + /* Re-enable DMA error interrupts */ + IOC4_WRITE_IES(port->ip_ioc4_soft, H_INTR_DMA_ERROR, ioc4_other_intr_type); +} + + +/* Baud rate setting code */ +static int +set_baud_ti(ioc4port_t *port, int baud) +{ + int actual_baud; + int diff; + int lcr; + unsigned short divisor; + + divisor = SER_DIVISOR(baud, IOC4_SER_XIN_CLK); + if (!divisor) + return(1); + actual_baud = DIVISOR_TO_BAUD(divisor, IOC4_SER_XIN_CLK); + + diff = actual_baud - baud; + if (diff < 0) + diff = -diff; + + /* If we're within 1%, we've found a match */ + if (diff * 100 > actual_baud) + return(1); + + lcr = PCI_INB(&port->ip_uart->i4u_lcr); + + PCI_OUTB(&port->ip_uart->i4u_lcr, lcr | LCR_DLAB); + + PCI_OUTB(&port->ip_uart->i4u_dll, (char) divisor); + + PCI_OUTB(&port->ip_uart->i4u_dlm, (char) (divisor >> 8)); + + PCI_OUTB(&port->ip_uart->i4u_lcr, lcr); + + return(0); +} + + +/* Initialize the sio and ioc4 hardware for a given port */ +static int +hardware_init(ioc4port_t *port) +{ + ioc4reg_t sio_cr; + struct hooks *hooks = port->ip_hooks; + + DEBUGINC(ports, 1); + + /* Idle the IOC4 serial interface */ + PCI_OUTW(&port->ip_serial->sscr, IOC4_SSCR_RESET); + + /* Wait until any pending bus activity for this port has ceased */ + do sio_cr = PCI_INW(&port->ip_ioc4->sio_cr); + while(!(sio_cr & IOC4_SIO_CR_SIO_DIAG_IDLE)); + + /* Finish reset sequence */ + PCI_OUTW(&port->ip_serial->sscr, 0); + + /* Once RESET is done, reload cached tx_prod and rx_cons values + * and set rings to empty by making prod == cons + */ + port->ip_tx_prod = PCI_INW(&port->ip_serial->stcir) & PROD_CONS_MASK; + PCI_OUTW(&port->ip_serial->stpir, port->ip_tx_prod); + + port->ip_rx_cons = PCI_INW(&port->ip_serial->srpir) & PROD_CONS_MASK; + PCI_OUTW(&port->ip_serial->srcir, port->ip_rx_cons); + + /* Disable interrupts for this 16550 */ + PCI_OUTB(&port->ip_uart->i4u_lcr, 0); /* clear DLAB */ + PCI_OUTB(&port->ip_uart->i4u_ier, 0); + + /* Set the default baud */ + SET_BAUD(port, port->ip_baud); + + /* Set line control to 8 bits no parity */ + PCI_OUTB(&port->ip_uart->i4u_lcr, LCR_BITS8 | LCR_1_STOP_BITS); + + /* Enable the FIFOs */ + PCI_OUTB(&port->ip_uart->i4u_fcr, FCR_FIFOEN); + /* then reset 16550 FIFOs */ + PCI_OUTB(&port->ip_uart->i4u_fcr, + FCR_FIFOEN | FCR_RxFIFO | FCR_TxFIFO); + + /* Clear modem control register */ + PCI_OUTB(&port->ip_uart->i4u_mcr, 0); + + /* Clear deltas in modem status register */ + PCI_INB(&port->ip_uart->i4u_msr); + + /* Only do this once per port pair */ + if (port->ip_hooks == &hooks_array[0] || port->ip_hooks == &hooks_array[2]) { + iopaddr_t ring_pci_addr; + volatile ioc4reg_t *sbbr_l; + volatile ioc4reg_t *sbbr_h; + + if(port->ip_hooks == &hooks_array[0]) { + sbbr_l = &port->ip_ioc4->sbbr01_l; + sbbr_h = &port->ip_ioc4->sbbr01_h; + } + else { + sbbr_l = &port->ip_ioc4->sbbr23_l; + sbbr_h = &port->ip_ioc4->sbbr23_h; + } + + /* Set the DMA address */ + ring_pci_addr = ring_dmatrans(port->ip_conn_vhdl, + port->ip_ring_buf_k0); + + PCI_OUTW(sbbr_h, + (ioc4reg_t) ((__psunsigned_t) ring_pci_addr >> 32)); + + PCI_OUTW(sbbr_l, + ((ioc4reg_t) (int64_t) ring_pci_addr | IOC4_BUF_SIZE_BIT)); + +#ifdef IOC4_SIO_DEBUG + { + unsigned int tmp1, tmp2; + + tmp1 = PCI_INW(sbbr_l); + tmp2 = PCI_INW(sbbr_h); + printk("========== %s : sbbr_l [%p]/0x%x sbbr_h [%p]/0x%x\n", + __FUNCTION__, (void *)sbbr_l, tmp1, (void *)sbbr_h, tmp2); + } +#endif + } + + /* Set the receive timeout value to 10 msec */ + PCI_OUTW(&port->ip_serial->srtr, IOC4_SRTR_HZ / 100); + + /* Set RX threshold, enable DMA */ + /* Set high water mark at 3/4 of full ring */ + port->ip_sscr = (ENTRIES_PER_RING * 3 / 4); + + PCI_OUTW(&port->ip_serial->sscr, port->ip_sscr); + + /* Disable and clear all serial related interrupt bits */ + IOC4_WRITE_IEC(port->ip_ioc4_soft, H_INTR_CLEAR, ioc4_sio_intr_type); + port->ip_ienb &= ~H_INTR_CLEAR; + PCI_OUTW(&port->ip_ioc4->sio_ir, H_INTR_CLEAR); + + return(0); +} + + +/* + * Device initialization. + * Called at *_attach() time for each + * IOC4 with serial ports in the system. + * If vhdl is GRAPH_VERTEX_NONE, do not do + * any graph related work; otherwise, it + * is the IOC4 vertex that should be used + * for requesting pciio services. + */ +int +ioc4_serial_attach(vertex_hdl_t conn_vhdl, void *ioc4) +{ + /*REFERENCED*/ + graph_error_t rc; + ioc4_mem_t *ioc4_mem; + vertex_hdl_t port_vhdl, ioc4_vhdl; + vertex_hdl_t intr_dev_vhdl; + ioc4port_t *port; + ioc4port_t *ports[4]; + static char *names[] = { "tty/1", "tty/2", "tty/3", "tty/4" }; + int x, first_port = -1, last_port = -1; + void *ioc4_soft; + unsigned int ioc4_revid_min = 62; + unsigned int ioc4_revid; + + + /* IOC4 firmware must be at least rev 62 */ + ioc4_revid = pciio_config_get(conn_vhdl, PCI_CFG_REV_ID, 1); + + if (ioc4_revid < ioc4_revid_min) { + printk( "IOC4 serial ports not supported on firmware rev %d, please upgrade to rev %d or higher\n", ioc4_revid, ioc4_revid_min); + return -1; + } + + first_port = 0; + last_port = 3; + + /* Get back pointer to the ioc4 soft area */ + rc = hwgraph_traverse(conn_vhdl, EDGE_LBL_IOC4, &ioc4_vhdl); + ASSERT(rc == GRAPH_SUCCESS); + ioc4_soft = (void *)hwgraph_fastinfo_get(ioc4_vhdl); + + /* grab the PIO address */ + ioc4_mem = (ioc4_mem_t *)ioc4; + ASSERT(ioc4_mem != NULL); + + /* + * Create port structures for each port + */ + NEWA(port, 4); +#ifdef IOC4_SIO_DEBUG + printk("%s : [addr 0x%p]\n", __FUNCTION__, (void *)port); +#endif + ports[0] = port++; + ports[1] = port++; + ports[2] = port++; + ports[3] = port++; + +#if DEBUG + { + int slot = atomicAddInt(&next_saveport, 4) - 4; + saveport[slot] = ports[0]; + saveport[slot + 1] = ports[1]; + saveport[slot + 2] = ports[2]; + saveport[slot + 3] = ports[3]; + ASSERT(slot < MAXSAVEPORT); + } +#endif + +#ifdef DEBUG + if ((caddr_t) port != (caddr_t) &(port->ip_sioport)) + panic("sioport is not first member of ioc4port struct\n"); +#endif + + /* Allocate buffers and jumpstart the hardware. + */ + for (x = first_port; x < (last_port + 1); x++) { + + port = ports[x]; +#ifdef IOC4_SIO_DEBUG + printk("%s : initialize port %d [addr 0x%p/0x%p]\n", __FUNCTION__, x, (void *)port, + (void *)GPORT(port)); +#endif + port->ip_ioc4_soft = ioc4_soft; + rc = hwgraph_path_add(conn_vhdl, names[x], &port_vhdl); + ASSERT(rc == GRAPH_SUCCESS); + port->ip_conn_vhdl = conn_vhdl; + port->ip_port_vhdl = port_vhdl; + port->ip_ienb = 0; + hwgraph_fastinfo_set(port_vhdl, (arbitrary_info_t) port); + + /* Perform upper layer initialization. Create all device node + * types including rs422 ports. + */ + ioc4_serial_initport(GPORT(port), x); + port->ip_baud = 9600; + + /* Attach the calldown hooks so upper layer can call our + * routines. + */ + port->ip_sioport.sio_calldown = &ioc4_calldown; + + /* Map in the IOC4 register area */ + port->ip_ioc4 = ioc4_mem; + } + + { + /* Port 0 */ + port = ports[0]; + port->ip_hooks = &hooks_array[0]; + + /* Get direct hooks to the serial regs and uart regs + * for this port + */ + port->ip_serial = &(port->ip_ioc4->port_0); + port->ip_uart = &(port->ip_ioc4->uart_0); +#ifdef IOC4_SIO_DEBUG + printk("==== %s : serial port 0 address 0x%p uart address 0x%p\n", + __FUNCTION__, (void *)port->ip_serial, (void *)port->ip_uart); +#endif + + /* If we don't already have a ring buffer, + * set one up. + */ + if (port->ip_ring_buf_k0 == 0) { + +#if PAGE_SIZE >= TOTAL_RING_BUF_SIZE + if ((port->ip_ring_buf_k0 = kvpalloc(1, VM_DIRECT, 0)) == 0) + panic("ioc4_uart driver cannot allocate page\n"); +#else + /* We need to allocate a chunk of memory on a + * TOTAL_RING_BUF_SIZE boundary. + */ + { + pgno_t pfn; + caddr_t vaddr; + if ((pfn = contig_memalloc(TOTAL_RING_BUF_SIZE / PAGE_SIZE, + TOTAL_RING_BUF_SIZE / PAGE_SIZE, + VM_DIRECT)) == 0) + panic("ioc4_uart driver cannot allocate page\n"); + ASSERT(small_pfn(pfn)); + vaddr = small_pfntova_K0(pfn); + (void) COLOR_VALIDATION(pfdat + pfn, + colorof(vaddr), + 0, VM_DIRECT); + port->ip_ring_buf_k0 = vaddr; + } +#endif + } + ASSERT((((int64_t)port->ip_ring_buf_k0) & + (TOTAL_RING_BUF_SIZE - 1)) == 0); + memset(port->ip_ring_buf_k0, 0, TOTAL_RING_BUF_SIZE); + port->ip_inring = RING(port, RX_0_OR_2); + port->ip_outring = RING(port, TX_0_OR_2); + + /* Initialize the hardware for IOC4 */ + hardware_init(port); + + if (hwgraph_edge_get(ports[0]->ip_port_vhdl, "d", &intr_dev_vhdl) != + GRAPH_SUCCESS) { + intr_dev_vhdl = ports[0]->ip_port_vhdl; + } + + /* Attach interrupt handlers */ + ioc4_intr_connect(conn_vhdl, + ioc4_sio_intr_type, + IOC4_SIO_IR_S0, + ioc4_serial_intr, + ports[0], + ports[0]->ip_port_vhdl, + intr_dev_vhdl); + + ioc4_intr_connect(conn_vhdl, + ioc4_other_intr_type, + IOC4_OTHER_IR_S0_MEMERR, + ioc4_dma_error_intr, + ports[0], + ports[0]->ip_port_vhdl, + intr_dev_vhdl); + } + + { + + /* Port 1 */ + port = ports[1]; + port->ip_hooks = &hooks_array[1]; + + port->ip_serial = &(port->ip_ioc4->port_1); + port->ip_uart = &(port->ip_ioc4->uart_1); +#ifdef IOC4_SIO_DEBUG + printk("==== %s : serial port 1 address 0x%p uart address 0x%p\n", + __FUNCTION__, (void *)port->ip_serial, (void *)port->ip_uart); +#endif + + port->ip_ring_buf_k0 = ports[0]->ip_ring_buf_k0; + port->ip_inring = RING(port, RX_1_OR_3); + port->ip_outring = RING(port, TX_1_OR_3); + + /* Initialize the hardware for IOC4 */ + hardware_init(port); + + if (hwgraph_edge_get(ports[1]->ip_port_vhdl, "d", &intr_dev_vhdl) != + GRAPH_SUCCESS) { + intr_dev_vhdl = ports[1]->ip_port_vhdl; + } + + /* Attach interrupt handler */ + ioc4_intr_connect(conn_vhdl, + ioc4_sio_intr_type, + IOC4_SIO_IR_S1, + ioc4_serial_intr, + ports[1], + ports[1]->ip_port_vhdl, + intr_dev_vhdl); + + ioc4_intr_connect(conn_vhdl, + ioc4_other_intr_type, + IOC4_OTHER_IR_S1_MEMERR, + ioc4_dma_error_intr, + ports[1], + ports[1]->ip_port_vhdl, + intr_dev_vhdl); + } + + { + + /* Port 2 */ + port = ports[2]; + port->ip_hooks = &hooks_array[2]; + + /* Get direct hooks to the serial regs and uart regs + * for this port + */ + port->ip_serial = &(port->ip_ioc4->port_2); + port->ip_uart = &(port->ip_ioc4->uart_2); +#ifdef IOC4_SIO_DEBUG + printk("==== %s : serial port 2 address 0x%p uart address 0x%p\n", + __FUNCTION__, (void *)port->ip_serial, (void *)port->ip_uart); +#endif + + /* If we don't already have a ring buffer, + * set one up. + */ + if (port->ip_ring_buf_k0 == 0) { + +#if PAGE_SIZE >= TOTAL_RING_BUF_SIZE + if ((port->ip_ring_buf_k0 = kvpalloc(1, VM_DIRECT, 0)) == 0) + panic("ioc4_uart driver cannot allocate page\n"); +#else + + /* We need to allocate a chunk of memory on a + * TOTAL_RING_BUF_SIZE boundary. + */ + { + pgno_t pfn; + caddr_t vaddr; + if ((pfn = contig_memalloc(TOTAL_RING_BUF_SIZE / PAGE_SIZE, + TOTAL_RING_BUF_SIZE / PAGE_SIZE, + VM_DIRECT)) == 0) + panic("ioc4_uart driver cannot allocate page\n"); + ASSERT(small_pfn(pfn)); + vaddr = small_pfntova_K0(pfn); + (void) COLOR_VALIDATION(pfdat + pfn, + colorof(vaddr), + 0, VM_DIRECT); + port->ip_ring_buf_k0 = vaddr; + } +#endif + + } + ASSERT((((int64_t)port->ip_ring_buf_k0) & + (TOTAL_RING_BUF_SIZE - 1)) == 0); + memset(port->ip_ring_buf_k0, 0, TOTAL_RING_BUF_SIZE); + port->ip_inring = RING(port, RX_0_OR_2); + port->ip_outring = RING(port, TX_0_OR_2); + + /* Initialize the hardware for IOC4 */ + hardware_init(port); + + if (hwgraph_edge_get(ports[0]->ip_port_vhdl, "d", &intr_dev_vhdl) != + GRAPH_SUCCESS) { + intr_dev_vhdl = ports[2]->ip_port_vhdl; + } + + /* Attach interrupt handler */ + ioc4_intr_connect(conn_vhdl, + ioc4_sio_intr_type, + IOC4_SIO_IR_S2, + ioc4_serial_intr, + ports[2], + ports[2]->ip_port_vhdl, + intr_dev_vhdl); + + ioc4_intr_connect(conn_vhdl, + ioc4_other_intr_type, + IOC4_OTHER_IR_S2_MEMERR, + ioc4_dma_error_intr, + ports[2], + ports[2]->ip_port_vhdl, + intr_dev_vhdl); + } + + { + + /* Port 3 */ + port = ports[3]; + port->ip_hooks = &hooks_array[3]; + + port->ip_serial = &(port->ip_ioc4->port_3); + port->ip_uart = &(port->ip_ioc4->uart_3); +#ifdef IOC4_SIO_DEBUG + printk("==== %s : serial port 3 address 0x%p uart address 0x%p\n", + __FUNCTION__, (void *)port->ip_serial, (void *)port->ip_uart); +#endif + + port->ip_ring_buf_k0 = ports[2]->ip_ring_buf_k0; + port->ip_inring = RING(port, RX_1_OR_3); + port->ip_outring = RING(port, TX_1_OR_3); + + /* Initialize the hardware for IOC4 */ + hardware_init(port); + + if (hwgraph_edge_get(ports[3]->ip_port_vhdl, "d", &intr_dev_vhdl) != + GRAPH_SUCCESS) { + intr_dev_vhdl = ports[3]->ip_port_vhdl; + } + + /* Attach interrupt handler */ + ioc4_intr_connect(conn_vhdl, + ioc4_sio_intr_type, + IOC4_SIO_IR_S3, + ioc4_serial_intr, + ports[3], + ports[3]->ip_port_vhdl, + intr_dev_vhdl); + + ioc4_intr_connect(conn_vhdl, + ioc4_other_intr_type, + IOC4_OTHER_IR_S3_MEMERR, + ioc4_dma_error_intr, + ports[3], + ports[3]->ip_port_vhdl, + intr_dev_vhdl); + } + +#ifdef DEBUG + idbg_addfunc( "ioc4dump", idbg_ioc4dump ); +#endif + + return 0; +} + + +/* Shut down an IOC4 */ +/* ARGSUSED1 */ +void +ioc4_serial_kill(ioc4port_t *port) +{ + DEBUGINC(killed, 1); + + /* Notify upper layer that this port is no longer usable */ + UP_DETACH(GPORT(port)); + + /* Clear everything in the sscr */ + PCI_OUTW(&port->ip_serial->sscr, 0); + port->ip_sscr = 0; + +#ifdef DEBUG + /* Make sure nobody gets past the lock and accesses the hardware */ + port->ip_ioc4 = 0; + port->ip_serial = 0; +#endif + +} + + +/* + * Open a port + */ +static int +ioc4_open(sioport_t *port) +{ + ioc4port_t *p = LPORT(port); + int spin_success; + +#ifdef NOT_YET + ASSERT(L_LOCKED(port, L_OPEN)); +#endif + + p->ip_flags = 0; + p->ip_modem_bits = 0; + + /* Pause the DMA interface if necessary */ + if (p->ip_sscr & IOC4_SSCR_DMA_EN) { + PCI_OUTW(&p->ip_serial->sscr, p->ip_sscr | IOC4_SSCR_DMA_PAUSE); + SPIN((PCI_INW(&p->ip_serial->sscr) & IOC4_SSCR_PAUSE_STATE) == 0, + spin_success); + if (!spin_success) { + NOT_PROGRESS(); + return(-1); + } + } + + /* Reset the input fifo. If the uart received chars while the port + * was closed and DMA is not enabled, the uart may have a bunch of + * chars hanging around in its RX fifo which will not be discarded + * by rclr in the upper layer. We must get rid of them here. + */ + PCI_OUTB(&p->ip_uart->i4u_fcr, FCR_FIFOEN | FCR_RxFIFO); + + /* Set defaults */ + SET_BAUD(p, 9600); + + PCI_OUTB(&p->ip_uart->i4u_lcr, LCR_BITS8 | LCR_1_STOP_BITS); + + /* Re-enable DMA, set default threshold to intr whenever there is + * data available. + */ + p->ip_sscr &= ~IOC4_SSCR_RX_THRESHOLD; + p->ip_sscr |= 1; /* default threshold */ + + /* Plug in the new sscr. This implicitly clears the DMA_PAUSE + * flag if it was set above + */ + PCI_OUTW(&p->ip_serial->sscr, p->ip_sscr); + + PCI_OUTW(&p->ip_serial->srtr, 0); + + p->ip_tx_lowat = 1; + + dprintf(("ioc4 open successful\n")); + + return(0); +} + + +/* + * Config hardware + */ +static int +ioc4_config(sioport_t *port, + int baud, + int byte_size, + int stop_bits, + int parenb, + int parodd) +{ + ioc4port_t *p = LPORT(port); + char lcr, sizebits; + int spin_success; + +#ifdef NOT_YET + ASSERT(L_LOCKED(port, L_CONFIG)); +#endif + + if (SET_BAUD(p, baud)) + return(1); + + switch(byte_size) { + case 5: + sizebits = LCR_BITS5; + break; + case 6: + sizebits = LCR_BITS6; + break; + case 7: + sizebits = LCR_BITS7; + break; + case 8: + sizebits = LCR_BITS8; + break; + default: + dprintf(("invalid byte size port 0x%x size %d\n", port, byte_size)); + return(1); + } + + /* Pause the DMA interface if necessary */ + if (p->ip_sscr & IOC4_SSCR_DMA_EN) { + PCI_OUTW(&p->ip_serial->sscr, p->ip_sscr | IOC4_SSCR_DMA_PAUSE); + SPIN((PCI_INW(&p->ip_serial->sscr) & IOC4_SSCR_PAUSE_STATE) == 0, + spin_success); + if (!spin_success) + return(-1); + } + + /* Clear relevant fields in lcr */ + lcr = PCI_INB(&p->ip_uart->i4u_lcr); + lcr &= ~(LCR_MASK_BITS_CHAR | LCR_EPS | + LCR_PEN | LCR_MASK_STOP_BITS); + + /* Set byte size in lcr */ + lcr |= sizebits; + + /* Set parity */ + if (parenb) { + lcr |= LCR_PEN; + if (!parodd) + lcr |= LCR_EPS; + } + + /* Set stop bits */ + if (stop_bits) + lcr |= LCR_2_STOP_BITS; + + PCI_OUTB(&p->ip_uart->i4u_lcr, lcr); + + dprintf(("ioc4_config: lcr bits 0x%x\n", lcr)); + + /* Re-enable the DMA interface if necessary */ + if (p->ip_sscr & IOC4_SSCR_DMA_EN) { + PCI_OUTW(&p->ip_serial->sscr, p->ip_sscr); + } + + p->ip_baud = baud; + + /* When we get within this number of ring entries of filling the + * entire ring on TX, place an EXPLICIT intr to generate a lowat + * notification when output has drained. + */ + p->ip_tx_lowat = (TX_LOWAT_CHARS(baud) + 3) / 4; + if (p->ip_tx_lowat == 0) + p->ip_tx_lowat = 1; + + ioc4_rx_timeout(port, p->ip_rx_timeout); + + return(0); +} + + +/* + * Enable hardware flow control + */ +static int +ioc4_enable_hfc(sioport_t *port, int enable) +{ + ioc4port_t *p = LPORT(port); + +#ifdef NOT_YET + ASSERT(L_LOCKED(port, L_ENABLE_HFC)); +#endif + + dprintf(("enable hfc port 0x%p, enb %d\n", (void *)port, enable)); + + if (enable) + p->ip_sscr |= IOC4_SSCR_HFC_EN; + else + p->ip_sscr &= ~IOC4_SSCR_HFC_EN; + + PCI_OUTW(&p->ip_serial->sscr, p->ip_sscr); + + return(0); +} + + +/* + * Set external clock + */ +/*ARGSUSED*/ +static int +ioc4_set_extclk(sioport_t *port, int clock_factor) +{ +#ifdef NOT_YET + ASSERT(L_LOCKED(port, L_SET_EXTCLK)); + /* XXX still todo */ +#endif + + /* only support 0 (no external clock) */ + return(clock_factor); +} + + +/* + * Write bytes to the hardware. Returns the number of bytes + * actually written. + */ +static int +do_ioc4_write(sioport_t *port, char *buf, int len) +{ + int prod_ptr, cons_ptr, total; + struct ring *outring; + struct ring_entry *entry; + ioc4port_t *p = LPORT(port); + struct hooks *hooks = p->ip_hooks; + + DEBUGINC(write_bytes, len); + DEBUGINC(write_cnt, 1); + + dprintf(("write port 0x%p, len %d\n", (void *)port, len)); + + ASSERT(len >= 0); + + prod_ptr = p->ip_tx_prod; + cons_ptr = PCI_INW(&p->ip_serial->stcir) & PROD_CONS_MASK; + outring = p->ip_outring; + + /* Maintain a 1-entry red-zone. The ring buffer is full when + * (cons - prod) % ring_size is 1. Rather than do this subtraction + * in the body of the loop, I'll do it now. + */ + cons_ptr = (cons_ptr - (int) sizeof(struct ring_entry)) & PROD_CONS_MASK; + + total = 0; + /* Stuff the bytes into the output */ + while ((prod_ptr != cons_ptr) && (len > 0)) { + int x; + + /* Go 4 bytes (one ring entry) at a time */ + entry = (struct ring_entry*) ((caddr_t)outring + prod_ptr); + + /* Invalidate all entries */ + entry->ring_allsc = 0; + + /* Copy in some bytes */ + for(x = 0; (x < 4) && (len > 0); x++) { + entry->ring_data[x] = *buf++; + entry->ring_sc[x] = IOC4_TXCB_VALID; + len--; + total++; + } + + DEBUGINC(tx_buf_used, x); + DEBUGINC(tx_buf_cnt, 1); + + /* If we are within some small threshold of filling up the entire + * ring buffer, we must place an EXPLICIT intr here to generate + * a lowat interrupt in case we subsequently really do fill up + * the ring and the caller goes to sleep. No need to place + * more than one though. + */ + if (!(p->ip_flags & LOWAT_WRITTEN) && + ((cons_ptr - prod_ptr) & PROD_CONS_MASK) <= + p->ip_tx_lowat * (int)sizeof(struct ring_entry)) { + p->ip_flags |= LOWAT_WRITTEN; + entry->ring_sc[0] |= IOC4_TXCB_INT_WHEN_DONE; + dprintf(("write placing TX_EXPLICIT\n")); + } + + /* Go on to next entry */ + prod_ptr = (prod_ptr + (int) sizeof(struct ring_entry)) & PROD_CONS_MASK; + } + + /* If we sent something, start DMA if necessary */ + if (total > 0 && !(p->ip_sscr & IOC4_SSCR_DMA_EN)) { + p->ip_sscr |= IOC4_SSCR_DMA_EN; + PCI_OUTW(&p->ip_serial->sscr, p->ip_sscr); + } + + /* Store the new producer pointer. If TX is disabled, we stuff the + * data into the ring buffer, but we don't actually start TX. + */ + if (!(p->ip_flags & TX_DISABLED)) { + PCI_OUTW(&p->ip_serial->stpir, prod_ptr); + + /* If we are now transmitting, enable TX_MT interrupt so we + * can disable DMA if necessary when the TX finishes. + */ + if (total > 0) + enable_intrs(p, H_INTR_TX_MT); + } + p->ip_tx_prod = prod_ptr; + + dprintf(("write port 0x%p, wrote %d\n", (void *)port, total)); + DEBUGINC(wrote_bytes, total); + return(total); +} + + +/* Asynchronous write */ +static int +ioc4_write(sioport_t *port, char *buf, int len) +{ +#ifdef NOT_YET + ASSERT(L_LOCKED(port, L_WRITE)); +#endif + return(do_ioc4_write(port, buf, len)); +} + + +/* Synchronous write */ +static int +ioc4_sync_write(sioport_t *port, char *buf, int len) +{ + int bytes; + + ASSERT(sio_port_islocked(port)); + bytes = do_ioc4_write(port, buf, len); + + /* Don't allow the system to hang if XOFF is in force */ + if (len > 0 && bytes == 0 && (LPORT(port)->ip_flags & TX_DISABLED)) + ioc4_enable_tx(port, 1); + + return(bytes); +} + + +/* Write flush */ +static void +ioc4_wrflush(sioport_t *port) +{ + ioc4port_t *p = LPORT(port); + + ASSERT(sio_port_islocked(port)); + + /* We can't flush if TX is disabled due to XOFF. */ + if (!(PCI_INW(&p->ip_ioc4->sio_ir) & IOC4_SIO_IR_S0_TX_MT) && + (p->ip_flags & TX_DISABLED)) + ioc4_enable_tx(port, 1); + + /* Spin waiting for TX_MT to assert only if DMA is enabled. If we + * are panicking and one of the other processors is already in + * symmon, DMA will be disabled and TX_MT will never be asserted. + * There may also be legitimate cases in the kernel where DMA is + * disabled and we won't flush correctly here. + */ + + while ((PCI_INW(&p->ip_serial->sscr) & (IOC4_SSCR_DMA_EN | + IOC4_SSCR_PAUSE_STATE)) == IOC4_SSCR_DMA_EN && + !(PCI_INW(&p->ip_ioc4->sio_ir) & IOC4_SIO_IR_S0_TX_MT)) { + udelay(5); + } +} + + +/* + * Set or clear break condition on output + */ +static int +ioc4_break(sioport_t *port, int brk) +{ + ioc4port_t *p = LPORT(port); + char lcr; + int spin_success; + +#ifdef NOT_YET + ASSERT(L_LOCKED(port, L_BREAK)); +#endif + + /* Pause the DMA interface if necessary */ + if (p->ip_sscr & IOC4_SSCR_DMA_EN) { + PCI_OUTW(&p->ip_serial->sscr, p->ip_sscr | IOC4_SSCR_DMA_PAUSE); + SPIN((PCI_INW(&p->ip_serial->sscr) & IOC4_SSCR_PAUSE_STATE) == 0, + spin_success); + if (!spin_success) + return(-1); + } + + lcr = PCI_INB(&p->ip_uart->i4u_lcr); + if (brk) { + /* Set break */ + PCI_OUTB(&p->ip_uart->i4u_lcr, lcr | LCR_SNDBRK); + } + else { + /* Clear break */ + PCI_OUTB(&p->ip_uart->i4u_lcr, lcr & ~LCR_SNDBRK); + } + + /* Re-enable the DMA interface if necessary */ + if (p->ip_sscr & IOC4_SSCR_DMA_EN) { + PCI_OUTW(&p->ip_serial->sscr, p->ip_sscr); + } + + dprintf(("break port 0x%p, brk %d\n", (void *)port, brk)); + + return(0); +} + + +static int +ioc4_enable_tx(sioport_t *port, int enb) +{ + ioc4port_t *p = LPORT(port); + struct hooks *hooks = p->ip_hooks; + int spin_success; + +#ifdef NOT_YET + ASSERT(L_LOCKED(port, L_ENABLE_TX)); +#endif + + /* If we're already in the desired state, we're done */ + if ((enb && !(p->ip_flags & TX_DISABLED)) || + (!enb && (p->ip_flags & TX_DISABLED))) + return(0); + + /* Pause DMA */ + if (p->ip_sscr & IOC4_SSCR_DMA_EN) { + PCI_OUTW(&p->ip_serial->sscr, p->ip_sscr | IOC4_SSCR_DMA_PAUSE); + SPIN((PCI_INW(&p->ip_serial->sscr) & IOC4_SSCR_PAUSE_STATE) == 0, + spin_success); + if (!spin_success) + return(-1); + } + + if (enb) { + p->ip_flags &= ~TX_DISABLED; + PCI_OUTW(&p->ip_serial->stpir, p->ip_tx_prod); + enable_intrs(p, H_INTR_TX_MT); + } + else { + ioc4reg_t txcons = PCI_INW(&p->ip_serial->stcir) & PROD_CONS_MASK; + p->ip_flags |= TX_DISABLED; + disable_intrs(p, H_INTR_TX_MT); + + /* Only move the transmit producer pointer back if the + * transmitter is not already empty, otherwise we'll be + * generating a bogus entry. + */ + if (txcons != p->ip_tx_prod) + PCI_OUTW(&p->ip_serial->stpir, + (txcons + (int) sizeof(struct ring_entry)) & PROD_CONS_MASK); + } + + /* Re-enable the DMA interface if necessary */ + if (p->ip_sscr & IOC4_SSCR_DMA_EN) + PCI_OUTW(&p->ip_serial->sscr, p->ip_sscr); + + return(0); +} + + +/* + * Read in bytes from the hardware. Return the number of bytes + * actually read. + */ +static int +ioc4_read(sioport_t *port, char *buf, int len) +{ + int prod_ptr, cons_ptr, total, x, spin_success; + struct ring *inring; + ioc4port_t *p = LPORT(port); + struct hooks *hooks = p->ip_hooks; + +#ifdef NOT_YET + ASSERT(L_LOCKED(port, L_READ)); +#endif + + dprintf(("read port 0x%p, len %d\n", (void *)port, len)); + + DEBUGINC(read_bytes, len); + DEBUGINC(read_cnt, 1); + + ASSERT(len >= 0); + + /* There is a nasty timing issue in the IOC4. When the RX_TIMER + * expires or the RX_HIGH condition arises, we take an interrupt. + * At some point while servicing the interrupt, we read bytes from + * the ring buffer and re-arm the RX_TIMER. However the RX_TIMER is + * not started until the first byte is received *after* it is armed, + * and any bytes pending in the RX construction buffers are not drained + * to memory until either there are 4 bytes available or the RX_TIMER + * expires. This leads to a potential situation where data is left + * in the construction buffers forever because 1 to 3 bytes were received + * after the interrupt was generated but before the RX_TIMER was re-armed. + * At that point as long as no subsequent bytes are received the + * timer will never be started and the bytes will remain in the + * construction buffer forever. The solution is to execute a DRAIN + * command after rearming the timer. This way any bytes received before + * the DRAIN will be drained to memory, and any bytes received after + * the DRAIN will start the TIMER and be drained when it expires. + * Luckily, this only needs to be done when the DMA buffer is empty + * since there is no requirement that this function return all + * available data as long as it returns some. + */ + /* Re-arm the timer */ + PCI_OUTW(&p->ip_serial->srcir, p->ip_rx_cons | IOC4_SRCIR_ARM); + + prod_ptr = PCI_INW(&p->ip_serial->srpir) & PROD_CONS_MASK; + cons_ptr = p->ip_rx_cons; + + if (prod_ptr == cons_ptr) { + int reset_dma = 0; + + /* Input buffer appears empty, do a flush. */ + + /* DMA must be enabled for this to work. */ + if (!(p->ip_sscr & IOC4_SSCR_DMA_EN)) { + p->ip_sscr |= IOC4_SSCR_DMA_EN; + reset_dma = 1; + } + + /* Potential race condition: we must reload the srpir after + * issuing the drain command, otherwise we could think the RX + * buffer is empty, then take a very long interrupt, and when + * we come back it's full and we wait forever for the drain to + * complete. + */ + PCI_OUTW(&p->ip_serial->sscr, p->ip_sscr | IOC4_SSCR_RX_DRAIN); + prod_ptr = PCI_INW(&p->ip_serial->srpir) & PROD_CONS_MASK; + + DEBUGINC(drain, 1); + + /* We must not wait for the DRAIN to complete unless there are + * at least 8 bytes (2 ring entries) available to receive the data + * otherwise the DRAIN will never complete and we'll deadlock here. + * In fact, to make things easier, I'll just ignore the flush if + * there is any data at all now available. + */ + if (prod_ptr == cons_ptr) { + DEBUGINC(drainwait, 1); + SPIN(PCI_INW(&p->ip_serial->sscr) & IOC4_SSCR_RX_DRAIN, spin_success); + if (!spin_success) + return(-1); + + /* SIGH. We have to reload the prod_ptr *again* since + * the drain may have caused it to change + */ + prod_ptr = PCI_INW(&p->ip_serial->srpir) & PROD_CONS_MASK; + } + + if (reset_dma) { + DEBUGINC(resetdma, 1); + p->ip_sscr &= ~IOC4_SSCR_DMA_EN; + PCI_OUTW(&p->ip_serial->sscr, p->ip_sscr); + } + } + inring = p->ip_inring; + + p->ip_flags &= ~READ_ABORTED; + + total = 0; + /* Grab bytes from the hardware */ + while(prod_ptr != cons_ptr && len > 0) { + struct ring_entry *entry; + + entry = (struct ring_entry *) ((caddr_t)inring + cons_ptr); + + /* According to the producer pointer, this ring entry + * must contain some data. But if the PIO happened faster + * than the DMA, the data may not be available yet, so let's + * wait until it arrives. + */ + if ((((volatile struct ring_entry *) entry)->ring_allsc & + RING_ANY_VALID) == 0) { + + /* Indicate the read is aborted so we don't disable + * the interrupt thinking that the consumer is + * congested. + */ + p->ip_flags |= READ_ABORTED; + + DEBUGINC(read_aborted, 1); + len = 0; + break; + + } + + /* Load the bytes/status out of the ring entry */ + for(x = 0; x < 4 && len > 0; x++) { + char *sc = &(entry->ring_sc[x]); + + /* Check for change in modem state or overrun */ + if (*sc & IOC4_RXSB_MODEM_VALID) { + if (p->ip_notify & N_DDCD) { + + /* Notify upper layer if DCD dropped */ + if ((p->ip_flags & DCD_ON) && !(*sc & IOC4_RXSB_DCD)) { + + /* If we have already copied some data, return + * it. We'll pick up the carrier drop on the next + * pass. That way we don't throw away the data + * that has already been copied back to the caller's + * buffer. + */ + if (total > 0) { + len = 0; + break; + } + + p->ip_flags &= ~DCD_ON; + + /* Turn off this notification so the carrier + * drop protocol won't see it again when it + * does a read. + */ + *sc &= ~IOC4_RXSB_MODEM_VALID; + + /* To keep things consistent, we need to update + * the consumer pointer so the next reader won't + * come in and try to read the same ring entries + * again. This must be done here before the call + * to UP_DDCD since UP_DDCD may do a recursive + * read! + */ + if ((entry->ring_allsc & RING_ANY_VALID) == 0) + cons_ptr = + (cons_ptr + (int) sizeof(struct ring_entry)) & + PROD_CONS_MASK; + + PCI_OUTW(&p->ip_serial->srcir, cons_ptr); + p->ip_rx_cons = cons_ptr; + + /* Notify upper layer of carrier drop */ + if (p->ip_notify & N_DDCD) + UP_DDCD(port, 0); + + DEBUGINC(read_ddcd, 1); + + /* If we had any data to return, we would have + * returned it above. + */ + return(0); + } + } + + /* Notify upper layer that an input overrun occurred */ + if ((*sc & IOC4_RXSB_OVERRUN) && (p->ip_notify & N_OVERRUN_ERROR)) { + DEBUGINC(rx_overrun, 1); + UP_NCS(port, NCS_OVERRUN); + } + + /* Don't look at this byte again */ + *sc &= ~IOC4_RXSB_MODEM_VALID; + } + + /* Check for valid data or RX errors */ + if (*sc & IOC4_RXSB_DATA_VALID) { + if ((*sc & (IOC4_RXSB_PAR_ERR | IOC4_RXSB_FRAME_ERR | + IOC4_RXSB_BREAK)) && + (p->ip_notify & (N_PARITY_ERROR | N_FRAMING_ERROR | N_BREAK))) { + + /* There is an error condition on the next byte. If + * we have already transferred some bytes, we'll stop + * here. Otherwise if this is the first byte to be read, + * we'll just transfer it alone after notifying the + * upper layer of its status. + */ + if (total > 0) { + len = 0; + break; + } + else { + if ((*sc & IOC4_RXSB_PAR_ERR) && + (p->ip_notify & N_PARITY_ERROR)) { + DEBUGINC(parity, 1); + UP_NCS(port, NCS_PARITY); + } + + if ((*sc & IOC4_RXSB_FRAME_ERR) && + (p->ip_notify & N_FRAMING_ERROR)) { + DEBUGINC(framing, 1); + UP_NCS(port, NCS_FRAMING); + } + + if ((*sc & IOC4_RXSB_BREAK) && + (p->ip_notify & N_BREAK)) { + DEBUGINC(brk, 1); + UP_NCS(port, NCS_BREAK); + } + len = 1; + } + } + + *sc &= ~IOC4_RXSB_DATA_VALID; + *buf++ = entry->ring_data[x]; + len--; + total++; + } + } + + DEBUGINC(rx_buf_used, x); + DEBUGINC(rx_buf_cnt, 1); + + /* If we used up this entry entirely, go on to the next one, + * otherwise we must have run out of buffer space, so + * leave the consumer pointer here for the next read in case + * there are still unread bytes in this entry. + */ + if ((entry->ring_allsc & RING_ANY_VALID) == 0) + cons_ptr = (cons_ptr + (int) sizeof(struct ring_entry)) & + PROD_CONS_MASK; + } + + /* Update consumer pointer and re-arm RX timer interrupt */ + PCI_OUTW(&p->ip_serial->srcir, cons_ptr); + p->ip_rx_cons = cons_ptr; + + /* If we have now dipped below the RX high water mark and we have + * RX_HIGH interrupt turned off, we can now turn it back on again. + */ + if ((p->ip_flags & INPUT_HIGH) && + (((prod_ptr - cons_ptr) & PROD_CONS_MASK) < + ((p->ip_sscr & IOC4_SSCR_RX_THRESHOLD) << IOC4_PROD_CONS_PTR_OFF))) { + p->ip_flags &= ~INPUT_HIGH; + enable_intrs(p, H_INTR_RX_HIGH); + } + + DEBUGINC(red_bytes, total); + + return(total); +} + + +/* + * Modify event notification + */ +static int +ioc4_notification(sioport_t *port, int mask, int on) +{ + ioc4port_t *p = LPORT(port); + struct hooks *hooks = p->ip_hooks; + ioc4reg_t intrbits, sscrbits; + +#ifdef NOT_YET + ASSERT(L_LOCKED(port, L_NOTIFICATION)); +#endif + ASSERT(mask); + + intrbits = sscrbits = 0; + + if (mask & N_DATA_READY) + intrbits |= (H_INTR_RX_TIMER | H_INTR_RX_HIGH); + if (mask & N_OUTPUT_LOWAT) + intrbits |= H_INTR_TX_EXPLICIT; + if (mask & N_DDCD) { + intrbits |= H_INTR_DELTA_DCD; + sscrbits |= IOC4_SSCR_RX_RING_DCD; + } + if (mask & N_DCTS) + intrbits |= H_INTR_DELTA_CTS; + + if (on) { + enable_intrs(p, intrbits); + p->ip_notify |= mask; + p->ip_sscr |= sscrbits; + } + else { + disable_intrs(p, intrbits); + p->ip_notify &= ~mask; + p->ip_sscr &= ~sscrbits; + } + + /* We require DMA if either DATA_READY or DDCD notification is + * currently requested. If neither of these is requested and + * there is currently no TX in progress, DMA may be disabled. + */ + if (p->ip_notify & (N_DATA_READY | N_DDCD)) + p->ip_sscr |= IOC4_SSCR_DMA_EN; + else if (!(p->ip_ienb & H_INTR_TX_MT)) + p->ip_sscr &= ~IOC4_SSCR_DMA_EN; + + PCI_OUTW(&p->ip_serial->sscr, p->ip_sscr); + return(0); +} + + +/* + * Set RX timeout and threshold values. The upper layer passes in a + * timeout value. In all cases it would like to be notified at least this + * often when there are RX chars coming in. We set the RX timeout and + * RX threshold (based on baud) to ensure that the upper layer is called + * at roughly this interval during normal RX. + * The input timeout value is in ticks. + */ +static int +ioc4_rx_timeout(sioport_t *port, int timeout) +{ + int threshold; + ioc4port_t *p = LPORT(port); + +#ifdef NOT_YET + ASSERT(L_LOCKED(port, L_RX_TIMEOUT)); +#endif + + p->ip_rx_timeout = timeout; + + /* Timeout is in ticks. Let's figure out how many chars we + * can receive at the current baud rate in that interval + * and set the RX threshold to that amount. There are 4 chars + * per ring entry, so we'll divide the number of chars that will + * arrive in timeout by 4. + */ + threshold = timeout * p->ip_baud / 10 / HZ / 4; + if (threshold == 0) + threshold = 1; /* otherwise we'll intr all the time! */ + + if ((unsigned) threshold > (unsigned) IOC4_SSCR_RX_THRESHOLD) + return(1); + + p->ip_sscr &= ~IOC4_SSCR_RX_THRESHOLD; + p->ip_sscr |= threshold; + + PCI_OUTW(&p->ip_serial->sscr, p->ip_sscr); + + /* Now set the RX timeout to the given value */ + timeout = timeout * IOC4_SRTR_HZ / HZ; + if (timeout > IOC4_SRTR_CNT) + timeout = IOC4_SRTR_CNT; + + PCI_OUTW(&p->ip_serial->srtr, timeout); + + return(0); +} + + +static int +set_DTRRTS(sioport_t *port, int val, int mask1, int mask2) +{ + ioc4port_t *p = LPORT(port); + ioc4reg_t shadow; + int spin_success; + char mcr; + + /* XXX need lock for pretty much this entire routine. Makes + * me nervous to hold it for so long. If we crash or hit + * a breakpoint in here, we're hosed. + */ + + /* Pause the DMA interface if necessary */ + if (p->ip_sscr & IOC4_SSCR_DMA_EN) { + PCI_OUTW(&p->ip_serial->sscr, p->ip_sscr | IOC4_SSCR_DMA_PAUSE); + SPIN((PCI_INW(&p->ip_serial->sscr) & IOC4_SSCR_PAUSE_STATE) == 0, + spin_success); + if (!spin_success) + return(-1); + } + + shadow = PCI_INW(&p->ip_serial->shadow); + mcr = (shadow & 0xff000000) >> 24; + + /* Set new value */ + if (val) { + mcr |= mask1; + shadow |= mask2; + } + else { + mcr &= ~mask1; + shadow &= ~mask2; + } + + PCI_OUTB(&p->ip_uart->i4u_mcr, mcr); + + PCI_OUTW(&p->ip_serial->shadow, shadow); + + /* Re-enable the DMA interface if necessary */ + if (p->ip_sscr & IOC4_SSCR_DMA_EN) + PCI_OUTW(&p->ip_serial->sscr, p->ip_sscr); + + return(0); +} + + +static int +ioc4_set_DTR(sioport_t *port, int dtr) +{ +#ifdef NOT_YET + ASSERT(L_LOCKED(port, L_SET_DTR)); +#endif + + dprintf(("set dtr port 0x%p, dtr %d\n", (void *)port, dtr)); + return(set_DTRRTS(port, dtr, MCR_DTR, IOC4_SHADOW_DTR)); +} + + +static int +ioc4_set_RTS(sioport_t *port, int rts) +{ +#ifdef NOT_YET + ASSERT(L_LOCKED(port, L_SET_RTS)); +#endif + + dprintf(("set rts port 0x%p, rts %d\n", (void *)port, rts)); + return(set_DTRRTS(port, rts, MCR_RTS, IOC4_SHADOW_RTS)); +} + + +static int +ioc4_query_DCD(sioport_t *port) +{ + ioc4port_t *p = LPORT(port); + ioc4reg_t shadow; + +#ifdef NOT_YET + ASSERT(L_LOCKED(port, L_QUERY_DCD)); +#endif + + dprintf(("get dcd port 0x%p\n", (void *)port)); + + shadow = PCI_INW(&p->ip_serial->shadow); + + return(shadow & IOC4_SHADOW_DCD); +} + + +static int +ioc4_query_CTS(sioport_t *port) +{ + ioc4port_t *p = LPORT(port); + ioc4reg_t shadow; + +#ifdef NOT_YET + ASSERT(L_LOCKED(port, L_QUERY_CTS)); +#endif + + dprintf(("get cts port 0x%p\n", (void *)port)); + + shadow = PCI_INW(&p->ip_serial->shadow); + + return(shadow & IOC4_SHADOW_CTS); +} + + +static int +ioc4_set_proto(sioport_t *port, enum sio_proto proto) +{ + ioc4port_t *p = LPORT(port); + struct hooks *hooks = p->ip_hooks; + +#ifdef NOT_YET + ASSERT(L_LOCKED(port, L_SET_PROTOCOL)); +#endif + + switch(proto) { + case PROTO_RS232: + /* Clear the appropriate GIO pin */ + PCI_OUTW((&p->ip_ioc4->gppr_0 + H_RS422), 0); + break; + + case PROTO_RS422: + /* Set the appropriate GIO pin */ + PCI_OUTW((&p->ip_ioc4->gppr_0 + H_RS422), 1); + break; + + default: + return(1); + } + + return(0); +} + + +// #define IS_PORT_0(p) ((p)->ip_hooks == &hooks_array[0]) + +static int +ioc4_get_mapid(sioport_t *port, void *arg) +{ + return(0); +} + + +static int +ioc4_set_sscr(sioport_t *port, int arg, int flag) +{ + ioc4port_t *p = LPORT(port); + + if ( flag ) { /* reset arg bits in p->ip_sscr */ + p->ip_sscr &= ~arg; + } else { /* set bits in p->ip_sscr */ + p->ip_sscr |= arg; + } + PCI_OUTW(&p->ip_serial->sscr, p->ip_sscr); + return(p->ip_sscr); +} diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/sn2/klconflib.c linux-2.4.23-pre8/arch/ia64/sn/io/sn2/klconflib.c --- linux-2.4.22/arch/ia64/sn/io/sn2/klconflib.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/sn2/klconflib.c 2003-10-22 22:49:21.000000000 +0000 @@ -39,7 +39,7 @@ static int hasmetarouter; -char brick_types[MAX_BRICK_TYPES + 1] = "crikxdpn%#=012345"; +char brick_types[MAX_BRICK_TYPES + 1] = "crikxdpn%#=vo2345"; lboard_t * find_lboard(lboard_t *start, unsigned char brd_type) @@ -278,6 +278,8 @@ board_name = EDGE_LBL_XBRICK; else if (brd->brd_type == KLTYPE_PEBRICK) board_name = EDGE_LBL_PEBRICK; + else if (brd->brd_type == KLTYPE_OPUSBRICK) + board_name = EDGE_LBL_OPUSBRICK; else if (brd->brd_type == KLTYPE_CGBRICK) board_name = EDGE_LBL_CGBRICK; else @@ -293,23 +295,6 @@ sprintf(path, EDGE_LBL_MODULE "/%s/" EDGE_LBL_SLAB "/%d/%s", buffer, geo_slab(brd->brd_geoid), board_name); } -/* - * Get the module number for a NASID. - */ -moduleid_t -get_module_id(nasid_t nasid) -{ - lboard_t *brd; - - brd = find_lboard((lboard_t *)KL_CONFIG_INFO(nasid), KLTYPE_SNIA); - - if (!brd) - return INVALID_MODULE; - else - return geo_module(brd->brd_geoid); -} - - #define MHZ 1000000 @@ -419,7 +404,13 @@ strcpy(serial_number,""); switch(KLCLASS(board->brd_type)) { case KLCLASS_CPU: { /* Node board */ - klhub_t *hub; + klhub_t *hub; + + if (board->brd_type == KLTYPE_TIO) { + printk("*****board_serial_number_get: Need to support TIO.*****\n"); + strcpy(serial_number,""); + return(0); + } /* Get the hub component information */ hub = (klhub_t *)find_first_component(board, diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/sn2/klgraph.c linux-2.4.23-pre8/arch/ia64/sn/io/sn2/klgraph.c --- linux-2.4.22/arch/ia64/sn/io/sn2/klgraph.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/sn2/klgraph.c 2003-10-22 22:47:34.000000000 +0000 @@ -42,6 +42,7 @@ extern char arg_maxnodes[]; extern u64 klgraph_addr[]; void mark_cpuvertex_as_cpu(vertex_hdl_t vhdl, cpuid_t cpuid); +extern int is_specified(char *); /* @@ -54,7 +55,7 @@ { invent_generic_t *invent; - invent = kern_malloc(size); + invent = kmalloc(size, GFP_KERNEL); if (!invent) return NULL; invent->ig_module = NODE_MODULEID(cnode); @@ -205,6 +206,30 @@ /* ARGSUSED */ void +klhwg_add_ice(vertex_hdl_t node_vertex, klhub_t *hub, cnodeid_t cnode) +{ + vertex_hdl_t myicev; + vertex_hdl_t ice_mon; + int rc; + extern struct file_operations shub_mon_fops; + + (void) hwgraph_path_add(node_vertex, EDGE_LBL_ICE, &myicev); + + HWGRAPH_DEBUG((__FILE__, __FUNCTION__, __LINE__, myicev, NULL, "Created path for ice vertex for TIO node.\n")); + + rc = device_master_set(myicev, node_vertex); + if (rc) + panic("klhwg_add_ice: Unable to create ice vertex.\n"); + + ice_mon = hwgraph_register(myicev, EDGE_LBL_PERFMON, + 0, DEVFS_FL_AUTO_DEVNUM, + 0, 0, + S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP, 0, 0, + &shub_mon_fops, (void *)(long)cnode); +} + +/* ARGSUSED */ +void klhwg_add_hub(vertex_hdl_t node_vertex, klhub_t *hub, cnodeid_t cnode) { vertex_hdl_t myhubv; @@ -214,7 +239,13 @@ GRPRINTF(("klhwg_add_hub: adding %s\n", EDGE_LBL_HUB)); (void) hwgraph_path_add(node_vertex, EDGE_LBL_HUB, &myhubv); + + HWGRAPH_DEBUG((__FILE__, __FUNCTION__,__LINE__, myhubv, NULL, "Created path for hub vertex for Shub node.\n")); + rc = device_master_set(myhubv, node_vertex); + if (rc) + panic("klhwg_add_hub: Unable to create hub vertex.\n"); + hub_mon = hwgraph_register(myhubv, EDGE_LBL_PERFMON, 0, DEVFS_FL_AUTO_DEVNUM, 0, 0, @@ -237,6 +268,8 @@ sprintf(name, "%s/%s/%c", EDGE_LBL_DISABLED, EDGE_LBL_CPU, 'a' + cpu->cpu_info.physid); (void) hwgraph_path_add(node_vertex, name, &my_cpu); + HWGRAPH_DEBUG((__FILE__, __FUNCTION__,__LINE__, my_cpu, NULL, "Created path for disabled cpu slice.\n")); + mark_cpuvertex_as_cpu(my_cpu, cpu_id); device_master_set(my_cpu, node_vertex); @@ -264,6 +297,9 @@ GRPRINTF(("klhwg_add_cpu: adding %s to vertex 0x%p\n", name, node_vertex)); (void) hwgraph_path_add(node_vertex, name, &my_cpu); + + HWGRAPH_DEBUG((__FILE__, __FUNCTION__,__LINE__, my_cpu, NULL, "Created path for active cpu slice.\n")); + mark_cpuvertex_as_cpu(my_cpu, cpu_id); device_master_set(my_cpu, node_vertex); @@ -271,6 +307,7 @@ if (hwgraph_edge_get(node_vertex, EDGE_LBL_CPU, &cpu_dir) == GRAPH_SUCCESS) { sprintf(name, "%c", 'a' + cpu->cpu_info.physid); (void) hwgraph_edge_add(cpu_dir, my_cpu, name); + HWGRAPH_DEBUG((__FILE__, __FUNCTION__,__LINE__, cpu_dir, my_cpu, "Created % from vhdl1 to vhdl2.\n", name)); } klhwg_cpu_invent_info(my_cpu, cnode, cpu); @@ -278,6 +315,41 @@ void +klhwg_add_coretalk(cnodeid_t cnode, nasid_t tio_nasid) +{ + lboard_t *brd; + vertex_hdl_t coretalk_v, icev; + /*REFERENCED*/ + graph_error_t err; + + if ((brd = find_lboard((lboard_t *)KL_CONFIG_INFO(tio_nasid), KLTYPE_IOBRICK_XBOW)) == NULL) + return; + + if (KL_CONFIG_DUPLICATE_BOARD(brd)) + return; + + icev = cnodeid_to_vertex(cnode); + + err = hwgraph_path_add(icev, EDGE_LBL_CORETALK, &coretalk_v); + if (err != GRAPH_SUCCESS) { + if (err == GRAPH_DUP) + printk(KERN_WARNING "klhwg_add_coretalk: Check for " + "working routers and router links!"); + + panic("klhwg_add_coretalkk: Failed to add " + "edge: vertex 0x%p to vertex 0x%p," + "error %d\n", + (void *)icev, (void *)coretalk_v, err); + } + + HWGRAPH_DEBUG((__FILE__, __FUNCTION__, __LINE__, coretalk_v, NULL, "Created coretalk path for TIO node.\n")); + + NODEPDA(cnode)->xbow_vhdl = coretalk_v; + +} + + +void klhwg_add_xbow(cnodeid_t cnode, nasid_t nasid) { lboard_t *brd; @@ -295,9 +367,6 @@ if (KL_CONFIG_DUPLICATE_BOARD(brd)) return; - GRPRINTF(("klhwg_add_xbow: adding cnode %d nasid %d xbow edges\n", - cnode, nasid)); - if ((xbow_p = (klxbow_t *)find_component(brd, NULL, KLSTRUCT_XBOW)) == NULL) return; @@ -326,11 +395,14 @@ printk(KERN_WARNING "klhwg_add_xbow: Check for " "working routers and router links!"); - PRINT_PANIC("klhwg_add_xbow: Failed to add " + panic("klhwg_add_xbow: Failed to add " "edge: vertex 0x%p to vertex 0x%p," "error %d\n", (void *)hubv, (void *)xbow_v, err); } + + HWGRAPH_DEBUG((__FILE__, __FUNCTION__, __LINE__, xbow_v, NULL, "Created path for xtalk.\n")); + xswitch_vertex_init(xbow_v); NODEPDA(hub_cnode)->xbow_vhdl = xbow_v; @@ -345,14 +417,71 @@ hub_nasid; } - GRPRINTF(("klhwg_add_xbow: adding port nasid %d %s to vertex 0x%p\n", - hub_nasid, EDGE_LBL_XTALK, hubv)); } } /* ARGSUSED */ void +klhwg_add_tionode(vertex_hdl_t hwgraph_root, cnodeid_t cnode) +{ + nasid_t tio_nasid; + lboard_t *brd; + klhub_t *hub; + vertex_hdl_t node_vertex = NULL; + char path_buffer[100]; + int rv; + char *s; + int board_disabled = 0; + + tio_nasid = COMPACT_TO_NASID_NODEID(cnode); + brd = find_lboard((lboard_t *)KL_CONFIG_INFO(tio_nasid), KLTYPE_TIO); + ASSERT(brd); + + /* Generate a hardware graph path for this board. */ + board_to_path(brd, path_buffer); + rv = hwgraph_path_add(hwgraph_root, path_buffer, &node_vertex); + if (rv != GRAPH_SUCCESS) + panic("TIO Node vertex creation failed. " + "Path == %s", path_buffer); + + HWGRAPH_DEBUG((__FILE__, __FUNCTION__, __LINE__, node_vertex, NULL, "Created path for TIO node.\n")); + hub = (klhub_t *)find_first_component(brd, KLSTRUCT_HUB); + ASSERT(hub); + if(hub->hub_info.flags & KLINFO_ENABLE) + board_disabled = 0; + else + board_disabled = 1; + + if(!board_disabled) { + mark_nodevertex_as_node(node_vertex, + cnode + board_disabled * numionodes); + + s = dev_to_name(node_vertex, path_buffer, sizeof(path_buffer)); + NODEPDA(cnode)->hwg_node_name = + kmalloc(strlen(s) + 1, + GFP_KERNEL); + ASSERT_ALWAYS(NODEPDA(cnode)->hwg_node_name != NULL); + strcpy(NODEPDA(cnode)->hwg_node_name, s); + + hubinfo_set(node_vertex, NODEPDA(cnode)->pdinfo); + + /* Set up node board's slot */ + NODEPDA(cnode)->slotdesc = brd->brd_slot; + + /* Set up the module we're in */ + NODEPDA(cnode)->geoid = brd->brd_geoid; + NODEPDA(cnode)->module = module_lookup(geo_module(brd->brd_geoid)); + } + + if(!board_disabled) + klhwg_add_ice(node_vertex, hub, cnode); + +} + + +/* ARGSUSED */ +void klhwg_add_node(vertex_hdl_t hwgraph_root, cnodeid_t cnode) { nasid_t nasid; @@ -367,8 +496,6 @@ nasid = COMPACT_TO_NASID_NODEID(cnode); brd = find_lboard((lboard_t *)KL_CONFIG_INFO(nasid), KLTYPE_SNIA); - GRPRINTF(("klhwg_add_node: Adding cnode %d, nasid %d, brd 0x%p\n", - cnode, nasid, brd)); ASSERT(brd); do { @@ -376,16 +503,11 @@ /* Generate a hardware graph path for this board. */ board_to_path(brd, path_buffer); - - GRPRINTF(("klhwg_add_node: adding %s to vertex 0x%p\n", - path_buffer, hwgraph_root)); rv = hwgraph_path_add(hwgraph_root, path_buffer, &node_vertex); - if (rv != GRAPH_SUCCESS) - PRINT_PANIC("Node vertex creation failed. " - "Path == %s", - path_buffer); + panic("Node vertex creation failed. Path == %s", path_buffer); + HWGRAPH_DEBUG((__FILE__, __FUNCTION__, __LINE__, node_vertex, NULL, "Created path for SHUB node.\n")); hub = (klhub_t *)find_first_component(brd, KLSTRUCT_HUB); ASSERT(hub); if(hub->hub_info.flags & KLINFO_ENABLE) @@ -427,6 +549,8 @@ rv = hwgraph_path_add(node_vertex, EDGE_LBL_CPU, &cpu_dir); if (rv != GRAPH_SUCCESS) panic("klhwg_add_node: Cannot create CPU directory\n"); + HWGRAPH_DEBUG((__FILE__, __FUNCTION__, __LINE__, cpu_dir, NULL, "Created cpu directiry on SHUB node.\n")); + } /* Add each CPU */ @@ -467,48 +591,34 @@ for (cnode = 0; cnode < numnodes; cnode++) { nasid = COMPACT_TO_NASID_NODEID(cnode); - - GRPRINTF(("klhwg_add_all_routers: adding router on cnode %d\n", - cnode)); - brd = find_lboard_class((lboard_t *)KL_CONFIG_INFO(nasid), KLTYPE_ROUTER); - if (!brd) /* No routers stored in this node's memory */ continue; do { ASSERT(brd); - GRPRINTF(("Router board struct is %p\n", brd)); /* Don't add duplicate boards. */ if (brd->brd_flags & DUPLICATE_BOARD) continue; - GRPRINTF(("Router 0x%p module number is %d\n", brd, brd->brd_geoid)); /* Generate a hardware graph path for this board. */ board_to_path(brd, path_buffer); - GRPRINTF(("Router path is %s\n", path_buffer)); - /* Add the router */ - GRPRINTF(("klhwg_add_all_routers: adding %s to vertex 0x%p\n", - path_buffer, hwgraph_root)); rv = hwgraph_path_add(hwgraph_root, path_buffer, &node_vertex); - if (rv != GRAPH_SUCCESS) - PRINT_PANIC("Router vertex creation " + panic("Router vertex creation " "failed. Path == %s", path_buffer); - GRPRINTF(("klhwg_add_all_routers: get next board from 0x%p\n", - brd)); + HWGRAPH_DEBUG((__FILE__, __FUNCTION__, __LINE__, node_vertex, NULL, "Created router path.\n")); + /* Find the rest of the routers stored on this node. */ } while ( (brd = find_lboard_class(KLCF_NEXT(brd), KLTYPE_ROUTER)) ); - - GRPRINTF(("klhwg_add_all_routers: Done.\n")); } } @@ -527,13 +637,8 @@ int port; lboard_t *dest_brd; - GRPRINTF(("klhwg_connect_one_router: Connecting router on cnode %d\n", - cnode)); - /* Don't add duplicate boards. */ if (brd->brd_flags & DUPLICATE_BOARD) { - GRPRINTF(("klhwg_connect_one_router: Duplicate router 0x%p on cnode %d\n", - brd, cnode)); return; } @@ -550,7 +655,7 @@ /* We don't know what to do with multiple router components */ if (brd->brd_numcompts != 1) { - PRINT_PANIC("klhwg_connect_one_router: %d cmpts on router\n", + panic("klhwg_connect_one_router: %d cmpts on router\n", brd->brd_numcompts); return; } @@ -584,15 +689,12 @@ if (rc != GRAPH_SUCCESS) { if (is_specified(arg_maxnodes) && KL_CONFIG_DUPLICATE_BOARD(dest_brd)) continue; - PRINT_PANIC("Can't find router: %s", dest_path); + panic("Can't find router: %s", dest_path); } - GRPRINTF(("klhwg_connect_one_router: Link from %s/%d to %s\n", - path_buffer, port, dest_path)); sprintf(dest_path, "%d", port); rc = hwgraph_edge_add(router_hndl, dest_hndl, dest_path); - if (rc == GRAPH_DUP) { GRPRINTF(("Skipping port %d. nasid %d %s/%s\n", port, router->rou_port[port].port_nasid, @@ -601,8 +703,10 @@ } if (rc != GRAPH_SUCCESS && !is_specified(arg_maxnodes)) - PRINT_PANIC("Can't create edge: %s/%s to vertex 0x%p error 0x%x\n", + panic("Can't create edge: %s/%s to vertex 0x%p error 0x%x\n", path_buffer, dest_path, (void *)dest_hndl, rc); + + HWGRAPH_DEBUG((__FILE__, __FUNCTION__, __LINE__, router_hndl, dest_hndl, "Created edge %s from vhdl1 to vhdl2.\n", dest_path)); } } @@ -656,14 +760,16 @@ graph_error_t rc; int port; - for (cnode = 0; cnode < numnodes; cnode++) { + for (cnode = 0; cnode < numionodes; cnode++) { nasid = COMPACT_TO_NASID_NODEID(cnode); - GRPRINTF(("klhwg_connect_hubs: Connecting hubs on cnode %d\n", - cnode)); - - brd = find_lboard((lboard_t *)KL_CONFIG_INFO(nasid), KLTYPE_SNIA); - ASSERT(brd); + if (!(nasid & 1)) { + brd = find_lboard((lboard_t *)KL_CONFIG_INFO(nasid), KLTYPE_SNIA); + ASSERT(brd); + } else { + brd = find_lboard((lboard_t *)KL_CONFIG_INFO(nasid), KLTYPE_TIO); + ASSERT(brd); + } hub = (klhub_t *)find_first_component(brd, KLSTRUCT_HUB); ASSERT(hub); @@ -680,10 +786,7 @@ /* Generate a hardware graph path for this board. */ board_to_path(brd, path_buffer); - - GRPRINTF(("klhwg_connect_hubs: Hub path is %s.\n", path_buffer)); rc = hwgraph_traverse(hwgraph_root, path_buffer, &hub_hndl); - if (rc != GRAPH_SUCCESS) printk(KERN_WARNING "Can't find hub: %s", path_buffer); @@ -699,7 +802,7 @@ if (rc != GRAPH_SUCCESS) { if (is_specified(arg_maxnodes) && KL_CONFIG_DUPLICATE_BOARD(dest_brd)) continue; - PRINT_PANIC("Can't find board: %s", dest_path); + panic("Can't find board: %s", dest_path); } else { char buf[1024]; @@ -708,13 +811,18 @@ path_buffer, dest_path)); rc = hwgraph_path_add(hub_hndl, EDGE_LBL_INTERCONNECT, &hub_hndl); + + HWGRAPH_DEBUG((__FILE__, __FUNCTION__, __LINE__, hub_hndl, NULL, "Created link path.\n")); + sprintf(buf,"%s/%s",path_buffer,EDGE_LBL_INTERCONNECT); rc = hwgraph_traverse(hwgraph_root, buf, &hub_hndl); sprintf(buf,"%d",port); rc = hwgraph_edge_add(hub_hndl, dest_hndl, buf); + HWGRAPH_DEBUG((__FILE__, __FUNCTION__, __LINE__, hub_hndl, dest_hndl, "Created edge %s from vhdl1 to vhdl2.\n", buf)); + if (rc != GRAPH_SUCCESS) - PRINT_PANIC("Can't create edge: %s/%s to vertex 0x%p, error 0x%x\n", + panic("Can't create edge: %s/%s to vertex 0x%p, error 0x%x\n", path_buffer, dest_path, (void *)dest_hndl, rc); } @@ -806,7 +914,8 @@ rc = hwgraph_path_add(hwgraph_root, name, &module_vhdl); ASSERT(rc == GRAPH_SUCCESS); - rc = rc; + rc = rc; /* Shut the compiler up */ + HWGRAPH_DEBUG((__FILE__, __FUNCTION__, __LINE__, module_vhdl, NULL, "Created module path.\n")); hwgraph_fastinfo_set(module_vhdl, (arbitrary_info_t) modules[cm]); @@ -816,12 +925,13 @@ buffer); rc = hwgraph_path_add(hwgraph_root, name, &vhdl); - ASSERT_ALWAYS(rc == GRAPH_SUCCESS); - rc = rc; + ASSERT_ALWAYS(rc == GRAPH_SUCCESS); + rc = rc; /* Shut the compiler up */ + HWGRAPH_DEBUG((__FILE__, __FUNCTION__, __LINE__, vhdl, NULL, "Created L1 path.\n")); hwgraph_info_add_LBL(vhdl, INFO_LBL_ELSC, - (arbitrary_info_t) (__psint_t) 1); + (arbitrary_info_t) (int64_t) 1); } } @@ -835,10 +945,18 @@ klhwg_add_node(hwgraph_root, cnode); } + for (cnode = numnodes; cnode < numionodes; cnode++) { + klhwg_add_tionode(hwgraph_root, cnode); + } + for (cnode = 0; cnode < numnodes; cnode++) { klhwg_add_xbow(cnode, cnodeid_to_nasid(cnode)); } + for (cnode = numnodes; cnode < numionodes; cnode++) { + klhwg_add_coretalk(cnode, cnodeid_to_nasid(cnode)); + } + /* * As for router hardware inventory information, we set this * up in router.c. diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/sn2/l1_command.c linux-2.4.23-pre8/arch/ia64/sn/io/sn2/l1_command.c --- linux-2.4.22/arch/ia64/sn/io/sn2/l1_command.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/sn2/l1_command.c 2003-10-22 22:48:00.000000000 +0000 @@ -60,8 +60,6 @@ *rack = (result & MODULE_RACK_MASK) >> MODULE_RACK_SHFT; *bay = (result & MODULE_BPOS_MASK) >> MODULE_BPOS_SHFT; *brick_type = (result & MODULE_BTYPE_MASK) >> MODULE_BTYPE_SHFT; - *brick_type = toupper(*brick_type); - return 0; } @@ -113,12 +111,16 @@ brick_type = MODULE_IXBRICK; break; case L1_BRICKTYPE_PX: brick_type = MODULE_PXBRICK; break; + case L1_BRICKTYPE_OPUS: + brick_type = MODULE_OPUSBRICK; break; case L1_BRICKTYPE_I: brick_type = MODULE_IBRICK; break; case L1_BRICKTYPE_P: brick_type = MODULE_PBRICK; break; case L1_BRICKTYPE_X: brick_type = MODULE_XBRICK; break; + case L1_BRICKTYPE_CHI_CG: + brick_type = MODULE_CGBRICK; break; } ret = RBT_TO_MODULE(rack, bay, brick_type); @@ -179,25 +181,31 @@ return("Unknown"); case L1_BRICKTYPE_X: - return("Xbrick"); + return(EDGE_LBL_XBRICK); case L1_BRICKTYPE_I: - return("Ibrick"); + return(EDGE_LBL_IBRICK); case L1_BRICKTYPE_P: - return("Pbrick"); + return(EDGE_LBL_PBRICK); case L1_BRICKTYPE_PX: - return("PXbrick"); + return(EDGE_LBL_PXBRICK); + + case L1_BRICKTYPE_OPUS: + return(EDGE_LBL_OPUSBRICK); case L1_BRICKTYPE_IX: - return("IXbrick"); + return(EDGE_LBL_IXBRICK); case L1_BRICKTYPE_C: return("Cbrick"); case L1_BRICKTYPE_R: return("Rbrick"); + + case L1_BRICKTYPE_CHI_CG: + return(EDGE_LBL_CGBRICK); } } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/sn2/ml_SN_init.c linux-2.4.23-pre8/arch/ia64/sn/io/sn2/ml_SN_init.c --- linux-2.4.22/arch/ia64/sn/io/sn2/ml_SN_init.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/sn2/ml_SN_init.c 2003-10-22 22:49:19.000000000 +0000 @@ -25,49 +25,6 @@ extern xwidgetnum_t hub_widget_id(nasid_t); -extern void iograph_early_init(void); - -nasid_t master_nasid = INVALID_NASID; /* This is the partition master nasid */ -nasid_t master_baseio_nasid = INVALID_NASID; /* This is the master base I/O nasid */ - - -/* - * mlreset(void) - * very early machine reset - at this point NO interrupts have been - * enabled; nor is memory, tlb, p0, etc setup. - * - * slave is zero when mlreset is called for the master processor and - * is nonzero thereafter. - */ - - -void -mlreset(int slave) -{ - /* - * We are the master cpu and node. - */ - master_nasid = get_nasid(); - set_master_bridge_base(); - - /* We're the master processor */ - master_procid = smp_processor_id(); - master_nasid = cpuid_to_nasid(master_procid); - - /* - * master_nasid we get back better be same as one from - * get_nasid() - */ - ASSERT_ALWAYS(master_nasid == get_nasid()); - - /* early initialization of iograph */ - iograph_early_init(); - - /* Initialize Hub Pseudodriver Management */ - hubdev_init(); -} - - /* XXX - Move the meat of this to intr.c ? */ /* * Set up the platform-dependent fields in the nodepda. @@ -86,11 +43,9 @@ npda->pdinfo = (void *)hubinfo; hubinfo->h_nodepda = npda; hubinfo->h_cnodeid = node; - hubinfo->h_nasid = COMPACT_TO_NASID_NODEID(node); spin_lock_init(&hubinfo->h_crblock); - hubinfo->h_widgetid = hub_widget_id(hubinfo->h_nasid); npda->xbow_peer = INVALID_NASID; /* @@ -107,7 +62,22 @@ npda->npda_rip_last = &npda->npda_rip_first; npda->geoid.any.type = GEO_TYPE_INVALID; - mutex_init_locked(&npda->xbow_sema); /* init it locked? */ + init_MUTEX_LOCKED(&npda->xbow_sema); /* init it locked? */ +} + +void +init_platform_hubinfo(nodepda_t **nodepdaindr) { + cnodeid_t cnode; + hubinfo_t hubinfo; + nodepda_t *npda; + + for (cnode = 0; cnode < numionodes; cnode++) { + npda = nodepdaindr[cnode]; + hubinfo = (hubinfo_t)npda->pdinfo; + hubinfo->h_nasid = COMPACT_TO_NASID_NODEID(cnode); + /* For TIO the following returns -1 */ + hubinfo->h_widgetid = hub_widget_id(hubinfo->h_nasid); + } } void diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/sn2/ml_SN_intr.c linux-2.4.23-pre8/arch/ia64/sn/io/sn2/ml_SN_intr.c --- linux-2.4.22/arch/ia64/sn/io/sn2/ml_SN_intr.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/sn2/ml_SN_intr.c 2003-10-22 22:47:51.000000000 +0000 @@ -102,7 +102,7 @@ local5_config.sh_local_int5_config_regval = 0; local5_config.sh_local_int5_config_s.idx = SGI_UART_VECTOR; - local5_config.sh_local_int5_config_s.pid = cpu0; + local5_config.sh_local_int5_config_s.pid = cpu; HUB_S( (unsigned long *)GLOBAL_MMR_ADDR(nasid, SH_LOCAL_INT5_CONFIG), local5_config.sh_local_int5_config_regval); @@ -366,6 +366,7 @@ vertex_hdl_t pconn_vhdl; pcibr_soft_t pcibr_soft; int bit; + static cnodeid_t last_node = 0; /* SN2 + pcibr addressing limitation */ /* Due to this limitation, all interrupts from a given bridge must go to the name node.*/ @@ -413,18 +414,20 @@ if (candidate != CPU_NONE) { printk("Cannot target interrupt to target node (%ld).\n",candidate); - return CPU_NONE; } else { - /* printk("Cannot target interrupt to closest node (%d) 0x%p\n", - master_node_get(dev), (void *)owner_dev); */ + return CPU_NONE; + } else { + printk("Cannot target interrupt to closest node (0x%x) 0x%p\n", + master_node_get(dev), (void *)owner_dev); } // We couldn't put it on the closest node. Try to find another one. // Do a stupid round-robin assignment of the node. { - static cnodeid_t last_node = -1; + int i; + if (last_node >= numnodes) last_node = 0; - for (candidate_node = last_node + 1; candidate_node != last_node; candidate_node++) { + for (i = 0, candidate_node = last_node; i < numnodes; candidate_node++,i++) { if (candidate_node == numnodes) candidate_node = 0; cpuid = intr_bit_reserve_test(CPU_NONE, 0, @@ -435,6 +438,7 @@ name, resp_bit); if (cpuid != CPU_NONE) { + last_node = candidate_node + 1; return cpuid; } } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/sn2/ml_iograph.c linux-2.4.23-pre8/arch/ia64/sn/io/sn2/ml_iograph.c --- linux-2.4.22/arch/ia64/sn/io/sn2/ml_iograph.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/sn2/ml_iograph.c 2003-10-22 22:49:14.000000000 +0000 @@ -49,20 +49,20 @@ * xswitch vertex is created. */ typedef struct xswitch_vol_s { - mutex_t xswitch_volunteer_mutex; + struct semaphore xswitch_volunteer_mutex; int xswitch_volunteer_count; vertex_hdl_t xswitch_volunteer[NUM_XSWITCH_VOLUNTEER]; } *xswitch_vol_t; + void xswitch_vertex_init(vertex_hdl_t xswitch) { xswitch_vol_t xvolinfo; int rc; - extern void * snia_kmem_zalloc(size_t size, int flag); - xvolinfo = snia_kmem_zalloc(sizeof(struct xswitch_vol_s), GFP_KERNEL); - mutex_init(&xvolinfo->xswitch_volunteer_mutex); + xvolinfo = snia_kmem_zalloc(sizeof(struct xswitch_vol_s)); + init_MUTEX(&xvolinfo->xswitch_volunteer_mutex); rc = hwgraph_info_add_LBL(xswitch, INFO_LBL_XSWITCH_VOL, (arbitrary_info_t)xvolinfo); @@ -108,7 +108,7 @@ return; } - mutex_lock(&xvolinfo->xswitch_volunteer_mutex); + down(&xvolinfo->xswitch_volunteer_mutex); ASSERT(xvolinfo->xswitch_volunteer_count < NUM_XSWITCH_VOLUNTEER); xvolinfo->xswitch_volunteer[xvolinfo->xswitch_volunteer_count] = master; xvolinfo->xswitch_volunteer_count++; @@ -126,7 +126,7 @@ xvolinfo->xswitch_volunteer[1] = hubv; } } - mutex_unlock(&xvolinfo->xswitch_volunteer_mutex); + up(&xvolinfo->xswitch_volunteer_mutex); } extern int xbow_port_io_enabled(nasid_t nasid, int widgetnum); @@ -193,16 +193,16 @@ * hub that owned it in the prom. */ if (is_master_baseio_nasid_widget(nasid, widgetnum)) { - extern nasid_t get_master_baseio_nasid(void); + extern nasid_t snia_get_master_baseio_nasid(void); for (i=0; ixswitch_volunteer[i]; hubinfo_get(hubv, &hubinfo); nasid = hubinfo->h_nasid; - if (nasid == get_master_baseio_nasid()) + if (nasid == snia_get_master_baseio_nasid()) goto do_assignment; } - PRINT_PANIC("Nasid == %d, console nasid == %d", - nasid, get_master_baseio_nasid()); + panic("Nasid == %d, console nasid == %d", + nasid, snia_get_master_baseio_nasid()); } /* @@ -237,44 +237,12 @@ } /* - * Early iograph initialization. Called by master CPU in mlreset(). - * Useful for including iograph.o in kernel.o. - */ -void -iograph_early_init(void) -{ -/* - * Need new way to get this information .. - */ - cnodeid_t cnode; - nasid_t nasid; - lboard_t *board; - - /* - * Init. the board-to-hwgraph link early, so FRU analyzer - * doesn't trip on leftover values if we panic early on. - */ - for(cnode = 0; cnode < numnodes; cnode++) { - nasid = COMPACT_TO_NASID_NODEID(cnode); - board = (lboard_t *)KL_CONFIG_INFO(nasid); - DBG("iograph_early_init: Found board 0x%p\n", board); - - /* Check out all the board info stored on a node */ - while(board) { - board->brd_graph_link = GRAPH_VERTEX_NONE; - board = KLCF_NEXT(board); - DBG("iograph_early_init: Found board 0x%p\n", board); - } - } -} - -/* * Let boot processor know that we're done initializing our node's IO * and then exit. */ /* ARGSUSED */ static void -io_init_done(cnodeid_t cnodeid,cpu_cookie_t c) +io_init_done(cnodeid_t cnodeid,cpuid_t c) { /* Let boot processor know that we're done. */ } @@ -414,8 +382,8 @@ * If the current hub is not supposed to be the master * for this widgetnum, then skip this widget. */ - if (xswitch_info_master_assignment_get(xswitch_info, - widgetnum) != hubv) { + + if (xswitch_info_master_assignment_get(xswitch_info, widgetnum) != hubv) { return; } @@ -461,6 +429,8 @@ (board->brd_type == KLTYPE_PBRICK) ? EDGE_LBL_PBRICK : (board->brd_type == KLTYPE_PXBRICK) ? EDGE_LBL_PXBRICK : (board->brd_type == KLTYPE_IXBRICK) ? EDGE_LBL_IXBRICK : + (board->brd_type == KLTYPE_CGBRICK) ? EDGE_LBL_CGBRICK : + (board->brd_type == KLTYPE_OPUSBRICK) ? EDGE_LBL_OPUSBRICK : (board->brd_type == KLTYPE_XBRICK) ? EDGE_LBL_XBRICK : "?brick", EDGE_LBL_XTALK, widgetnum); @@ -503,7 +473,6 @@ hubv, hub_widgetid); ia64_sn_sysctl_iobrick_module_get(nasid, &io_module); - if (io_module >= 0) { char buffer[16]; vertex_hdl_t to, from; @@ -514,8 +483,8 @@ memset(buffer, 0, 16); format_module_id(buffer, geo_module(board->brd_geoid), MODULE_FORMAT_BRIEF); - if ( islower(MODULE_GET_BTCHAR(io_module)) ) { - bt = toupper(MODULE_GET_BTCHAR(io_module)); + if ( isupper(MODULE_GET_BTCHAR(io_module)) ) { + bt = tolower(MODULE_GET_BTCHAR(io_module)); } else { bt = MODULE_GET_BTCHAR(io_module); @@ -534,13 +503,16 @@ EDGE_LBL_NODE "/" EDGE_LBL_XTALK "/" "0", buffer, geo_slab(board->brd_geoid)); + DBG("io_xswitch_widget_init: FROM path '%s'\n", pathname); + from = hwgraph_path_to_vertex(pathname); ASSERT_ALWAYS(from); + sprintf(pathname, EDGE_LBL_HW "/" EDGE_LBL_MODULE "/%s/" EDGE_LBL_SLAB "/%d/" "%s", buffer, geo_slab(board->brd_geoid), brick_name); - + DBG("io_xswitch_widget_init: TO path '%s'\n", pathname); to = hwgraph_path_to_vertex(pathname); ASSERT_ALWAYS(to); rc = hwgraph_edge_add(from, to, @@ -568,11 +540,8 @@ DBG("io_init_xswitch_widgets: xswitchv 0x%p for cnode %d\n", xswitchv, cnode); - for (widgetnum = HUB_WIDGET_ID_MIN; widgetnum <= HUB_WIDGET_ID_MAX; - widgetnum++) { - io_xswitch_widget_init(xswitchv, - cnodeid_to_vertex(cnode), - widgetnum); + for (widgetnum = HUB_WIDGET_ID_MIN; widgetnum <= HUB_WIDGET_ID_MAX; widgetnum++) { + io_xswitch_widget_init(xswitchv, cnodeid_to_vertex(cnode), widgetnum); } } @@ -654,8 +623,7 @@ nodepda_t *npdap; struct semaphore *peer_sema = 0; uint32_t widget_partnum; - cpu_cookie_t c = 0; - extern int hubdev_docallouts(vertex_hdl_t); + cpuid_t c = 0; npdap = NODEPDA(cnodeid); @@ -671,8 +639,6 @@ ASSERT(hubv != GRAPH_VERTEX_NONE); - hubdev_docallouts(hubv); - /* * Read mfg info on this hub */ @@ -817,12 +783,15 @@ * 5) Initialize all xwidgets on the xswitch */ + DBG("call volunteer_for_widgets\n"); + volunteer_for_widgets(switchv, hubv); /* If there's someone else on this crossbow, recognize him */ if (npdap->xbow_peer != INVALID_NASID) { nodepda_t *peer_npdap = NODEPDA(NASID_TO_COMPACT_NODEID(npdap->xbow_peer)); peer_sema = &peer_npdap->xbow_sema; + DBG("call volunteer_for_widgets again\n"); volunteer_for_widgets(switchv, peer_npdap->node_vertex); } @@ -830,13 +799,13 @@ /* Signal that we're done */ if (peer_sema) { - mutex_unlock(peer_sema); + up(peer_sema); } } else { /* Wait 'til master is done assigning widgets. */ - mutex_lock(&npdap->xbow_sema); + down(&npdap->xbow_sema); } #ifdef PROBE_TEST @@ -961,7 +930,7 @@ else DBG("none found!\n"); - DELAY(15000000); + udelay(15000000); //prom_reboot(); panic("FIXME: devnamefromarcs: should call prom_reboot here.\n"); /* NOTREACHED */ @@ -1013,10 +982,10 @@ 2, /* 0x8 */ 1, /* 0x9 */ 0, 0, /* 0xa - 0xb */ - 4, /* 0xc */ + 5, /* 0xc */ 6, /* 0xd */ - 3, /* 0xe */ - 5 /* 0xf */ + 4, /* 0xe */ + 3 /* 0xf */ } }, @@ -1034,6 +1003,20 @@ } }, +/* OPUSbrick widget number to PCI bus number map */ + { MODULE_OPUSBRICK, /* OPUSbrick type */ + /* PCI Bus # Widget # */ + { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0 - 0x7 */ + 0, /* 0x8 */ + 0, /* 0x9 */ + 0, 0, /* 0xa - 0xb */ + 0, /* 0xc */ + 0, /* 0xd */ + 0, /* 0xe */ + 1 /* 0xf */ + } + }, + /* IXbrick widget number to PCI bus number map */ { MODULE_IXBRICK, /* IXbrick type */ /* PCI Bus # Widget # */ @@ -1060,6 +1043,19 @@ 0, /* 0xe */ 0 /* 0xf */ } + }, +/* CG brick widget number to PCI bus number map */ + { MODULE_CGBRICK, /* CG brick */ + /* PCI Bus # Widget # */ + { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0 - 0x7 */ + 0, /* 0x8 */ + 0, /* 0x9 */ + 0, 1, /* 0xa - 0xb */ + 0, /* 0xc */ + 0, /* 0xd */ + 0, /* 0xe */ + 0 /* 0xf */ + } } }; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/sn2/module.c linux-2.4.23-pre8/arch/ia64/sn/io/sn2/module.c --- linux-2.4.22/arch/ia64/sn/io/sn2/module.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/sn2/module.c 2003-10-22 22:47:29.000000000 +0000 @@ -128,21 +128,26 @@ int i; char buffer[16]; moduleid_t moduleid; + slabid_t slab_number; memset(buffer, 0, 16); moduleid = geo_module(geoid); format_module_id(buffer, moduleid, MODULE_FORMAT_BRIEF); - DPRINTF("module_add_node: moduleid=%s node=%d\n", buffer, cnodeid); + DPRINTF("module_add_node: moduleid=%s node=%d ", buffer, cnodeid); if ((m = module_lookup(moduleid)) == 0) { m = kmalloc(sizeof (module_t), GFP_KERNEL); - memset(m, 0 , sizeof(module_t)); ASSERT_ALWAYS(m); + memset(m, 0 , sizeof(module_t)); + + for (slab_number = 0; slab_number <= MAX_SLABS; slab_number++) { + m->nodes[slab_number] = -1; + } m->id = moduleid; spin_lock_init(&m->lock); - mutex_init_locked(&m->thdcnt); + init_MUTEX_LOCKED(&m->thdcnt); /* Insert in sorted order by module number */ @@ -153,16 +158,23 @@ nummodules++; } - m->nodes[m->nodecnt] = cnodeid; - m->geoid[m->nodecnt] = geoid; - m->nodecnt++; + /* + * Save this information in the correct slab number of the node in the + * module. + */ + slab_number = geo_slab(geoid); + DPRINTF("slab number added 0x%x\n", slab_number); - DPRINTF("module_add_node: module %s now has %d nodes\n", buffer, m->nodecnt); + if (m->nodes[slab_number] != -1) + panic("module_add_node .. slab previously found\n"); + + m->nodes[slab_number] = cnodeid; + m->geoid[slab_number] = geoid; return m; } -int module_probe_snum(module_t *m, nasid_t nasid) +int module_probe_snum(module_t *m, nasid_t host_nasid, nasid_t nasid) { lboard_t *board; klmod_serial_num_t *comp; @@ -172,7 +184,7 @@ /* * record brick serial number */ - board = find_lboard((lboard_t *) KL_CONFIG_INFO(nasid), KLTYPE_SNIA); + board = find_lboard((lboard_t *) KL_CONFIG_INFO(host_nasid), KLTYPE_SNIA); if (! board || KL_CONFIG_DUPLICATE_BOARD(board)) { @@ -244,21 +256,47 @@ nserial = 0; + /* + * First pass just scan for compute node boards KLTYPE_SNIA. + * We do not support memoryless compute nodes. + */ for (node = 0; node < numnodes; node++) { nasid = COMPACT_TO_NASID_NODEID(node); - board = find_lboard((lboard_t *) KL_CONFIG_INFO(nasid), KLTYPE_SNIA); ASSERT(board); - m = module_add_node(board->brd_geoid, node); + HWGRAPH_DEBUG((__FILE__, __FUNCTION__, __LINE__, NULL, NULL, "Found Shub lboard 0x%lx nasid 0x%x cnode 0x%x \n", (unsigned long)board, (int)nasid, (int)node)); - if (! m->snum_valid && module_probe_snum(m, nasid)) + m = module_add_node(board->brd_geoid, node); + if (! m->snum_valid && module_probe_snum(m, nasid, nasid)) nserial++; } - DPRINTF("********found total of %d serial numbers in the system\n", - nserial); + /* + * Second scan, look for TIO's board hosted by compute nodes. + */ + for (node = numnodes; node < numionodes; node++) { + nasid_t tio_nasid; + cnodeid_t tio_node; + char serial_number[16]; - if (nserial == 0) - DPRINTF(KERN_WARNING "io_module_init: No serial number found.\n"); + tio_nasid = COMPACT_TO_NASID_NODEID(node); + board = find_lboard((lboard_t *) KL_CONFIG_INFO(tio_nasid), KLTYPE_TIO); + ASSERT(board); + tio_node = NASID_TO_COMPACT_NODEID(tio_nasid); + + HWGRAPH_DEBUG((__FILE__, __FUNCTION__, __LINE__, NULL, NULL, "Found TIO lboard 0x%lx tio nasid %d tio cnode %d\n", (unsigned long)board, (int)tio_nasid, (int)tio_node)); + + m = module_add_node(board->brd_geoid, tio_node); + + /* + * Get and initialize the serial number of TIO. + */ + board_serial_number_get( board, serial_number ); + if( serial_number[0] != '\0' ) { + encode_str_serial( serial_number, m->snum.snum_str ); + m->snum_valid = 1; + nserial++; + } + } } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/sn2/pcibr/pcibr_ate.c linux-2.4.23-pre8/arch/ia64/sn/io/sn2/pcibr/pcibr_ate.c --- linux-2.4.22/arch/ia64/sn/io/sn2/pcibr/pcibr_ate.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/sn2/pcibr/pcibr_ate.c 2003-10-22 22:49:19.000000000 +0000 @@ -86,7 +86,6 @@ int num_entries, entry; int i, j; bridgereg_t old_enable, new_enable; - int s; /* Probe SSRAM to determine its size. */ old_enable = bridge->b_int_enable; @@ -113,12 +112,10 @@ * The read following the write is required for the Bridge war */ - s = splhi(); bridge->b_wid_control = (bridge->b_wid_control & ~BRIDGE_CTRL_SSRAM_SIZE_MASK) | BRIDGE_CTRL_SSRAM_SIZE(largest_working_size); bridge->b_wid_control; /* inval addr bug war */ - splx(s); num_entries = ATE_NUM_ENTRIES(largest_working_size); @@ -382,25 +379,9 @@ int ate_count, bridge_ate_t ate) { - if (IS_PIC_SOFT(pcibr_soft) ) { - while (ate_count-- > 0) { - *ate_ptr++ = ate; - ate += IOPGSIZE; - } - } - else { - if (io_get_sh_swapper(NASID_GET(ate_ptr))) { - while (ate_count-- > 0) { - *ate_ptr++ = __swab64(ate); - ate += IOPGSIZE; - } - } - else { - while (ate_count-- > 0) { - *ate_ptr++ = ate; - ate += IOPGSIZE; - } - } + while (ate_count-- > 0) { + *ate_ptr++ = ate; + ate += IOPGSIZE; } } @@ -442,19 +423,7 @@ for (slot = pcibr_soft->bs_min_slot; slot < PCIBR_NUM_SLOTS(pcibr_soft); ++slot) { if ((cmd_reg = cmd_regs[slot]) & PCI_CMD_BUS_MASTER) { - if ( IS_PIC_SOFT(pcibr_soft) ) { - pcibr_slot_config_set(bridge, slot, PCI_CFG_COMMAND/4, cmd_reg); - } - else { - if (io_get_sh_swapper(NASID_GET(bridge))) { - bridge->b_type0_cfg_dev[slot].l[PCI_CFG_COMMAND / 4] = __swab32(cmd_reg); - } - else { -// BUG(); /* Does this really work if called when io_get_sh_swapper = 0? */ -// bridge->b_type0_cfg_dev[slot].l[PCI_CFG_COMMAND / 4] = cmd_reg; - pcibr_slot_config_set(bridge, slot, PCI_CFG_COMMAND/4, cmd_reg); - } - } + pcibr_slot_config_set(bridge, slot, PCI_CFG_COMMAND/4, cmd_reg); } } pcibr_dmamap->bd_flags |= PCIBR_DMAMAP_BUSY; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/sn2/pcibr/pcibr_dvr.c linux-2.4.23-pre8/arch/ia64/sn/io/sn2/pcibr/pcibr_dvr.c --- linux-2.4.22/arch/ia64/sn/io/sn2/pcibr/pcibr_dvr.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/sn2/pcibr/pcibr_dvr.c 2003-10-22 22:48:36.000000000 +0000 @@ -11,8 +11,10 @@ #include #include #include -#include +#if 0 #include +#include +#endif #include #include #include @@ -220,8 +222,6 @@ int pcibr_reset(vertex_hdl_t); pciio_endian_t pcibr_endian_set(vertex_hdl_t, pciio_endian_t, pciio_endian_t); -int pcibr_priority_bits_set(pcibr_soft_t, pciio_slot_t, pciio_priority_t); -pciio_priority_t pcibr_priority_set(vertex_hdl_t, pciio_priority_t); int pcibr_device_flags_set(vertex_hdl_t, pcibr_device_flags_t); extern cfg_p pcibr_config_addr(vertex_hdl_t, unsigned); @@ -506,17 +506,6 @@ slotp->bss_device = new; bridge->b_wid_tflush; /* wait until Bridge PIO complete */ } - else { - if (io_get_sh_swapper(NASID_GET(bridge))) { - BRIDGE_REG_SET32((&bridge->b_device[slot].reg)) = __swab32(new); - slotp->bss_device = new; - BRIDGE_REG_GET32((&bridge->b_wid_tflush)); /* wait until Bridge PIO complete */ - } else { - bridge->b_device[slot].reg = new; - slotp->bss_device = new; - bridge->b_wid_tflush; /* wait until Bridge PIO complete */ - } - } pcibr_unlock(pcibr_soft, s); #ifdef PIC_LATER @@ -551,31 +540,6 @@ pcibr_unlock(pcibr_soft, s); } -/* - * flush write gather buffer for slot - */ -static void -pcibr_device_write_gather_flush(pcibr_soft_t pcibr_soft, - pciio_slot_t slot) -{ - bridge_t *bridge; - unsigned long s; - volatile uint32_t wrf; - s = pcibr_lock(pcibr_soft); - bridge = pcibr_soft->bs_base; - - if ( IS_PIC_SOFT(pcibr_soft) ) { - wrf = bridge->b_wr_req_buf[slot].reg; - } - else { - if (io_get_sh_swapper(NASID_GET(bridge))) { - wrf = BRIDGE_REG_GET32((&bridge->b_wr_req_buf[slot].reg)); - } else { - wrf = bridge->b_wr_req_buf[slot].reg; - } - } - pcibr_unlock(pcibr_soft, s); -} /* ===================================================================== * Bridge (pcibr) "Device Driver" entry points @@ -618,7 +582,6 @@ .mmap = pcibr_mmap, }; - /* This is special case code used by grio. There are plans to make * this a bit more general in the future, but till then this should * be sufficient. @@ -923,28 +886,33 @@ PCIBR_DEBUG_ALWAYS((PCIBR_DEBUG_ATTACH, f_c, "pcibr_bus_cnvlink\n")); - if (GRAPH_SUCCESS != hwgraph_vertex_name_get(f_c, dst, MAXDEVNAME)) + if (GRAPH_SUCCESS != hwgraph_vertex_name_get(f_c, dst, MAXDEVNAME)) { return 0; + } /* dst example == /hw/module/001c02/Pbrick/xtalk/8/pci/direct */ /* find the widget number */ xp = strstr(dst, "/"EDGE_LBL_XTALK"/"); - if (xp == NULL) + if (xp == NULL) { return 0; + } widgetnum = simple_strtoul(xp+7, NULL, 0); - if (widgetnum < XBOW_PORT_8 || widgetnum > XBOW_PORT_F) + if (widgetnum < XBOW_PORT_8 || widgetnum > XBOW_PORT_F) { return 0; + } /* remove "/pci/direct" from path */ cp = strstr(dst, "/" EDGE_LBL_PCI "/" EDGE_LBL_DIRECT); - if (cp == NULL) + if (cp == NULL) { return 0; + } *cp = (char)NULL; /* get the vertex for the widget */ - if (GRAPH_SUCCESS != hwgraph_traverse(NULL, dp, &svtx)) + if (GRAPH_SUCCESS != hwgraph_traverse(NULL, dp, &svtx)) { return 0; + } *xp = (char)NULL; /* remove "/xtalk/..." from path */ @@ -1023,13 +991,10 @@ vertex_hdl_t noslot_conn; char devnm[MAXDEVNAME], *s; pcibr_hints_t pcibr_hints; - uint64_t int_enable; - bridgereg_t int_enable_32; + uint64_t int_enable; picreg_t int_enable_64; unsigned rrb_fixed = 0; - int spl_level; - #if PCI_FBBE int fast_back_to_back_enable; #endif @@ -1069,7 +1034,7 @@ NEW(pcibr_soft); if (ret_softp) *ret_softp = pcibr_soft; - BZERO(pcibr_soft, sizeof *pcibr_soft); + memset(pcibr_soft, 0, sizeof *pcibr_soft); pcibr_soft_set(pcibr_vhdl, pcibr_soft); pcibr_soft->bs_conn = xconn_vhdl; pcibr_soft->bs_vhdl = pcibr_vhdl; @@ -1190,6 +1155,7 @@ switch (pcibr_soft->bs_bricktype) { case MODULE_PXBRICK: case MODULE_IXBRICK: + case MODULE_OPUSBRICK: pcibr_soft->bs_first_slot = 0; pcibr_soft->bs_last_slot = 1; pcibr_soft->bs_last_reset = 1; @@ -1236,6 +1202,13 @@ pcibr_soft->bs_last_slot = 6; } break; + + case MODULE_CGBRICK: + pcibr_soft->bs_first_slot = 0; + pcibr_soft->bs_last_slot = 0; + pcibr_soft->bs_last_reset = 0; + break; + default: break; } @@ -1316,8 +1289,6 @@ if (busnum == 0) { xwidget_error_register(xconn_vhdl, pcibr_error_handler_wrapper, pcibr_soft); } - } else { - xwidget_error_register(xconn_vhdl, pcibr_error_handler, pcibr_soft); } /* @@ -1371,8 +1342,6 @@ */ if (IS_PIC_SOFT(pcibr_soft)) bridge->b_int_device = (uint32_t) 0x006db6db; - else - bridge->b_int_device = (uint32_t) 0xffffffff; { bridgereg_t dirmap; @@ -1411,7 +1380,7 @@ * for the lowest hunk of memory. */ xbase = xtalk_dmatrans_addr(xconn_vhdl, 0, - paddr, _PAGESZ, 0); + paddr, PAGE_SIZE, 0); if (xbase != XIO_NOWHERE) { if (XIO_PACKED(xbase)) { @@ -1441,24 +1410,18 @@ * ensure that we write and read without any interruption. * The read following the write is required for the Bridge war */ - spl_level = splhi(); #if IOPGSIZE == 4096 if (IS_PIC_SOFT(pcibr_soft)) { bridge->p_wid_control_64 &= ~BRIDGE_CTRL_PAGE_SIZE; - } else { - bridge->b_wid_control &= ~BRIDGE_CTRL_PAGE_SIZE; - } + } #elif IOPGSIZE == 16384 if (IS_PIC_SOFT(pcibr_soft)) { bridge->p_wid_control_64 |= BRIDGE_CTRL_PAGE_SIZE; - } else { - bridge->b_wid_control |= BRIDGE_CTRL_PAGE_SIZE; } #else <<>>; #endif bridge->b_wid_control; /* inval addr bug war */ - splx(spl_level); /* Initialize internal mapping entries */ for (entry = 0; entry < pcibr_soft->bs_int_ate_size; entry++) { @@ -1606,13 +1569,7 @@ #ifdef PFG_TEST int_enable = (uint64_t)0x7ffffeff7ffffeff; #endif - } else { - int_enable_32 = bridge->b_int_enable | (BRIDGE_ISR_ERRORS & 0xffffffff); - int_enable = ((uint64_t)int_enable_32 & 0xffffffff); -#ifdef PFG_TEST - int_enable = (uint64_t)0x7ffffeff; -#endif - } + } #if BRIDGE_ERROR_INTR_WAR @@ -1672,8 +1629,6 @@ if (IS_PIC_SOFT(pcibr_soft)) { bridge->p_int_enable_64 = (picreg_t)int_enable; - } else { - bridge->b_int_enable = (bridgereg_t)int_enable; } bridge->b_int_mode = 0; /* do not send "clear interrupt" packets */ @@ -1734,7 +1689,7 @@ /* Setup the Bus's PCI IO Root Resource. */ pcibr_soft->bs_io_win_root_resource.start = PCIBR_BUS_IO_BASE; pcibr_soft->bs_io_win_root_resource.end = 0xffffffff; - res = (struct resource *) kmalloc( sizeof(struct resource), KM_NOSLEEP); + res = (struct resource *) kmalloc( sizeof(struct resource), GFP_KERNEL); if (!res) panic("PCIBR:Unable to allocate resource structure\n"); @@ -1746,13 +1701,13 @@ panic("PCIBR:Unable to request_resource()\n"); /* Setup the Small Window Root Resource */ - pcibr_soft->bs_swin_root_resource.start = _PAGESZ; + pcibr_soft->bs_swin_root_resource.start = PAGE_SIZE; pcibr_soft->bs_swin_root_resource.end = 0x000FFFFF; /* Setup the Bus's PCI Memory Root Resource */ pcibr_soft->bs_mem_win_root_resource.start = 0x200000; pcibr_soft->bs_mem_win_root_resource.end = 0xffffffff; - res = (struct resource *) kmalloc( sizeof(struct resource), KM_NOSLEEP); + res = (struct resource *) kmalloc( sizeof(struct resource), GFP_KERNEL); if (!res) panic("PCIBR:Unable to allocate resource structure\n"); @@ -1862,6 +1817,7 @@ break; case MODULE_PXBRICK: case MODULE_IXBRICK: + case MODULE_OPUSBRICK: /* * If the IO9 is in the PXBrick (bus1, slot1) allocate * RRBs to all the devices @@ -1874,18 +1830,16 @@ do_pcibr_rrb_autoalloc(pcibr_soft, 2, VCHAN0, 4); do_pcibr_rrb_autoalloc(pcibr_soft, 3, VCHAN0, 4); } else { - do_pcibr_rrb_autoalloc(pcibr_soft, 0, VCHAN0, 8); - do_pcibr_rrb_autoalloc(pcibr_soft, 1, VCHAN0, 8); + do_pcibr_rrb_autoalloc(pcibr_soft, 0, VCHAN0, 4); + do_pcibr_rrb_autoalloc(pcibr_soft, 1, VCHAN0, 4); } break; - } /* switch */ - } -#ifdef LATER - if (strstr(nicinfo, XTALK_PCI_PART_NUM)) { - do_pcibr_rrb_autoalloc(pcibr_soft, 1, VCHAN0, 8); + case MODULE_CGBRICK: + do_pcibr_rrb_autoalloc(pcibr_soft, 0, VCHAN0, 8); + break; + } /* switch */ } -#endif } /* OK Special RRB allocations are done. */ for (slot = pcibr_soft->bs_min_slot; @@ -1927,8 +1881,6 @@ /* Disable the interrupts from the bridge */ if (IS_PIC_SOFT(pcibr_soft)) { bridge->p_int_enable_64 = 0; - } else { - bridge->b_int_enable = 0; } pcibr_unlock(pcibr_soft, s); @@ -1942,7 +1894,6 @@ pciio_device_info_unregister(pcibr_vhdl, &(pcibr_soft->bs_noslot_info->f_c)); - spin_lock_destroy(&pcibr_soft->bs_lock); kfree(pcibr_soft->bs_name); /* Disconnect the error interrupt and free the xtalk resources @@ -1994,17 +1945,6 @@ return (int) ainfo; } -int -pcibr_write_gather_flush(vertex_hdl_t pconn_vhdl) -{ - pciio_info_t pciio_info = pciio_info_get(pconn_vhdl); - pcibr_soft_t pcibr_soft = (pcibr_soft_t) pciio_info_mfast_get(pciio_info); - pciio_slot_t slot; - slot = PCIBR_INFO_SLOT_GET_INT(pciio_info); - pcibr_device_write_gather_flush(pcibr_soft, slot); - return 0; -} - /* ===================================================================== * PIO MANAGEMENT */ @@ -2220,17 +2160,6 @@ pcibr_soft->bs_slot[win].bss_device = devreg; bridge->b_wid_tflush; /* wait until Bridge PIO complete */ } - else { - if (io_get_sh_swapper(NASID_GET(bridge))) { - BRIDGE_REG_SET32((&bridge->b_device[win].reg)) = __swab32(devreg); - pcibr_soft->bs_slot[win].bss_device = devreg; - BRIDGE_REG_GET32((&bridge->b_wid_tflush)); /* wait until Bridge PIO complete */ - } else { - bridge->b_device[win].reg = devreg; - pcibr_soft->bs_slot[win].bss_device = devreg; - bridge->b_wid_tflush; /* wait until Bridge PIO complete */ - } - } #ifdef PCI_LATER PCIBR_DEBUG((PCIBR_DEBUG_DEVREG, pconn_vhdl, @@ -2418,22 +2347,6 @@ if (octl != nctl) /* make the change if any */ bridge->b_wid_control = nctl; } - else { - picreg_t octl, nctl; - if (io_get_sh_swapper(NASID_GET(bridge))) { - octl = BRIDGE_REG_GET32((&bridge->b_wid_control)); - nctl = bst ? octl | swb : octl & ~swb; - - if (octl != nctl) /* make the change if any */ - BRIDGE_REG_SET32((&bridge->b_wid_control)) = __swab32(nctl); - } else { - octl = bridge->b_wid_control; - nctl = bst ? octl | swb : octl & ~swb; - - if (octl != nctl) /* make the change if any */ - bridge->b_wid_control = nctl; - } - } *bfp = bfn; /* record the assignment */ if (pcibr_debug_mask & PCIBR_DEBUG_PIOMAP) { @@ -2656,7 +2569,7 @@ /* * Check for proper alignment */ - ASSERT(alignment >= NBPP); + ASSERT(alignment >= PAGE_SIZE); ASSERT((alignment & (alignment - 1)) == 0); align_mask = alignment - 1; @@ -3092,7 +3005,7 @@ !IS_XBRIDGE_OR_PIC_SOFT(pcibr_soft)) { bridge_t *bridge = pcibr_soft->bs_base; volatile unsigned *cmd_regp; - unsigned cmd_reg; + unsigned cmd_reg = 0; unsigned long s; pcibr_dmamap->bd_flags |= PCIBR_DMAMAP_SSRAM; @@ -3103,13 +3016,6 @@ if ( IS_PIC_SOFT(pcibr_soft) ) { cmd_reg = pcibr_slot_config_get(bridge, slot, PCI_CFG_COMMAND/4); } - else { - if (io_get_sh_swapper(NASID_GET(bridge))) { - BRIDGE_REG_SET32((&cmd_reg)) = __swab32(*cmd_regp); - } else { - cmd_reg = pcibr_slot_config_get(bridge, slot, PCI_CFG_COMMAND/4); - } - } pcibr_soft->bs_slot[slot].bss_cmd_pointer = cmd_regp; pcibr_soft->bs_slot[slot].bss_cmd_shadow = cmd_reg; pcibr_unlock(pcibr_soft, s); @@ -3362,13 +3268,6 @@ if ( IS_PIC_SOFT(pcibr_soft) ) { bridge->b_wid_tflush; /* wait until Bridge PIO complete */ } - else { - if (io_get_sh_swapper(NASID_GET(bridge))) { - BRIDGE_REG_GET32((&bridge->b_wid_tflush)); - } else { - bridge->b_wid_tflush; - } - } PCIBR_DEBUG((PCIBR_DEBUG_DMAMAP, pcibr_dmamap->bd_dev, "pcibr_dmamap_addr (PMU) : wanted paddr " "[0x%x..0x%x] returning PCI 0x%x\n", @@ -3827,17 +3726,6 @@ pcibr_soft->bs_slot[pciio_slot].bss_device = devreg; bridge->b_wid_tflush; /* wait until Bridge PIO complete */ } - else { - if (io_get_sh_swapper(NASID_GET(bridge))) { - BRIDGE_REG_SET32((&bridge->b_device[pciio_slot].reg)) = __swab32(devreg); - pcibr_soft->bs_slot[pciio_slot].bss_device = devreg; - BRIDGE_REG_GET32((&bridge->b_wid_tflush));/* wait until Bridge PIO complete */ - } else { - bridge->b_device[pciio_slot].reg = devreg; - pcibr_soft->bs_slot[pciio_slot].bss_device = devreg; - bridge->b_wid_tflush; /* wait until Bridge PIO complete */ - } - } } pcibr_unlock(pcibr_soft, s); @@ -3851,105 +3739,6 @@ return desired_end; } -/* This (re)sets the GBR and REALTIME bits and also keeps track of how - * many sets are outstanding. Reset succeeds only if the number of outstanding - * sets == 1. - */ -int -pcibr_priority_bits_set(pcibr_soft_t pcibr_soft, - pciio_slot_t pciio_slot, - pciio_priority_t device_prio) -{ - unsigned long s; - int *counter; - bridgereg_t rtbits = 0; - bridgereg_t devreg; - int rc = PRIO_SUCCESS; - - /* in dual-slot configurations, the host and the - * guest have separate DMA resources, so they - * have separate requirements for priority bits. - */ - - counter = &(pcibr_soft->bs_slot[pciio_slot].bss_pri_uctr); - - /* - * Bridge supports PCI notions of LOW and HIGH priority - * arbitration rings via a "REAL_TIME" bit in the per-device - * Bridge register. The "GBR" bit controls access to the GBR - * ring on the xbow. These two bits are (re)set together. - * - * XXX- Bug in Rev B Bridge Si: - * Symptom: Prefetcher starts operating incorrectly. This happens - * due to corruption of the address storage ram in the prefetcher - * when a non-real time PCI request is pulled and a real-time one is - * put in it's place. Workaround: Use only a single arbitration ring - * on PCI bus. GBR and RR can still be uniquely used per - * device. NETLIST MERGE DONE, WILL BE FIXED IN REV C. - */ - - if (pcibr_soft->bs_rev_num != BRIDGE_PART_REV_B) - rtbits |= BRIDGE_DEV_RT; - - /* NOTE- if we ever put DEV_RT or DEV_GBR on - * the disabled list, we will have to take - * it into account here. - */ - - s = pcibr_lock(pcibr_soft); - devreg = pcibr_soft->bs_slot[pciio_slot].bss_device; - if (device_prio == PCI_PRIO_HIGH) { - if ((++*counter == 1)) { - if (rtbits) - devreg |= rtbits; - else - rc = PRIO_FAIL; - } - } else if (device_prio == PCI_PRIO_LOW) { - if (*counter <= 0) - rc = PRIO_FAIL; - else if (--*counter == 0) - if (rtbits) - devreg &= ~rtbits; - } - if (pcibr_soft->bs_slot[pciio_slot].bss_device != devreg) { - bridge_t *bridge = pcibr_soft->bs_base; - - if ( IS_PIC_SOFT(pcibr_soft) ) { - bridge->b_device[pciio_slot].reg = devreg; - pcibr_soft->bs_slot[pciio_slot].bss_device = devreg; - bridge->b_wid_tflush; /* wait until Bridge PIO complete */ - } - else { - if (io_get_sh_swapper(NASID_GET(bridge))) { - BRIDGE_REG_SET32((&bridge->b_device[pciio_slot].reg)) = __swab32(devreg); - pcibr_soft->bs_slot[pciio_slot].bss_device = devreg; - BRIDGE_REG_GET32((&bridge->b_wid_tflush));/* wait until Bridge PIO complete */ - } else { - bridge->b_device[pciio_slot].reg = devreg; - pcibr_soft->bs_slot[pciio_slot].bss_device = devreg; - bridge->b_wid_tflush; /* wait until Bridge PIO complete */ - } - } - } - pcibr_unlock(pcibr_soft, s); - - return rc; -} - -pciio_priority_t -pcibr_priority_set(vertex_hdl_t pconn_vhdl, - pciio_priority_t device_prio) -{ - pciio_info_t pciio_info = pciio_info_get(pconn_vhdl); - pciio_slot_t pciio_slot = PCIBR_INFO_SLOT_GET_INT(pciio_info); - pcibr_soft_t pcibr_soft = (pcibr_soft_t) pciio_info_mfast_get(pciio_info); - - (void) pcibr_priority_bits_set(pcibr_soft, pciio_slot, device_prio); - - return device_prio; -} - /* * Interfaces to allow special (e.g. SGI) drivers to set/clear * Bridge-specific device flags. Many flags are modified through @@ -4018,17 +3807,6 @@ pcibr_soft->bs_slot[pciio_slot].bss_device = devreg; bridge->b_wid_tflush; /* wait until Bridge PIO complete */ } - else { - if (io_get_sh_swapper(NASID_GET(bridge))) { - BRIDGE_REG_SET32((&bridge->b_device[pciio_slot].reg)) = __swab32(devreg); - pcibr_soft->bs_slot[pciio_slot].bss_device = devreg; - BRIDGE_REG_GET32((&bridge->b_wid_tflush));/* wait until Bridge PIO complete */ - } else { - bridge->b_device[pciio_slot].reg = devreg; - pcibr_soft->bs_slot[pciio_slot].bss_device = devreg; - bridge->b_wid_tflush; /* wait until Bridge PIO complete */ - } - } } pcibr_unlock(pcibr_soft, s); #ifdef PIC_LATER @@ -4116,16 +3894,14 @@ (pciio_provider_startup_f *) pcibr_provider_startup, (pciio_provider_shutdown_f *) pcibr_provider_shutdown, (pciio_reset_f *) pcibr_reset, - (pciio_write_gather_flush_f *) pcibr_write_gather_flush, (pciio_endian_set_f *) pcibr_endian_set, - (pciio_priority_set_f *) pcibr_priority_set, (pciio_config_get_f *) pcibr_config_get, (pciio_config_set_f *) pcibr_config_set, (pciio_error_devenable_f *) 0, (pciio_error_extract_f *) 0, (pciio_driver_reg_callback_f *) 0, (pciio_driver_unreg_callback_f *) 0, - (pciio_device_unregister_f *) pcibr_device_unregister, + (pciio_device_unregister_f *) 0, (pciio_dma_enabled_f *) pcibr_dma_enabled, }; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/sn2/pcibr/pcibr_error.c linux-2.4.23-pre8/arch/ia64/sn/io/sn2/pcibr/pcibr_error.c --- linux-2.4.22/arch/ia64/sn/io/sn2/pcibr/pcibr_error.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/sn2/pcibr/pcibr_error.c 2003-10-22 22:48:26.000000000 +0000 @@ -101,6 +101,7 @@ #define F(s,n) { 1l<<(s),-(s), n } +#if defined(FORCE_ERRORS) static struct reg_values space_v[] = { {PCIIO_SPACE_NONE, "none"}, @@ -147,6 +148,7 @@ {BRIDGE_DEV_OFF_MASK, BRIDGE_DEV_OFF_ADDR_SHFT, "DEV_OFF", "%x"}, {0} }; +#endif /* FORCE_ERRORS */ static void print_bridge_errcmd(uint32_t cmdword, char *errtype) @@ -663,7 +665,7 @@ entry = pcibr_list; while (1) { if (entry == NULL) { - PRINT_PANIC("pcibr_error_intr_handler:\tmy parameter (0x%p) is not a pcibr_soft!", arg); + panic("pcibr_error_intr_handler:\tmy parameter (0x%p) is not a pcibr_soft!", arg); } if ((intr_arg_t) entry->bl_soft == arg) break; @@ -936,11 +938,11 @@ (err_status & (BRIDGE_ISR_LLP_REC_SNERR | BRIDGE_ISR_LLP_REC_CBERR))) { printk("BRIDGE ERR_STATUS 0x%lx\n", err_status); pcibr_error_dump(pcibr_soft); - PRINT_PANIC("PCI Bridge Error interrupt killed the system"); + panic("PCI Bridge Error interrupt killed the system"); } if (err_status & BRIDGE_ISR_ERROR_FATAL) { - PRINT_PANIC("PCI Bridge Error interrupt killed the system"); + panic("PCI Bridge Error interrupt killed the system"); /*NOTREACHED */ } @@ -1080,7 +1082,9 @@ int retval = IOERROR_HANDLED; vertex_hdl_t pcibr_vhdl = pcibr_soft->bs_vhdl; +#if defined(FORCE_ERRORS) bridge_t *bridge = pcibr_soft->bs_base; +#endif iopaddr_t bad_xaddr; @@ -1414,9 +1418,6 @@ } #if defined(FORCE_ERRORS) if (0) { -#elif !DEBUG - if (kdebug) { -#endif /* * Dump raw data from Bridge/PCI layer. */ @@ -1444,9 +1445,8 @@ BEM_ADD_REG(device); } } -#if !DEBUG || defined(FORCE_ERRORS) } -#endif +#endif /* FORCE_ERRORS */ /* * Since error could not be handled at lower level, diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/sn2/pcibr/pcibr_intr.c linux-2.4.23-pre8/arch/ia64/sn/io/sn2/pcibr/pcibr_intr.c --- linux-2.4.22/arch/ia64/sn/io/sn2/pcibr/pcibr_intr.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/sn2/pcibr/pcibr_intr.c 2003-10-22 22:47:28.000000000 +0000 @@ -34,7 +34,7 @@ inline int compare_and_swap_ptr(void **location, void *old_ptr, void *new_ptr) { - FIXME("compare_and_swap_ptr : NOT ATOMIC"); + /* FIXME - compare_and_swap_ptr NOT ATOMIC */ if (*location == old_ptr) { *location = new_ptr; return(1); @@ -103,7 +103,7 @@ pcibr_intr_wrap_t wrap; if (cbuf->ib_in == cbuf->ib_out) - PRINT_PANIC( "pcibr intr circular buffer empty, cbuf=0x%p, ib_in=ib_out=%d\n", + panic( "pcibr intr circular buffer empty, cbuf=0x%p, ib_in=ib_out=%d\n", (void *)cbuf, cbuf->ib_out); wrap = cbuf->ib_cbuf[cbuf->ib_out++]; @@ -118,22 +118,21 @@ pcibr_wrap_put(pcibr_intr_wrap_t wrap, pcibr_intr_cbuf_t cbuf) { int in; - int s; /* * Multiple CPUs could be executing this code simultaneously * if a handler has registered multiple interrupt lines and * the interrupts are directed to different CPUs. */ - s = mutex_spinlock(&cbuf->ib_lock); + spin_lock(&cbuf->ib_lock); in = (cbuf->ib_in + 1) % IBUFSIZE; if (in == cbuf->ib_out) - PRINT_PANIC( "pcibr intr circular buffer full, cbuf=0x%p, ib_in=%d\n", + panic( "pcibr intr circular buffer full, cbuf=0x%p, ib_in=%d\n", (void *)cbuf, cbuf->ib_in); cbuf->ib_cbuf[cbuf->ib_in] = wrap; cbuf->ib_in = in; - mutex_spinunlock(&cbuf->ib_lock, s); + spin_unlock(&cbuf->ib_lock); return; } @@ -341,7 +340,7 @@ pcibr_intr->bi_mustruncpu = CPU_NONE; pcibr_intr->bi_ibuf.ib_in = 0; pcibr_intr->bi_ibuf.ib_out = 0; - mutex_spinlock_init(&pcibr_intr->bi_ibuf.ib_lock); + spin_lock_init(&pcibr_intr->bi_ibuf.ib_lock); pcibr_int_bits = pcibr_soft->bs_intr_bits((pciio_info_t)pcibr_info, lines, PCIBR_NUM_SLOTS(pcibr_soft)); @@ -857,7 +856,7 @@ printk(KERN_WARNING "NEW=0x%x/0x%x OLD=0x%x/0x%x\n", NEW_b_wid_int_upper, NEW_b_wid_int_lower, OLD_b_wid_int_upper, OLD_b_wid_int_lower); - PRINT_PANIC("PCI Bridge interrupt targetting error\n"); + panic("PCI Bridge interrupt targetting error\n"); } } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/sn2/pcibr/pcibr_rrb.c linux-2.4.23-pre8/arch/ia64/sn/io/sn2/pcibr/pcibr_rrb.c --- linux-2.4.22/arch/ia64/sn/io/sn2/pcibr/pcibr_rrb.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/sn2/pcibr/pcibr_rrb.c 2003-10-22 22:49:10.000000000 +0000 @@ -407,14 +407,6 @@ while (*wrb_flush) ; } - else { - if (io_get_sh_swapper(NASID_GET(bridge))) { - while (BRIDGE_REG_GET32((wrb_flush))); - } else { - while (*wrb_flush) - ; - } - } return(0); } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/sn2/pcibr/pcibr_slot.c linux-2.4.23-pre8/arch/ia64/sn/io/sn2/pcibr/pcibr_slot.c --- linux-2.4.22/arch/ia64/sn/io/sn2/pcibr/pcibr_slot.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/sn2/pcibr/pcibr_slot.c 2003-10-22 22:48:11.000000000 +0000 @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -88,6 +89,8 @@ int max_readcount_to_bufsize[MAX_READCNT_TABLE] = {512, 1024, 2048, 4096 }; +#define COPYOUT(a, b, c) copy_to_user(b,a,c) + /*========================================================================== * BRIDGE PCI SLOT RELATED IOCTLs */ @@ -320,9 +323,8 @@ reg_p b_respp; pcibr_slot_info_resp_t slotp; pcibr_slot_func_info_resp_t funcp; - extern void snia_kmem_free(void *, int); - slotp = snia_kmem_zalloc(sizeof(*slotp), 0); + slotp = snia_kmem_zalloc(sizeof(*slotp)); if (slotp == NULL) { return(ENOMEM); } @@ -1188,8 +1190,8 @@ align = (win) ? size : align_slot; - if (align < _PAGESZ) - align = _PAGESZ; /* ie. 0x00004000 */ + if (align < PAGE_SIZE) + align = PAGE_SIZE; /* ie. 0x00004000 */ switch (space) { case PCIIO_SPACE_IO: @@ -1740,7 +1742,6 @@ { int rv; picreg_t p_old_enable = (picreg_t)0, p_new_enable; - extern int badaddr_val(volatile void *, int, volatile void *); p_old_enable = bridge->p_int_enable_64; p_new_enable = p_old_enable & ~(BRIDGE_IMR_PCI_MST_TIMEOUT | PIC_ISR_PCIX_MTOUT); @@ -1753,7 +1754,7 @@ bridge->p_int_rst_stat_64 = (BRIDGE_IRR_PCI_GRP_CLR | PIC_PCIX_GRP_CLR); (void) bridge->b_wid_tflush; /* flushbus */ } - rv = badaddr_val((void *) cfg, 4, valp); + rv = snia_badaddr_val((void *) cfg, 4, valp); if (bridge->p_err_int_view_64 & (BRIDGE_ISR_PCI_MST_TIMEOUT | PIC_ISR_PCIX_MTOUT)) { bridge->p_int_rst_stat_64 = BRIDGE_IRR_MULTI_CLR; rv = 1; /* unoccupied slot */ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/sn2/pciio.c linux-2.4.23-pre8/arch/ia64/sn/io/sn2/pciio.c --- linux-2.4.22/arch/ia64/sn/io/sn2/pciio.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/sn2/pciio.c 2003-10-22 22:48:31.000000000 +0000 @@ -36,85 +36,6 @@ char pciio_info_fingerprint[] = "pciio_info"; -int -badaddr_val(volatile void *addr, int len, volatile void *ptr) -{ - int ret = 0; - volatile void *new_addr; - - switch (len) { - case 4: - new_addr = (void *) addr; - ret = ia64_sn_probe_io_slot((long)new_addr, len, (void *)ptr); - break; - default: - printk(KERN_WARNING "badaddr_val given len %x but supports len of 4 only\n", len); - } - - if (ret < 0) - panic("badaddr_val: unexpected status (%d) in probing", ret); - return(ret); - -} - - -nasid_t -get_console_nasid(void) -{ - extern nasid_t console_nasid; - extern nasid_t master_baseio_nasid; - - if (console_nasid < 0) { - console_nasid = ia64_sn_get_console_nasid(); - if (console_nasid < 0) { -// ZZZ What do we do if we don't get a console nasid on the hardware???? - if (IS_RUNNING_ON_SIMULATOR() ) - console_nasid = master_baseio_nasid; - } - } - return console_nasid; -} - -nasid_t -get_master_baseio_nasid(void) -{ - extern nasid_t master_baseio_nasid; - extern char master_baseio_wid; - - if (master_baseio_nasid < 0) { - master_baseio_nasid = ia64_sn_get_master_baseio_nasid(); - - if ( master_baseio_nasid >= 0 ) { - master_baseio_wid = WIDGETID_GET(KL_CONFIG_CH_CONS_INFO(master_baseio_nasid)->memory_base); - } - } - return master_baseio_nasid; -} - -int -hub_dma_enabled(vertex_hdl_t xconn_vhdl) -{ - return(0); -} - -int -hub_error_devenable(vertex_hdl_t xconn_vhdl, int devnum, int error_code) -{ - return(0); -} - -void -ioerror_dump(char *name, int error_code, int error_mode, ioerror_t *ioerror) -{ -} - -/****** - ****** end hack defines ...... - ******/ - - - - /* ===================================================================== * PCI Generic Bus Provider * Implement PCI provider operations. The pciio* layer provides a @@ -136,97 +57,9 @@ */ #if !defined(DEV_FUNC) -static pciio_provider_t *pciio_to_provider_fns(vertex_hdl_t dev); +extern pciio_provider_t *pciio_to_provider_fns(vertex_hdl_t dev); #endif -pciio_piomap_t pciio_piomap_alloc(vertex_hdl_t, device_desc_t, pciio_space_t, iopaddr_t, size_t, size_t, unsigned); -void pciio_piomap_free(pciio_piomap_t); -caddr_t pciio_piomap_addr(pciio_piomap_t, iopaddr_t, size_t); - -void pciio_piomap_done(pciio_piomap_t); -caddr_t pciio_piotrans_addr(vertex_hdl_t, device_desc_t, pciio_space_t, iopaddr_t, size_t, unsigned); -caddr_t pciio_pio_addr(vertex_hdl_t, device_desc_t, pciio_space_t, iopaddr_t, size_t, pciio_piomap_t *, unsigned); - -iopaddr_t pciio_piospace_alloc(vertex_hdl_t, device_desc_t, pciio_space_t, size_t, size_t); -void pciio_piospace_free(vertex_hdl_t, pciio_space_t, iopaddr_t, size_t); - -pciio_dmamap_t pciio_dmamap_alloc(vertex_hdl_t, device_desc_t, size_t, unsigned); -void pciio_dmamap_free(pciio_dmamap_t); -iopaddr_t pciio_dmamap_addr(pciio_dmamap_t, paddr_t, size_t); -void pciio_dmamap_done(pciio_dmamap_t); -iopaddr_t pciio_dmatrans_addr(vertex_hdl_t, device_desc_t, paddr_t, size_t, unsigned); -void pciio_dmamap_drain(pciio_dmamap_t); -void pciio_dmaaddr_drain(vertex_hdl_t, paddr_t, size_t); -void pciio_dmalist_drain(vertex_hdl_t, alenlist_t); -iopaddr_t pciio_dma_addr(vertex_hdl_t, device_desc_t, paddr_t, size_t, pciio_dmamap_t *, unsigned); - -pciio_intr_t pciio_intr_alloc(vertex_hdl_t, device_desc_t, pciio_intr_line_t, vertex_hdl_t); -void pciio_intr_free(pciio_intr_t); -int pciio_intr_connect(pciio_intr_t, intr_func_t, intr_arg_t); -void pciio_intr_disconnect(pciio_intr_t); -vertex_hdl_t pciio_intr_cpu_get(pciio_intr_t); - -void pciio_slot_func_to_name(char *, pciio_slot_t, pciio_function_t); - -void pciio_provider_startup(vertex_hdl_t); -void pciio_provider_shutdown(vertex_hdl_t); - -pciio_endian_t pciio_endian_set(vertex_hdl_t, pciio_endian_t, pciio_endian_t); -pciio_priority_t pciio_priority_set(vertex_hdl_t, pciio_priority_t); -vertex_hdl_t pciio_intr_dev_get(pciio_intr_t); - -vertex_hdl_t pciio_pio_dev_get(pciio_piomap_t); -pciio_slot_t pciio_pio_slot_get(pciio_piomap_t); -pciio_space_t pciio_pio_space_get(pciio_piomap_t); -iopaddr_t pciio_pio_pciaddr_get(pciio_piomap_t); -ulong pciio_pio_mapsz_get(pciio_piomap_t); -caddr_t pciio_pio_kvaddr_get(pciio_piomap_t); - -vertex_hdl_t pciio_dma_dev_get(pciio_dmamap_t); -pciio_slot_t pciio_dma_slot_get(pciio_dmamap_t); - -pciio_info_t pciio_info_chk(vertex_hdl_t); -pciio_info_t pciio_info_get(vertex_hdl_t); -void pciio_info_set(vertex_hdl_t, pciio_info_t); -vertex_hdl_t pciio_info_dev_get(pciio_info_t); -pciio_slot_t pciio_info_slot_get(pciio_info_t); -pciio_function_t pciio_info_function_get(pciio_info_t); -pciio_vendor_id_t pciio_info_vendor_id_get(pciio_info_t); -pciio_device_id_t pciio_info_device_id_get(pciio_info_t); -vertex_hdl_t pciio_info_master_get(pciio_info_t); -arbitrary_info_t pciio_info_mfast_get(pciio_info_t); -pciio_provider_t *pciio_info_pops_get(pciio_info_t); -error_handler_f *pciio_info_efunc_get(pciio_info_t); -error_handler_arg_t *pciio_info_einfo_get(pciio_info_t); -pciio_space_t pciio_info_bar_space_get(pciio_info_t, int); -iopaddr_t pciio_info_bar_base_get(pciio_info_t, int); -size_t pciio_info_bar_size_get(pciio_info_t, int); -iopaddr_t pciio_info_rom_base_get(pciio_info_t); -size_t pciio_info_rom_size_get(pciio_info_t); - -int pciio_attach(vertex_hdl_t); - -void pciio_provider_register(vertex_hdl_t, pciio_provider_t *pciio_fns); -void pciio_provider_unregister(vertex_hdl_t); -pciio_provider_t *pciio_provider_fns_get(vertex_hdl_t); - -int pciio_driver_register(pciio_vendor_id_t, pciio_device_id_t, char *driver_prefix, unsigned); - -vertex_hdl_t pciio_device_register(vertex_hdl_t, vertex_hdl_t, pciio_slot_t, pciio_function_t, pciio_vendor_id_t, pciio_device_id_t); - -void pciio_device_unregister(vertex_hdl_t); -pciio_info_t pciio_device_info_new(pciio_info_t, vertex_hdl_t, pciio_slot_t, pciio_function_t, pciio_vendor_id_t, pciio_device_id_t); -void pciio_device_info_free(pciio_info_t); -vertex_hdl_t pciio_device_info_register(vertex_hdl_t, pciio_info_t); -void pciio_device_info_unregister(vertex_hdl_t, pciio_info_t); -int pciio_device_attach(vertex_hdl_t, int); -int pciio_device_detach(vertex_hdl_t, int); -void pciio_error_register(vertex_hdl_t, error_handler_f *, error_handler_arg_t); - -int pciio_reset(vertex_hdl_t); -int pciio_write_gather_flush(vertex_hdl_t); -int pciio_slot_inuse(vertex_hdl_t); - /* ===================================================================== * Provider Function Location * @@ -239,7 +72,7 @@ #if !defined(DEV_FUNC) -static pciio_provider_t * +pciio_provider_t * pciio_to_provider_fns(vertex_hdl_t dev) { pciio_info_t card_info; @@ -260,13 +93,10 @@ } } - if (provider_fns == NULL) -#if defined(SUPPORT_PRINTING_V_FORMAT) - PRINT_PANIC("%v: provider_fns == NULL", dev); -#else - PRINT_PANIC("0x%p: provider_fns == NULL", (void *)dev); -#endif - + if (provider_fns == NULL) { + char devname[MAXDEVNAME]; + panic("%s: provider_fns == NULL", vertex_to_name(dev, devname, MAXDEVNAME)); + } return provider_fns; } @@ -395,8 +225,8 @@ size_t byte_count, /* Size of mapping */ size_t align) { /* Alignment needed */ - if (align < NBPP) - align = NBPP; + if (align < PAGE_SIZE) + align = PAGE_SIZE; return DEV_FUNC(dev, piospace_alloc) (dev, dev_desc, space, byte_count, align); } @@ -752,50 +582,6 @@ } /* - * Specify endianness constraints. The driver tells us what the device - * does and how it would like to see things in memory. We reply with - * how things will actually appear in memory. - */ -pciio_endian_t -pciio_endian_set(vertex_hdl_t dev, - pciio_endian_t device_end, - pciio_endian_t desired_end) -{ - ASSERT((device_end == PCIDMA_ENDIAN_BIG) || (device_end == PCIDMA_ENDIAN_LITTLE)); - ASSERT((desired_end == PCIDMA_ENDIAN_BIG) || (desired_end == PCIDMA_ENDIAN_LITTLE)); - -#if DEBUG -#if defined(SUPPORT_PRINTING_V_FORMAT) - printk(KERN_ALERT "%v: pciio_endian_set is going away.\n" - "\tplease use PCIIO_BYTE_STREAM or PCIIO_WORD_VALUES in your\n" - "\tpciio_dmamap_alloc and pciio_dmatrans calls instead.\n", - dev); -#else - printk(KERN_ALERT "0x%x: pciio_endian_set is going away.\n" - "\tplease use PCIIO_BYTE_STREAM or PCIIO_WORD_VALUES in your\n" - "\tpciio_dmamap_alloc and pciio_dmatrans calls instead.\n", - dev); -#endif -#endif - - return DEV_FUNC(dev, endian_set) - (dev, device_end, desired_end); -} - -/* - * Specify PCI arbitration priority. - */ -pciio_priority_t -pciio_priority_set(vertex_hdl_t dev, - pciio_priority_t device_prio) -{ - ASSERT((device_prio == PCI_PRIO_HIGH) || (device_prio == PCI_PRIO_LOW)); - - return DEV_FUNC(dev, priority_set) - (dev, device_prio); -} - -/* * Read value of configuration register */ uint64_t @@ -864,71 +650,6 @@ return DEV_FUNC(dev, reset) (dev); } -/* - * flush write gather buffers - */ -int -pciio_write_gather_flush(vertex_hdl_t dev) -{ - return DEV_FUNC(dev, write_gather_flush) (dev); -} - -vertex_hdl_t -pciio_intr_dev_get(pciio_intr_t pciio_intr) -{ - return (pciio_intr->pi_dev); -} - -/****** Generic crosstalk pio interfaces ******/ -vertex_hdl_t -pciio_pio_dev_get(pciio_piomap_t pciio_piomap) -{ - return (pciio_piomap->pp_dev); -} - -pciio_slot_t -pciio_pio_slot_get(pciio_piomap_t pciio_piomap) -{ - return (pciio_piomap->pp_slot); -} - -pciio_space_t -pciio_pio_space_get(pciio_piomap_t pciio_piomap) -{ - return (pciio_piomap->pp_space); -} - -iopaddr_t -pciio_pio_pciaddr_get(pciio_piomap_t pciio_piomap) -{ - return (pciio_piomap->pp_pciaddr); -} - -ulong -pciio_pio_mapsz_get(pciio_piomap_t pciio_piomap) -{ - return (pciio_piomap->pp_mapsz); -} - -caddr_t -pciio_pio_kvaddr_get(pciio_piomap_t pciio_piomap) -{ - return (pciio_piomap->pp_kvaddr); -} - -/****** Generic crosstalk dma interfaces ******/ -vertex_hdl_t -pciio_dma_dev_get(pciio_dmamap_t pciio_dmamap) -{ - return (pciio_dmamap->pd_dev); -} - -pciio_slot_t -pciio_dma_slot_get(pciio_dmamap_t pciio_dmamap) -{ - return (pciio_dmamap->pd_slot); -} - /****** Generic pci slot information interfaces ******/ pciio_info_t @@ -987,30 +708,13 @@ return (pciio_info->c_vertex); } + pciio_slot_t pciio_info_slot_get(pciio_info_t pciio_info) { return (pciio_info->c_slot); } -pciio_function_t -pciio_info_function_get(pciio_info_t pciio_info) -{ - return (pciio_info->c_func); -} - -pciio_vendor_id_t -pciio_info_vendor_id_get(pciio_info_t pciio_info) -{ - return (pciio_info->c_vendor); -} - -pciio_device_id_t -pciio_info_device_id_get(pciio_info_t pciio_info) -{ - return (pciio_info->c_device); -} - vertex_hdl_t pciio_info_master_get(pciio_info_t pciio_info) { @@ -1029,48 +733,6 @@ return (pciio_info->c_pops); } -error_handler_f * -pciio_info_efunc_get(pciio_info_t pciio_info) -{ - return (pciio_info->c_efunc); -} - -error_handler_arg_t * -pciio_info_einfo_get(pciio_info_t pciio_info) -{ - return (pciio_info->c_einfo); -} - -pciio_space_t -pciio_info_bar_space_get(pciio_info_t info, int win) -{ - return info->c_window[win].w_space; -} - -iopaddr_t -pciio_info_bar_base_get(pciio_info_t info, int win) -{ - return info->c_window[win].w_base; -} - -size_t -pciio_info_bar_size_get(pciio_info_t info, int win) -{ - return info->c_window[win].w_size; -} - -iopaddr_t -pciio_info_rom_base_get(pciio_info_t info) -{ - return info->c_rbase; -} - -size_t -pciio_info_rom_size_get(pciio_info_t info) -{ - return info->c_rsize; -} - /* ===================================================================== * GENERIC PCI INITIALIZATION FUNCTIONS @@ -1085,11 +747,8 @@ pciio_attach(vertex_hdl_t pciio) { #if DEBUG && ATTACH_DEBUG -#if defined(SUPPORT_PRINTING_V_FORMAT) - printk("%v: pciio_attach\n", pciio); -#else - printk("0x%x: pciio_attach\n", pciio); -#endif + char devname[MAXDEVNAME]; + printk("%s: pciio_attach\n", vertex_to_name(pciio, devname, MAXDEVNAME)); #endif return 0; } @@ -1127,37 +786,6 @@ return (pciio_provider_t *) ainfo; } -/*ARGSUSED4 */ -int -pciio_driver_register( - pciio_vendor_id_t vendor_id, - pciio_device_id_t device_id, - char *driver_prefix, - unsigned flags) -{ - return(0); -} - -vertex_hdl_t -pciio_device_register( - vertex_hdl_t connectpt, /* vertex for /hw/.../pciio/%d */ - vertex_hdl_t master, /* card's master ASIC (PCI provider) */ - pciio_slot_t slot, /* card's slot */ - pciio_function_t func, /* card's func */ - pciio_vendor_id_t vendor_id, - pciio_device_id_t device_id) -{ - return pciio_device_info_register - (connectpt, pciio_device_info_new (NULL, master, slot, func, - vendor_id, device_id)); -} - -void -pciio_device_unregister(vertex_hdl_t pconn) -{ - DEV_FUNC(pconn,device_unregister)(pconn); -} - pciio_info_t pciio_device_info_new( pciio_info_t pciio_info, @@ -1190,7 +818,7 @@ /* NOTE : pciio_info is a structure within the pcibr_info * and not a pointer to memory allocated on the heap !! */ - BZERO((char *)pciio_info,sizeof(pciio_info)); + memset((char *)pciio_info, 0, sizeof(pciio_info)); } vertex_hdl_t @@ -1330,12 +958,22 @@ struct resource *new_res; int status = 0; - new_res = (struct resource *) kmalloc( sizeof(struct resource), KM_NOSLEEP); + new_res = (struct resource *) kmalloc( sizeof(struct resource), GFP_KERNEL); - status = allocate_resource( root_resource, new_res, + if (start > 0) { + status = allocate_resource( root_resource, new_res, + size, start /* Min start addr. */, + (start + size) - 1, 1, + NULL, NULL); + } else { + if (size > align) + align = size; + status = allocate_resource( root_resource, new_res, size, align /* Min start addr. */, root_resource->end, align, NULL, NULL); + } + if (status) { kfree(new_res); return((iopaddr_t) NULL); @@ -1434,105 +1072,3 @@ { return(0); } - - -/* - * These are complementary Linux interfaces that takes in a pci_dev * as the - * first arguement instead of vertex_hdl_t. - */ -iopaddr_t snia_pciio_dmatrans_addr(struct pci_dev *, device_desc_t, paddr_t, size_t, unsigned); -pciio_dmamap_t snia_pciio_dmamap_alloc(struct pci_dev *, device_desc_t, size_t, unsigned); -void snia_pciio_dmamap_free(pciio_dmamap_t); -iopaddr_t snia_pciio_dmamap_addr(pciio_dmamap_t, paddr_t, size_t); -void snia_pciio_dmamap_done(pciio_dmamap_t); -pciio_endian_t snia_pciio_endian_set(struct pci_dev *pci_dev, pciio_endian_t device_end, - pciio_endian_t desired_end); - -#include -EXPORT_SYMBOL(snia_pciio_dmatrans_addr); -EXPORT_SYMBOL(snia_pciio_dmamap_alloc); -EXPORT_SYMBOL(snia_pciio_dmamap_free); -EXPORT_SYMBOL(snia_pciio_dmamap_addr); -EXPORT_SYMBOL(snia_pciio_dmamap_done); -EXPORT_SYMBOL(snia_pciio_endian_set); - -int -snia_pcibr_rrb_alloc(struct pci_dev *pci_dev, - int *count_vchan0, - int *count_vchan1) -{ - vertex_hdl_t dev = PCIDEV_VERTEX(pci_dev); - - return pcibr_rrb_alloc(dev, count_vchan0, count_vchan1); -} -EXPORT_SYMBOL(snia_pcibr_rrb_alloc); - -pciio_endian_t -snia_pciio_endian_set(struct pci_dev *pci_dev, - pciio_endian_t device_end, - pciio_endian_t desired_end) -{ - vertex_hdl_t dev = PCIDEV_VERTEX(pci_dev); - - return DEV_FUNC(dev, endian_set) - (dev, device_end, desired_end); -} - -iopaddr_t -snia_pciio_dmatrans_addr(struct pci_dev *pci_dev, /* translate for this device */ - device_desc_t dev_desc, /* device descriptor */ - paddr_t paddr, /* system physical address */ - size_t byte_count, /* length */ - unsigned flags) -{ /* defined in dma.h */ - - vertex_hdl_t dev = PCIDEV_VERTEX(pci_dev); - - /* - * If the device is not a PIC, we always want the PCIIO_BYTE_STREAM to be - * set. Otherwise, it must not be set. This applies to SN1 and SN2. - */ - return DEV_FUNC(dev, dmatrans_addr) - (dev, dev_desc, paddr, byte_count, (IS_PIC_DEVICE(pci_dev)) ? (flags & ~PCIIO_BYTE_STREAM) : flags | PCIIO_BYTE_STREAM); -} - -pciio_dmamap_t -snia_pciio_dmamap_alloc(struct pci_dev *pci_dev, /* set up mappings for this device */ - device_desc_t dev_desc, /* device descriptor */ - size_t byte_count_max, /* max size of a mapping */ - unsigned flags) -{ /* defined in dma.h */ - - vertex_hdl_t dev = PCIDEV_VERTEX(pci_dev); - - /* - * If the device is not a PIC, we always want the PCIIO_BYTE_STREAM to be - * set. Otherwise, it must not be set. This applies to SN1 and SN2. - */ - return (pciio_dmamap_t) DEV_FUNC(dev, dmamap_alloc) - (dev, dev_desc, byte_count_max, (IS_PIC_DEVICE(pci_dev)) ? (flags & ~PCIIO_BYTE_STREAM) : flags | PCIIO_BYTE_STREAM); -} - -void -snia_pciio_dmamap_free(pciio_dmamap_t pciio_dmamap) -{ - DMAMAP_FUNC(pciio_dmamap, dmamap_free) - (CAST_DMAMAP(pciio_dmamap)); -} - -iopaddr_t -snia_pciio_dmamap_addr(pciio_dmamap_t pciio_dmamap, /* use these mapping resources */ - paddr_t paddr, /* map for this address */ - size_t byte_count) -{ /* map this many bytes */ - return DMAMAP_FUNC(pciio_dmamap, dmamap_addr) - (CAST_DMAMAP(pciio_dmamap), paddr, byte_count); -} - -void -snia_pciio_dmamap_done(pciio_dmamap_t pciio_dmamap) -{ - DMAMAP_FUNC(pciio_dmamap, dmamap_done) - (CAST_DMAMAP(pciio_dmamap)); -} - diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/sn2/pic.c linux-2.4.23-pre8/arch/ia64/sn/io/sn2/pic.c --- linux-2.4.22/arch/ia64/sn/io/sn2/pic.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/sn2/pic.c 2003-10-22 22:48:56.000000000 +0000 @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -130,7 +131,7 @@ char pathname[256], peer_path[256], tmpbuf[256]; char *p; int rc; - vertex_hdl_t peer_conn_v; + vertex_hdl_t peer_conn_v, hubv; int pos; slabid_t slab; @@ -139,7 +140,7 @@ /* pcibr widget hw/module/001c11/slab/0/Pbrick/xtalk/12 */ /* sprintf(pathname, "%v", conn_v); */ xbow_peer = NASID_TO_COMPACT_NODEID(NODEPDA(cnode)->xbow_peer); - pos = hwgfs_generate_path(conn_v, tmpbuf, 256); + pos = hwgraph_generate_path(conn_v, tmpbuf, 256); strcpy(pathname, &tmpbuf[pos]); p = pathname + strlen("hw/module/001c01/slab/0/"); @@ -183,6 +184,11 @@ if (!pic_bus1_widget_info_dup(conn_v, peer_conn_v, xbow_peer)) return 0; + hubv = cnodeid_to_vertex(xbow_peer); + ASSERT(hubv != GRAPH_VERTEX_NONE); + device_master_set(peer_conn_v, hubv); + xtalk_provider_register(hubv, &hub_provider); + xtalk_provider_startup(hubv); return peer_conn_v; } } @@ -199,6 +205,9 @@ vertex_hdl_t pcibr_vhdl0, pcibr_vhdl1 = (vertex_hdl_t)0; pcibr_soft_t bus0_soft, bus1_soft = (pcibr_soft_t)0; vertex_hdl_t conn_v0, conn_v1, peer_conn_v; + int brick_type; + int iobrick_type_get_nasid(nasid_t nasid); + PCIBR_DEBUG_ALWAYS((PCIBR_DEBUG_ATTACH, conn_v, "pic_attach()\n")); @@ -228,10 +237,19 @@ * the Bridge registers themselves. */ /* FIXME: what should the hwgraph path look like ? */ - rc = hwgraph_path_add(conn_v0, EDGE_LBL_PCIX_0, &pcibr_vhdl0); - ASSERT(rc == GRAPH_SUCCESS); - rc = hwgraph_path_add(conn_v1, EDGE_LBL_PCIX_1, &pcibr_vhdl1); - ASSERT(rc == GRAPH_SUCCESS); + brick_type = iobrick_type_get_nasid(NASID_GET(bridge0)); + if ( brick_type == MODULE_CGBRICK ) { + rc = hwgraph_path_add(conn_v0, EDGE_LBL_AGP_0, &pcibr_vhdl0); + ASSERT(rc == GRAPH_SUCCESS); + rc = hwgraph_path_add(conn_v1, EDGE_LBL_AGP_1, &pcibr_vhdl1); + ASSERT(rc == GRAPH_SUCCESS); + } + else { + rc = hwgraph_path_add(conn_v0, EDGE_LBL_PCIX_0, &pcibr_vhdl0); + ASSERT(rc == GRAPH_SUCCESS); + rc = hwgraph_path_add(conn_v1, EDGE_LBL_PCIX_1, &pcibr_vhdl1); + ASSERT(rc == GRAPH_SUCCESS); + } PCIBR_DEBUG_ALWAYS((PCIBR_DEBUG_ATTACH, conn_v, "pic_attach: pcibr_vhdl0=%v, pcibr_vhdl1=%v\n", @@ -292,9 +310,7 @@ (pciio_provider_startup_f *) pcibr_provider_startup, (pciio_provider_shutdown_f *) pcibr_provider_shutdown, (pciio_reset_f *) pcibr_reset, - (pciio_write_gather_flush_f *) pcibr_write_gather_flush, (pciio_endian_set_f *) pcibr_endian_set, - (pciio_priority_set_f *) pcibr_priority_set, (pciio_config_get_f *) pcibr_config_get, (pciio_config_set_f *) pcibr_config_set, (pciio_error_devenable_f *) 0, diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/sn2/shub.c linux-2.4.23-pre8/arch/ia64/sn/io/sn2/shub.c --- linux-2.4.22/arch/ia64/sn/io/sn2/shub.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/sn2/shub.c 2003-10-22 22:47:29.000000000 +0000 @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -35,44 +36,18 @@ #include #include -/* - * Shub WAR for Xbridge Little Endian problem: - * Xbridge has to run in BIG ENDIAN even with Shub. - */ - - -/* - * io_sh_swapper: Turn on Shub byte swapping. - * All data destined to and from Shub to XIO are byte-swapped. - */ -void -io_sh_swapper(nasid_t nasid, int onoff) -{ - ii_iwc_u_t ii_iwc; - - ii_iwc.ii_iwc_regval = REMOTE_HUB_L(nasid, IIO_IWC); - - ii_iwc.ii_iwc_fld_s.i_dma_byte_swap = onoff; - REMOTE_HUB_S(nasid, IIO_IWC, ii_iwc.ii_iwc_regval); - ii_iwc.ii_iwc_regval = REMOTE_HUB_L(nasid, IIO_IWC); - -} +#define SHUB_NUM_ECF_REGISTERS 8 /* - * io_get_sh_swapper: Return current Swap mode. - * 1 = Swap on, 0 = Swap off. + * A backport of the 2.5 scheduler is used by many vendors of 2.4-based + * distributions. + * We can only guess its presence by the lack of the SCHED_YIELD flag. + * If the heuristic doesn't work, change this define by hand. */ -int -io_get_sh_swapper(nasid_t nasid) -{ - ii_iwc_u_t ii_iwc; - - ii_iwc.ii_iwc_regval = REMOTE_HUB_L(nasid, IIO_IWC); - return(ii_iwc.ii_iwc_fld_s.i_dma_byte_swap); - -} +#ifndef SCHED_YIELD +#define __HAVE_NEW_SCHEDULER 1 +#endif -#define SHUB_NUM_ECF_REGISTERS 8 static uint32_t shub_perf_counts[SHUB_NUM_ECF_REGISTERS]; @@ -206,7 +181,7 @@ #else cnode = (cnodeid_t)file->private_data; #endif - if (!cnode) + if (cnode < 0 || cnode >= numnodes) return -ENODEV; switch (cmd) { @@ -316,7 +291,12 @@ struct task_struct *tsk = current; daemonize(); + +#ifdef __HAVE_NEW_SCHEDULER set_user_nice(tsk, 19); +#else + tsk->nice = 19; +#endif sigfillset(&tsk->blocked); strcpy(tsk->comm, "linkstatd"); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/sn2/shub_intr.c linux-2.4.23-pre8/arch/ia64/sn/io/sn2/shub_intr.c --- linux-2.4.22/arch/ia64/sn/io/sn2/shub_intr.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/sn2/shub_intr.c 2003-10-22 22:47:29.000000000 +0000 @@ -27,6 +27,9 @@ #include #include #include +#include +#include +#include /* ARGSUSED */ void @@ -37,11 +40,15 @@ xwidgetnum_t hub_widget_id(nasid_t nasid) { - hubii_wcr_t ii_wcr; /* the control status register */ - - ii_wcr.wcr_reg_value = REMOTE_HUB_L(nasid,IIO_WCR); - - return ii_wcr.wcr_fields_s.wcr_widget_id; + + if (!(nasid & 1)) { + hubii_wcr_t ii_wcr; /* the control status register */ + ii_wcr.wcr_reg_value = REMOTE_HUB_L(nasid,IIO_WCR); + return ii_wcr.wcr_fields_s.wcr_widget_id; + } else { + /* ICE does not have widget id. */ + return(-1); + } } static hub_intr_t @@ -79,7 +86,7 @@ xtalk_addr = SH_II_INT0 | ((unsigned long)nasid << 36) | (1UL << 47); } - intr_hdl = snia_kmem_alloc_node(sizeof(struct hub_intr_s), KM_NOSLEEP, cnode); + intr_hdl = snia_kmem_alloc_node(sizeof(struct hub_intr_s), cnode); ASSERT_ALWAYS(intr_hdl); xtalk_info = &intr_hdl->i_xtalk_info; @@ -188,3 +195,57 @@ ASSERT(rv == 0); intr_hdl->i_flags &= ~HUB_INTR_IS_CONNECTED; } + +/* + * Redirect an interrupt to another cpu. + */ + +void +sn_shub_redirect_intr(pcibr_intr_t intr, unsigned long cpu) { + unsigned long bit; + int cpuphys, slice; + nasid_t nasid; + unsigned long xtalk_addr; + bridge_t *bridge = intr->bi_soft->bs_base; + picreg_t int_enable; + picreg_t host_addr; + int irq; + + cpuphys = cpu_physical_id(cpu); + slice = cpu_physical_id_to_slice(cpuphys); + nasid = cpu_physical_id_to_nasid(cpuphys); + + if (slice) { + xtalk_addr = SH_II_INT1 | ((unsigned long)nasid << 36) | (1UL << 47); + } else { + xtalk_addr = SH_II_INT0 | ((unsigned long)nasid << 36) | (1UL << 47); + } + + for (bit = 0; bit < 8; bit++) { + if (intr->bi_ibits & (1 << bit) ) { + /* Disable interrupts. */ + int_enable = bridge->p_int_enable_64; + int_enable &= ~bit; + bridge->p_int_enable_64 = int_enable; + /* Reset Host address (Interrupt destination) */ + host_addr = bridge->p_int_addr_64[bit]; + host_addr &= ~((1UL << 48) - 1); + host_addr |= xtalk_addr; + bridge->p_int_addr_64[bit] = host_addr; + /* Enable interrupt */ + int_enable |= bit; + bridge->p_int_enable_64 = int_enable; + /* Force an interrupt, just in case. */ + bridge->b_force_pin[bit].intr = 1; + } + } + irq = intr->bi_irq; + if (pdacpu(cpu).sn_first_irq == 0 || pdacpu(cpu).sn_first_irq > irq) { + pdacpu(cpu).sn_first_irq = irq; + } + if (pdacpu(cpu).sn_last_irq < irq) { + pdacpu(cpu).sn_last_irq = irq; + } + intr->bi_cpu = (int)cpu; +} + diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/sn2/shuberror.c linux-2.4.23-pre8/arch/ia64/sn/io/sn2/shuberror.c --- linux-2.4.22/arch/ia64/sn/io/sn2/shuberror.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/sn2/shuberror.c 2003-10-22 22:48:57.000000000 +0000 @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -52,7 +53,6 @@ hub_error_clear(nasid_t nasid) { int i; - hubreg_t idsr; /* * Make sure spurious write response errors are cleared @@ -299,7 +299,7 @@ * Wait till hub indicates it's done. */ while (REMOTE_HUB_L(hinfo->h_nasid, IIO_ICDR) & IIO_ICDR_PND) - us_delay(1); + udelay(1); } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/sn2/shubio.c linux-2.4.23-pre8/arch/ia64/sn/io/sn2/shubio.c --- linux-2.4.22/arch/ia64/sn/io/sn2/shubio.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/sn2/shubio.c 2003-10-22 22:48:43.000000000 +0000 @@ -310,8 +310,7 @@ if (!is_widget_pio_enabled(ioerror)) { if (error_state_get(hub_v) == ERROR_STATE_ACTION) - ioerror_dump("No outbound widget" - " access - ", + snia_ioerror_dump("No outbound widget access - ", error_code, mode, ioerror); return(IOERROR_HANDLED); } @@ -352,8 +351,7 @@ if (!is_widget_pio_enabled(ioerror)) { if (error_state_get(hub_v) == ERROR_STATE_ACTION) - ioerror_dump("No outbound widget" - " access - ", + snia_ioerror_dump("No outbound widget access - ", error_code, mode, ioerror); return(IOERROR_HANDLED); } @@ -478,7 +476,7 @@ error_state_set(vertex_hdl_t v,error_state_t new_state) { error_state_t old_state; - boolean_t replace = B_TRUE; + int replace = 1; /* Check if we have a valid hwgraph vertex */ if ( v == (vertex_hdl_t)0 ) @@ -497,7 +495,7 @@ * for this vertex. */ if (v_error_state_get(v,old_state) != GRAPH_SUCCESS) - replace = B_FALSE; + replace = 0; if (v_error_state_set(v,new_state,replace) != GRAPH_SUCCESS) { return(ERROR_RETURN_CODE_CANNOT_SET_STATE); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/sn2/xbow.c linux-2.4.23-pre8/arch/ia64/sn/io/sn2/xbow.c --- linux-2.4.22/arch/ia64/sn/io/sn2/xbow.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/sn2/xbow.c 2003-10-22 22:47:57.000000000 +0000 @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -28,6 +29,8 @@ /* #define XBOW_DEBUG 1 */ /* #define DEBUG_ERROR 1 */ +#define kdebug 0 + /* * Files needed to get the device driver entry points @@ -311,12 +314,12 @@ #endif /* XBRIDGE_REGS_SIM */ rev = XWIDGET_PART_REV_NUM(id); - mutex_spinlock_init(&soft->xbow_perf_lock); + spin_lock_init(&soft->xbow_perf_lock); soft->xbow_perfcnt[0].xp_perf_reg = &xbow->xb_perf_ctr_a; soft->xbow_perfcnt[1].xp_perf_reg = &xbow->xb_perf_ctr_b; /* Initialization for GBR bw allocation */ - mutex_spinlock_init(&soft->xbow_bw_alloc_lock); + spin_lock_init(&soft->xbow_bw_alloc_lock); #define XBOW_8_BIT_PORT_BW_MAX (400 * 1000 * 1000) /* 400 MB/s */ #define XBOW_16_BIT_PORT_BW_MAX (800 * 1000 * 1000) /* 800 MB/s */ @@ -419,43 +422,6 @@ return 0; /* attach successful */ } -/* This contains special-case code for grio. There are plans to make - * this general sometime in the future, but till then this should - * be good enough. - */ -xwidgetnum_t -xbow_widget_num_get(vertex_hdl_t dev) -{ - vertex_hdl_t tdev; - char devname[MAXDEVNAME]; - xwidget_info_t xwidget_info; - int i; - - vertex_to_name(dev, devname, MAXDEVNAME); - - /* If this is a pci controller vertex, traverse up using - * the ".." links to get to the widget. - */ - if (strstr(devname, EDGE_LBL_PCI) && - strstr(devname, EDGE_LBL_CONTROLLER)) { - tdev = dev; - for (i=0; i< 2; i++) { - if (hwgraph_edge_get(tdev, - HWGRAPH_EDGELBL_DOTDOT, &tdev) != - GRAPH_SUCCESS) - return XWIDGET_NONE; - } - - if ((xwidget_info = xwidget_info_chk(tdev)) != NULL) { - return (xwidget_info_id_get(xwidget_info)); - } else { - return XWIDGET_NONE; - } - } - - return XWIDGET_NONE; -} - /* * xbow_widget_present: See if a device is present * on the specified port of this crossbow. @@ -477,6 +443,10 @@ IS_PIC_XBOW(xbow->xb_wid_id) && port==0xf) { return 1; } + else if ( IS_PIC_XBOW(xbow->xb_wid_id) && port==0xb ) { + /* for opus the present bit doesn't work on port 0xb */ + return 1; + } return xbow->xb_link(port).link_aux_status & XB_AUX_STAT_PRESENT; } } @@ -805,7 +775,7 @@ XEM_ADD_VAR(wid_err_upper); XEM_ADD_VAR(wid_err_lower); XEM_ADD_VAR(wid_err_addr); - PRINT_PANIC("XIO Bus Error"); + panic("XIO Bus Error"); } } @@ -958,8 +928,9 @@ if (XBOW_WAR_ENABLED(PV854827, xbow->xb_wid_id) && IS_PIC_XBOW(xbow->xb_wid_id) && (port==0xf)) ; - else - if (!(link_aux_status & XB_AUX_STAT_PRESENT)) { + else if (IS_PIC_XBOW(xbow->xb_wid_id) && (port==0xb)) + ; /* WAR for opus this is missing on 0xb */ + else if (!(link_aux_status & XB_AUX_STAT_PRESENT)) { /* nobody connected. */ if (mode == MODE_DEVPROBE) return IOERROR_HANDLED; @@ -1094,14 +1065,13 @@ xbow_perf_t *xbow_perf = xbow_soft->xbow_perfcnt; xbow_perf_link_t *xbow_plink = xbow_soft->xbow_perflink; xbow_perfcount_t perf_reg; - unsigned long s; int link, i; for (i = 0; i < XBOW_PERF_COUNTERS; i++, xbow_perf++) { if (xbow_perf->xp_mode == XBOW_MONITOR_NONE) continue; - s = mutex_spinlock(&xbow_soft->xbow_perf_lock); + spin_lock(&xbow_soft->xbow_perf_lock); perf_reg.xb_counter_val = *(xbowreg_t *) xbow_perf->xp_perf_reg; @@ -1111,7 +1081,7 @@ ((perf_reg.xb_perf.count - xbow_perf->xp_current) & XBOW_COUNTER_MASK); xbow_perf->xp_current = perf_reg.xb_perf.count; - mutex_spinunlock(&xbow_soft->xbow_perf_lock, s); + spin_unlock(&xbow_soft->xbow_perf_lock); } } @@ -1132,7 +1102,6 @@ xbow_linkctrl_t xbow_link_ctrl; xbow_t *xbow = xbow_soft->base; xbow_perfcount_t perf_reg; - unsigned long s; int i; link -= BASE_XBOW_PORT; @@ -1145,10 +1114,10 @@ if ((counter < 0) || (counter >= XBOW_PERF_COUNTERS)) return -1; - s = mutex_spinlock(&xbow_soft->xbow_perf_lock); + spin_lock(&xbow_soft->xbow_perf_lock); if ((xbow_perf + counter)->xp_mode && mode) { - mutex_spinunlock(&xbow_soft->xbow_perf_lock, s); + spin_unlock(&xbow_soft->xbow_perf_lock); return -1; } for (i = 0; i < XBOW_PERF_COUNTERS; i++) { @@ -1156,7 +1125,7 @@ continue; if (((xbow_perf + i)->xp_link == link) && ((xbow_perf + i)->xp_mode)) { - mutex_spinunlock(&xbow_soft->xbow_perf_lock, s); + spin_unlock(&xbow_soft->xbow_perf_lock); return -1; } } @@ -1174,7 +1143,7 @@ *(xbowreg_t *) xbow_perf->xp_perf_reg = perf_reg.xb_counter_val; xbow_perf->xp_current = perf_reg.xb_perf.count; - mutex_spinunlock(&xbow_soft->xbow_perf_lock, s); + spin_unlock(&xbow_soft->xbow_perf_lock); return 0; } @@ -1262,15 +1231,10 @@ xbow_t *xbow; xbowreg_t ctrl; xbwX_stat_t stat; - unsigned itick; + unsigned long itick; unsigned dtick; - static int ticks_per_ms = 0; + static long ticks_to_wait = HZ / 1000; - if (!ticks_per_ms) { - itick = get_timestamp(); - us_delay(1000); - ticks_per_ms = get_timestamp() - itick; - } widget_info = xwidget_info_get(xconn_vhdl); port = xwidget_info_id_get(widget_info); @@ -1296,16 +1260,16 @@ */ ctrl = xbow->xb_link(port).link_control; xbow->xb_link(port).link_reset = 0; - itick = get_timestamp(); + itick = jiffies; while (1) { stat.linkstatus = xbow->xb_link(port).link_status; if (stat.link_alive) break; - dtick = get_timestamp() - itick; - if (dtick > ticks_per_ms) { + dtick = jiffies - itick; + if (dtick > ticks_to_wait) { return -1; /* never came out of reset */ } - DELAY(2); /* don't beat on link_status */ + udelay(2); /* don't beat on link_status */ } xbow->xb_link(port).link_control = ctrl; return 0; @@ -1379,7 +1343,6 @@ xbow_soft_t soft = xbow_soft_get(vhdl); volatile xbowreg_t *xreg; xbowreg_t mask; - unsigned long s; int error = 0; bandwidth_t old_bw_BYTES, req_bw_BYTES; xbowreg_t old_xreg; @@ -1393,7 +1356,7 @@ ASSERT(XBOW_WIDGET_IS_VALID(src_wid)); ASSERT(XBOW_WIDGET_IS_VALID(dest_wid)); - s = mutex_spinlock(&soft->xbow_bw_alloc_lock); + spin_lock(&soft->xbow_bw_alloc_lock); /* Get pointer to the correct register */ xreg = XBOW_PRIO_ARBREG_PTR(soft->base, dest_wid, src_wid); @@ -1444,7 +1407,7 @@ error = 1; } - mutex_spinunlock(&soft->xbow_bw_alloc_lock, s); + spin_unlock(&soft->xbow_bw_alloc_lock); return (error); } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/sn2/xtalk.c linux-2.4.23-pre8/arch/ia64/sn/io/sn2/xtalk.c --- linux-2.4.22/arch/ia64/sn/io/sn2/xtalk.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/sn2/xtalk.c 2003-10-22 22:48:56.000000000 +0000 @@ -310,7 +310,7 @@ unsigned flags) { #if DEBUG - PRINT_PANIC("null_xtalk_early_piotrans_addr"); + panic("null_xtalk_early_piotrans_addr"); #endif return NULL; } @@ -553,7 +553,7 @@ #else printk(KERN_WARNING "Xbow at 0x%p encountered Fatal error", (void *)xconn); #endif - ioerror_dump("xtalk", error_code, mode, ioerror); + snia_ioerror_dump("xtalk", error_code, mode, ioerror); return IOERROR_UNHANDLED; } @@ -921,7 +921,7 @@ /* Clean out the xwidget information */ (void)kfree(widget_info->w_name); - BZERO((void *)widget_info, sizeof(widget_info)); + memset((void *)widget_info, 0, sizeof(widget_info)); DEL(widget_info); return(0); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/io/snia_if.c linux-2.4.23-pre8/arch/ia64/sn/io/snia_if.c --- linux-2.4.22/arch/ia64/sn/io/snia_if.c 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/io/snia_if.c 2003-10-22 22:47:37.000000000 +0000 @@ -0,0 +1,246 @@ +/* $Id$ + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 2003 Silicon Graphics, Inc. All rights reserved. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include /* Must be before iograph.h to get MAX_PORT_NUM */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if !defined(DEV_FUNC) +extern pciio_provider_t *pciio_to_provider_fns(vertex_hdl_t dev); +#define DEV_FUNC(dev,func) pciio_to_provider_fns(dev)->func +#define CAST_PIOMAP(x) ((pciio_piomap_t)(x)) +#define CAST_DMAMAP(x) ((pciio_dmamap_t)(x)) +#define CAST_INTR(x) ((pciio_intr_t)(x)) +#endif + +/* + * Many functions are not passed their vertex + * information directly; rather, they must + * dive through a resource map. These macros + * are available to coordinate this detail. + */ +#define PIOMAP_FUNC(map,func) DEV_FUNC((map)->pp_dev,func) +#define DMAMAP_FUNC(map,func) DEV_FUNC((map)->pd_dev,func) +#define INTR_FUNC(intr_hdl,func) DEV_FUNC((intr_hdl)->pi_dev,func) + +int +snia_badaddr_val(volatile void *addr, int len, volatile void *ptr) +{ + int ret = 0; + volatile void *new_addr; + + switch (len) { + case 4: + new_addr = (void *) addr; + ret = ia64_sn_probe_io_slot((long)new_addr, len, (void *)ptr); + break; + default: + printk(KERN_WARNING "badaddr_val given len %x but supports len of 4 only\n", len); + } + + if (ret < 0) + panic("badaddr_val: unexpected status (%d) in probing", ret); + return(ret); + +} + + +nasid_t +snia_get_console_nasid(void) +{ + extern nasid_t console_nasid; + extern nasid_t master_baseio_nasid; + + if (console_nasid < 0) { + console_nasid = ia64_sn_get_console_nasid(); + if (console_nasid < 0) { +// ZZZ What do we do if we don't get a console nasid on the hardware???? + if (IS_RUNNING_ON_SIMULATOR() ) + console_nasid = master_baseio_nasid; + } + } + return console_nasid; +} + +nasid_t +snia_get_master_baseio_nasid(void) +{ + extern nasid_t master_baseio_nasid; + extern char master_baseio_wid; + + if (master_baseio_nasid < 0) { + master_baseio_nasid = ia64_sn_get_master_baseio_nasid(); + + if ( master_baseio_nasid >= 0 ) { + master_baseio_wid = WIDGETID_GET(KL_CONFIG_CH_CONS_INFO(master_baseio_nasid)->memory_base); + } + } + return master_baseio_nasid; +} + + +void +snia_ioerror_dump(char *name, int error_code, int error_mode, ioerror_t *ioerror) +{ +#ifdef LATER + /* This needs to be tested */ + + static char *error_mode_string[] = + { "probe", "kernel", "user", "reenable" }; + + printk("%s%s%s%s%s error in %s mode\n", + name, + (error_code & IOECODE_PIO) ? " PIO" : "", + (error_code & IOECODE_DMA) ? " DMA" : "", + (error_code & IOECODE_READ) ? " Read" : "", + (error_code & IOECODE_WRITE) ? " Write" : "", + error_mode_string[error_mode]); + +#define PRFIELD(f) \ + if (IOERROR_FIELDVALID(ioerror,f)) { \ + int tmp; \ + IOERROR_GETVALUE(tmp, ioerror, f); \ + printk("\t%20s: 0x%x\n", #f, tmp); \ + } + + PRFIELD(errortype); /* error type: extra info about error */ + PRFIELD(widgetnum); /* Widget number that's in error */ + PRFIELD(widgetdev); /* Device within widget in error */ + PRFIELD(srccpu); /* CPU on srcnode generating error */ + PRFIELD(srcnode); /* Node which caused the error */ + PRFIELD(errnode); /* Node where error was noticed */ + PRFIELD(sysioaddr); /* Sys specific IO address */ + PRFIELD(xtalkaddr); /* Xtalk (48bit) addr of Error */ + PRFIELD(busspace); /* Bus specific address space */ + PRFIELD(busaddr); /* Bus specific address */ + PRFIELD(vaddr); /* Virtual address of error */ + PRFIELD(memaddr); /* Physical memory address */ + PRFIELD(epc); /* pc when error reported */ + PRFIELD(ef); /* eframe when error reported */ + +#undef PRFIELD + + { + /* Print a more descriptive CPU string */ + cpuid_t srccpu; + IOERROR_GETVALUE(srccpu, ioerror, srccpu); + // smp_processor_id() + printk("(NOTE: CPU %d)\n", srccpu); + printk("\n"); + } +#endif /* LATER */ +} + + +int +snia_pcibr_rrb_alloc(struct pci_dev *pci_dev, + int *count_vchan0, + int *count_vchan1) +{ + vertex_hdl_t dev = PCIDEV_VERTEX(pci_dev); + + return pcibr_rrb_alloc(dev, count_vchan0, count_vchan1); +} + +pciio_endian_t +snia_pciio_endian_set(struct pci_dev *pci_dev, + pciio_endian_t device_end, + pciio_endian_t desired_end) +{ + vertex_hdl_t dev = PCIDEV_VERTEX(pci_dev); + + return DEV_FUNC(dev, endian_set) + (dev, device_end, desired_end); +} + +iopaddr_t +snia_pciio_dmatrans_addr(struct pci_dev *pci_dev, /* translate for this device */ + device_desc_t dev_desc, /* device descriptor */ + paddr_t paddr, /* system physical address */ + size_t byte_count, /* length */ + unsigned flags) +{ /* defined in dma.h */ + + vertex_hdl_t dev = PCIDEV_VERTEX(pci_dev); + + /* + * If the device is not a PIC, we always want the PCIIO_BYTE_STREAM to be + * set. Otherwise, it must not be set. This applies to SN1 and SN2. + */ + return DEV_FUNC(dev, dmatrans_addr) + (dev, dev_desc, paddr, byte_count, flags & ~PCIIO_BYTE_STREAM); +} + +pciio_dmamap_t +snia_pciio_dmamap_alloc(struct pci_dev *pci_dev, /* set up mappings for this device */ + device_desc_t dev_desc, /* device descriptor */ + size_t byte_count_max, /* max size of a mapping */ + unsigned flags) +{ /* defined in dma.h */ + + vertex_hdl_t dev = PCIDEV_VERTEX(pci_dev); + + /* + * If the device is not a PIC, we always want the PCIIO_BYTE_STREAM to be + * set. Otherwise, it must not be set. This applies to SN1 and SN2. + */ + return (pciio_dmamap_t) DEV_FUNC(dev, dmamap_alloc) + (dev, dev_desc, byte_count_max, flags & ~PCIIO_BYTE_STREAM); +} + +void +snia_pciio_dmamap_free(pciio_dmamap_t pciio_dmamap) +{ + DMAMAP_FUNC(pciio_dmamap, dmamap_free) + (CAST_DMAMAP(pciio_dmamap)); +} + +iopaddr_t +snia_pciio_dmamap_addr(pciio_dmamap_t pciio_dmamap, /* use these mapping resources */ + paddr_t paddr, /* map for this address */ + size_t byte_count) +{ /* map this many bytes */ + return DMAMAP_FUNC(pciio_dmamap, dmamap_addr) + (CAST_DMAMAP(pciio_dmamap), paddr, byte_count); +} + +void +snia_pciio_dmamap_done(pciio_dmamap_t pciio_dmamap) +{ + DMAMAP_FUNC(pciio_dmamap, dmamap_done) + (CAST_DMAMAP(pciio_dmamap)); +} + +#include +EXPORT_SYMBOL(snia_pciio_dmatrans_addr); +EXPORT_SYMBOL(snia_pciio_dmamap_alloc); +EXPORT_SYMBOL(snia_pciio_dmamap_free); +EXPORT_SYMBOL(snia_pciio_dmamap_addr); +EXPORT_SYMBOL(snia_pciio_dmamap_done); +EXPORT_SYMBOL(snia_pciio_endian_set); +EXPORT_SYMBOL(snia_pcibr_rrb_alloc); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/kernel/Makefile linux-2.4.23-pre8/arch/ia64/sn/kernel/Makefile --- linux-2.4.22/arch/ia64/sn/kernel/Makefile 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/kernel/Makefile 2003-10-22 22:48:11.000000000 +0000 @@ -44,9 +44,8 @@ subdir-y = sn2 -obj-y = probe.o setup.o sv.o bte.o -obj-y += irq.o mca.o idle.o -obj-y += sn2/sn2.o +obj-y = bte.o idle.o irq.o mca.o probe.o setup.o \ + sn_ivt.o sn2/sn2.o sv.o obj-$(CONFIG_IA64_GENERIC) += machvec.o obj-$(CONFIG_MODULES) += sn_ksyms.o diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/kernel/bte.c linux-2.4.23-pre8/arch/ia64/sn/kernel/bte.c --- linux-2.4.22/arch/ia64/sn/kernel/bte.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/kernel/bte.c 2003-10-22 22:47:29.000000000 +0000 @@ -156,8 +156,8 @@ /* Set the notification register */ BTE_PRINTKV(("IBNA - HUB_S(0x%p, 0x%lx)\n", BTEREG_NOTIF_ADDR, - (TO_PHYS(__tpa(bte->most_rcnt_na))))); - HUB_S(BTEREG_NOTIF_ADDR, (TO_PHYS(__tpa(bte->most_rcnt_na)))); + (TO_PHYS(ia64_tpa(bte->most_rcnt_na))))); + HUB_S(BTEREG_NOTIF_ADDR, (TO_PHYS(ia64_tpa(bte->most_rcnt_na)))); /* Initiate the transfer */ @@ -294,7 +294,7 @@ headBteLen += footBteLen; } else if (footBcopyLen > 0) { rv = bte_copy(footBteSource, - __tpa(bteBlock), + ia64_tpa(bteBlock), footBteLen, mode, NULL); if (rv != BTE_SUCCESS) { return rv; @@ -344,7 +344,7 @@ if (headBcopyLen > 0) { rv = bte_copy(headBteSource, - __tpa(bteBlock), headBteLen, mode, NULL); + ia64_tpa(bteBlock), headBteLen, mode, NULL); if (rv != BTE_SUCCESS) { return rv; } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/kernel/irq.c linux-2.4.23-pre8/arch/ia64/sn/kernel/irq.c --- linux-2.4.22/arch/ia64/sn/kernel/irq.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/kernel/irq.c 2003-10-22 22:47:39.000000000 +0000 @@ -68,6 +68,13 @@ extern void pcibr_force_interrupt(pcibr_intr_t intr); extern int sn_force_interrupt_flag; +struct pcibr_intr_list_t { + struct pcibr_intr_list_t *next; + pcibr_intr_t intr; +}; + +static struct pcibr_intr_list_t **pcibr_intr_list; + static unsigned int @@ -134,14 +141,37 @@ platform_send_ipi(smp_processor_id(), SGI_UART_VECTOR, IA64_IPI_DM_INT, 0); } } - __clear_bit(ivec, (volatile void *)pda.sn_in_service_ivecs); + clear_bit(ivec, (volatile void *)pda.sn_in_service_ivecs); if (sn_force_interrupt_flag) force_interrupt(irq); } static void -sn_set_affinity_irq(unsigned int irq, unsigned long mask) +sn_set_affinity_irq(unsigned int irq, unsigned long cpu) { + int redir = 0; + struct pcibr_intr_list_t *p = pcibr_intr_list[irq]; + pcibr_intr_t intr; + extern void sn_shub_redirect_intr(pcibr_intr_t intr, unsigned long cpu); + extern void sn_tio_redirect_intr(pcibr_intr_t intr, unsigned long cpu); + + if (p == NULL) + return; + + intr = p->intr; + + if (intr == NULL) + return; + + if (IS_PIC_SOFT(intr->bi_soft) ) { + sn_shub_redirect_intr(intr, cpu); + // Defer TIO for now. + // } else if (IS_TIO_SOFT(intr->bi_soft) { + // sn_tio_redirect_intr(intr, cpu); + } else { + return; + } + (void) set_irq_affinity_info(irq, cpu_physical_id(cpu), redir); } @@ -181,7 +211,7 @@ int i; irq_desc_t *base_desc = _irq_desc; - for (i=IA64_FIRST_DEVICE_VECTOR; ibi_cpu; if (pcibr_intr_list == NULL) { pcibr_intr_list = kmalloc(sizeof(struct pcibr_intr_list_t *) * NR_IRQS, GFP_KERNEL); @@ -227,7 +250,7 @@ if (pdacpu(cpu).sn_last_irq < irq) { pdacpu(cpu).sn_last_irq = irq; } - if (pdacpu(cpu).sn_first_irq > irq) pdacpu(cpu).sn_first_irq = irq; + if (pdacpu(cpu).sn_first_irq == 0 || pdacpu(cpu).sn_first_irq > irq) pdacpu(cpu).sn_first_irq = irq; if (!p) panic("Could not allocate memory for pcibr_intr_list_t\n"); if ((list = pcibr_intr_list[irq])) { while (list->next) list = list->next; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/kernel/led.c linux-2.4.23-pre8/arch/ia64/sn/kernel/led.c --- linux-2.4.22/arch/ia64/sn/kernel/led.c 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/kernel/led.c 2003-10-22 22:48:41.000000000 +0000 @@ -0,0 +1,56 @@ +/* + * + * + * Copyright (c) 2003 Silicon Graphics, Inc. All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of version 2 of the GNU General Public License + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it would be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * Further, this software is distributed without any warranty that it is + * free of the rightful claim of any third person regarding infringement + * or the like. Any license provided herein, whether implied or + * otherwise, applies only to this software file. Patent licenses, if + * any, provided herein do not apply to combinations of this program with + * other software, or any other product whatsoever. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. + * + * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, + * Mountain View, CA 94043, or: + * + * http://www.sgi.com + * + * For further information regarding this notice, see: + * + * http://oss.sgi.com/projects/GenInfo/NoticeExplan + */ + +#include +#include +#include + +struct timer_list sn_led_timer; + +static void +sn_led_timeout (unsigned long arg) +{ + set_led_bits(pda.hb_state ^= LED_CPU_HEARTBEAT, LED_CPU_HEARTBEAT); + sn_led_timer.expires = jiffies + HZ/2; + add_timer(&sn_led_timer); +} + +void __init +sn_led_timer_init (void) +{ + init_timer(&sn_led_timer); + sn_led_timer.expires = jiffies + HZ/2; + sn_led_timer.function = &sn_led_timeout; + add_timer(&sn_led_timer); +} diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/kernel/setup.c linux-2.4.23-pre8/arch/ia64/sn/kernel/setup.c --- linux-2.4.22/arch/ia64/sn/kernel/setup.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/kernel/setup.c 2003-10-22 22:49:21.000000000 +0000 @@ -56,8 +56,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -71,7 +73,7 @@ #include #include -#define pxm_to_nasid(pxm) ((pxm)<<1) +#define pxm_to_nasid(pxm) (((pxm)<<1) | (get_nasid() & ~0x1ff)) #define MAX_PHYS_MEMORY (1UL << 49) /* 1 TB */ @@ -79,8 +81,12 @@ extern void bte_init_cpu (void); extern void sn_timer_init(void); extern unsigned long last_time_offset; +extern void init_platform_hubinfo(nodepda_t **nodepdaindr); extern void (*ia64_mark_idle)(int); +extern void (*ia64_platform_timer_extras)(void); +extern void sn_timer_interrupt_extras(void); extern void snidle(int); +extern unsigned char acpi_kbd_controller_present; unsigned long sn_rtc_cycles_per_second; @@ -90,6 +96,7 @@ short physical_node_map[MAX_PHYSNODE_ID]; +int numionodes; /* * This is the address of the RRegs in the HSpace of the global * master. It is used by a hack in serial.c (serial_[in|out], @@ -223,7 +230,77 @@ shub_1_1_found = 1; } +/* + * SN2 requires very slightly different alternate data-TLB miss handle than what + * the mainline linux kernel provides. At some point this approach could be used + * to allow the use of the low-memory thrown away on other platforms when VGA is + * present. + * + * On SN2 we want to load small TCs for granule-0 (and aliases of) faulting + * addresses. The details of this are more sublte than at which they first + * appear. + */ +static void __init +sn2_replace_ivt(void) +{ + extern unsigned char alt_dtlb_miss[], ia64_ivt_page_fault[]; + extern unsigned char sn2_alt_dtlb_miss[], sn2_alt_dtlb_miss_end[]; + extern unsigned char sn2_alt_dtlb_miss_patch1[]; + + unsigned char *s, *d; + u64 *p; + u64 len = (u64)sn2_alt_dtlb_miss_end - (u64)sn2_alt_dtlb_miss; + u64 broffs = (ia64_ivt_page_fault - alt_dtlb_miss) - (sn2_alt_dtlb_miss_patch1 - sn2_alt_dtlb_miss); + u64 psr; + int i; + + /* printk(KERN_DEBUG "Replacing alternate data-TLB miss handler.\n"); */ + + /* Check the code isn't too large */ + if (len > 1024) { + printk(KERN_ERR "SGI: Specific alt_dtlb_misse too large! Not replacing\n"); + return; + } + + /* check the offset is sane (should always be) */ + if ((broffs>>4) + (1<<20) >= (1<<21)) { + printk(KERN_ERR "SGI: IVT patch ivt offset %ld invalid! Not replacing!\n", broffs); + return; + } + + /* 2nd half of bundle to patch (has slot 2) */ + p = (u64*)sn2_alt_dtlb_miss_patch1 + 1; + /* patch the offset into slot 2 (imm20b + s) */ + *p = (*p & ~(0x8fffff000000000)) | ((broffs & 0x1000000) << 35) | ((broffs & 0x0fffff0) << 32); + + /* don't want any interrupts when doing this */ + psr = ia64_clear_ic(); + + /* copy over the existing code, flush i-cache as required */ + d = alt_dtlb_miss; + s = sn2_alt_dtlb_miss; + for (i=0; ipernode_pdaindr, nodepdaindr, sizeof(nodepdaindr)); @@ -362,8 +482,16 @@ */ for (cnode = 0; cnode < numnodes; cnode++) { init_platform_nodepda(nodepdaindr[cnode], cnode); + spin_lock_init(&nodepdaindr[cnode]->bist_lock); bte_init_node (nodepdaindr[cnode], cnode); } + + /* + * Handle TIO differently .. we do not do BTE init .. + */ + for (cnode = numnodes; cnode < numionodes; cnode++) { + init_platform_nodepda(nodepdaindr[cnode], cnode); + } } /** @@ -383,6 +511,7 @@ int nasid; int slice; int cnode, i; + static int wars_have_been_checked = 0; /* * The boot cpu makes this call again after platform initialization is @@ -407,11 +536,22 @@ pda.hb_count = HZ/2; pda.hb_state = 0; pda.idle_flag = 0; - pda.shub_1_1_found = shub_1_1_found; memset(pda.cnodeid_to_nasid_table, -1, sizeof(pda.cnodeid_to_nasid_table)); for (i=0; iactive_cpu_count == 1) nodepda->node_first_cpu = cpuid; @@ -444,3 +584,27 @@ bte_init_cpu(); } + +/* + * Scan klconfig for TIO's. Add the TIO nasids to the + * physical_node_map and the pda and increment numionodes. + */ + +void +scan_for_ionodes() { + int nasid = 0; + lboard_t *brd; + + /* Scan all compute nodes. */ + for (nasid = 0; nasid < MAX_PHYSNODE_ID; nasid +=2) { + /* if there's no nasid, don't try to read the klconfig on the node */ + if (physical_node_map[nasid] == -1) continue; + brd = find_lboard((lboard_t *)KL_CONFIG_INFO(nasid), KLTYPE_TIO); + while (brd) { + pda.cnodeid_to_nasid_table[numionodes] = brd->brd_nasid; + physical_node_map[brd->brd_nasid] = numionodes++; + brd = KLCF_NEXT(brd); + brd = find_lboard(brd, KLTYPE_TIO); + } + } +} diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/kernel/sn2/Makefile linux-2.4.23-pre8/arch/ia64/sn/kernel/sn2/Makefile --- linux-2.4.22/arch/ia64/sn/kernel/sn2/Makefile 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/kernel/sn2/Makefile 2003-10-22 22:49:43.000000000 +0000 @@ -44,6 +44,6 @@ export-objs := io.o obj-y = cache.o io.o ptc_deadlock.o sn2_smp.o sn_proc_fs.o \ - prominfo_proc.o timer.o + prominfo_proc.o timer.o timer_interrupt.o include $(TOPDIR)/Rules.make diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/kernel/sn2/cache.c linux-2.4.23-pre8/arch/ia64/sn/kernel/sn2/cache.c --- linux-2.4.22/arch/ia64/sn/kernel/sn2/cache.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/kernel/sn2/cache.c 2003-10-22 22:48:20.000000000 +0000 @@ -23,6 +23,18 @@ void sn_flush_all_caches(long flush_addr, long bytes) { + /* + * The following double call to flush_icache_range has + * the following effect which is required: + * + * The first flush_icache_range ensures the fc() address + * is visible on the FSB. The NUMA controller however has + * not necessarily forwarded the fc() request to all other + * NUMA controllers. The second call will stall + * at the associated fc() instruction until the first + * has been forwarded to all other NUMA controllers. + */ + flush_icache_range(flush_addr, flush_addr+bytes); flush_icache_range(flush_addr, flush_addr+bytes); mb(); } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/kernel/sn2/sn_proc_fs.c linux-2.4.23-pre8/arch/ia64/sn/kernel/sn2/sn_proc_fs.c --- linux-2.4.22/arch/ia64/sn/kernel/sn2/sn_proc_fs.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/kernel/sn2/sn_proc_fs.c 2003-10-22 22:47:50.000000000 +0000 @@ -36,6 +36,7 @@ #ifdef CONFIG_PROC_FS #include #include +#include static int partition_id_read_proc(char *page, char **start, off_t off, @@ -184,12 +185,66 @@ } } +#define SHUB_MAX_VERSION 3 +static struct proc_dir_entry **proc_entries; +static char* shub_revision[SHUB_MAX_VERSION+1] = { + "unknown", + "1.0", + "1.1", + "1.2" +}; + +static int +read_shub_info_entry(char* page, char **start, off_t off, int count, int *eof, + void* data) { + unsigned long id; + int rev; + int nasid = (long) data; /* Data contains NASID of this node */ + int len = 0; + + id = REMOTE_HUB_L(nasid, SH_SHUB_ID); + rev = (id & SH_SHUB_ID_REVISION_MASK) >> SH_SHUB_ID_REVISION_SHFT; + len += sprintf(&page[len], "type : SHub\n"); + len += sprintf(&page[len], "revision : %s\n", + (rev <= SHUB_MAX_VERSION) ? shub_revision[rev] : "unknown"); + len += sprintf(&page[len], "nasid : %d\n", nasid); + + return len; +} + +static void +register_sn_nodes(void) { + struct proc_dir_entry **entp; + cnodeid_t cnodeid; + nasid_t nasid; + char name[11]; + + if (!sgi_proc_dir) { + sgi_proc_dir = proc_mkdir("sgi_sn", 0); + } + + proc_entries = kmalloc(numnodes * sizeof(struct proc_dir_entry *), + GFP_KERNEL); + + for (cnodeid = 0, entp = proc_entries; + cnodeid < numnodes; + cnodeid++, entp++) { + sprintf(name, "node%d", cnodeid); + *entp = proc_mkdir(name, sgi_proc_dir); + nasid = cnodeid_to_nasid(cnodeid); + create_proc_read_entry( + "hubinfo", 0, *entp, read_shub_info_entry, + (void*) (long) nasid); + } +} + void register_sn_procfs(void) { register_sn_partition_id(); register_sn_serial_numbers(); register_sn_force_interrupt(); register_sn_linkstats(); + register_sn_nodes(); } #endif /* CONFIG_PROC_FS */ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/kernel/sn2/timer.c linux-2.4.23-pre8/arch/ia64/sn/kernel/sn2/timer.c --- linux-2.4.22/arch/ia64/sn/kernel/sn2/timer.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/kernel/sn2/timer.c 2003-10-22 22:47:44.000000000 +0000 @@ -34,7 +34,7 @@ */ extern unsigned long wall_jiffies; /* from kernel/timer.c */ -static volatile long rtc_offset; +static volatile long rtc_offset __cacheline_aligned; static long rtc_cycles_per_usec; static long rtc_per_timer_tick; @@ -86,7 +86,6 @@ last_wall_rtc = GET_RTC_COUNTER(); } - void __init sn_timer_init(void) { diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/kernel/sn2/timer_interrupt.c linux-2.4.23-pre8/arch/ia64/sn/kernel/sn2/timer_interrupt.c --- linux-2.4.22/arch/ia64/sn/kernel/sn2/timer_interrupt.c 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/kernel/sn2/timer_interrupt.c 2003-10-22 22:48:55.000000000 +0000 @@ -0,0 +1,60 @@ +/* + * + * + * Copyright (c) 2003 Silicon Graphics, Inc. All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of version 2 of the GNU General Public License + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it would be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * Further, this software is distributed without any warranty that it is + * free of the rightful claim of any third person regarding infringement + * or the like. Any license provided herein, whether implied or + * otherwise, applies only to this software file. Patent licenses, if + * any, provided herein do not apply to combinations of this program with + * other software, or any other product whatsoever. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. + * + * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, + * Mountain View, CA 94043, or: + * + * http://www.sgi.com + * + * For further information regarding this notice, see: + * + * http://oss.sgi.com/projects/GenInfo/NoticeExplan + */ + +#include +#include + +extern void sn_lb_int_war_check(void); +#define SN_LB_INT_WAR_INTERVAL 100 + +void +sn_timer_interrupt_extras(void) +{ + /* LED blinking */ + if (!pda.hb_count--) { + pda.hb_count = HZ/2; + set_led_bits(pda.hb_state ^= LED_CPU_HEARTBEAT, LED_CPU_HEARTBEAT); + } + + if (enable_shub_wars_1_1()) { + /* Bugfix code for SHUB 1.1 */ + if (pda.pio_shub_war_cam_addr) + *pda.pio_shub_war_cam_addr = 0x8000000000000010UL; + } + if (pda.sn_lb_int_war_ticks == 0) + sn_lb_int_war_check(); + pda.sn_lb_int_war_ticks++; + if (pda.sn_lb_int_war_ticks >= SN_LB_INT_WAR_INTERVAL) + pda.sn_lb_int_war_ticks = 0; +} diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/kernel/sn2_smp.c linux-2.4.23-pre8/arch/ia64/sn/kernel/sn2_smp.c --- linux-2.4.22/arch/ia64/sn/kernel/sn2_smp.c 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/kernel/sn2_smp.c 2003-10-22 22:49:56.000000000 +0000 @@ -0,0 +1,242 @@ +/* + * SN2 Platform specific SMP Support + * + * Copyright (C) 2000-2003 Silicon Graphics, Inc. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of version 2 of the GNU General Public License + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it would be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * Further, this software is distributed without any warranty that it is + * free of the rightful claim of any third person regarding infringement + * or the like. Any license provided herein, whether implied or + * otherwise, applies only to this software file. Patent licenses, if + * any, provided herein do not apply to combinations of this program with + * other software, or any other product whatsoever. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. + * + * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, + * Mountain View, CA 94043, or: + * + * http://www.sgi.com + * + * For further information regarding this notice, see: + * + * http://oss.sgi.com/projects/GenInfo/NoticeExplan + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +void sn2_ptc_deadlock_recovery(unsigned long data0, unsigned long data1); + + +static spinlock_t sn2_global_ptc_lock __cacheline_aligned = SPIN_LOCK_UNLOCKED; + +static unsigned long sn2_ptc_deadlock_count; + + +static inline unsigned long +wait_piowc(void) +{ + volatile unsigned long *piows; + unsigned long ws; + + piows = pda.pio_write_status_addr; + do { + __asm__ __volatile__ ("mf.a" ::: "memory"); + } while (((ws = *piows) & SH_PIO_WRITE_STATUS_0_PENDING_WRITE_COUNT_MASK) != + SH_PIO_WRITE_STATUS_0_PENDING_WRITE_COUNT_MASK); + return ws; +} + + + +/** + * sn2_global_tlb_purge - globally purge translation cache of virtual address range + * @start: start of virtual address range + * @end: end of virtual address range + * @nbits: specifies number of bytes to purge per instruction (num = 1<<(nbits & 0xfc)) + * + * Purges the translation caches of all processors of the given virtual address + * range. + */ + +void +sn2_global_tlb_purge (unsigned long start, unsigned long end, unsigned long nbits) +{ + int cnode, mycnode, nasid, flushed=0; + volatile unsigned long *ptc0, *ptc1; + unsigned long flags=0, data0, data1; + + data0 = (1UL<>8)< + * David Mosberger + * + * Copyright (c) 2003 Silicon Graphics, Inc. All Rights Reserved. + * + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +/* If someone has a *really* good reason to disable the VHPT for SN2 I'll fix this. --cw */ +#ifdef CONFIG_DISABLE_VHPT +#error SN2 requires VHPT be enabled +#endif + + .section ".text.init", "ax" + +/* + * SN2 specific region 6/7 dtlb miss handler. + * + * On SN2 some granule-0 addresses (and therefore any aliases) are + * actually used uncachable. We load small TC entries to ensure there + * is no-overlap between such regions (which could cause a Cache-Check + * MCA). + */ +#define SN2_GMASK (((1 << (36-IA64_GRANULE_SHIFT)) - 1) << IA64_GRANULE_SHIFT) + .global sn2_alt_dtlb_miss +ENTRY(sn2_alt_dtlb_miss) + mov r16=cr.ifa // get address that caused the TLB miss + movl r17=PAGE_KERNEL // kernel protection bits (RWX) + mov r20=cr.isr // need to check for SP and NA status + movl r19=(((1< region 6) + and r24=r27,r16 // mask away all but region bits + ;; + cmp.ne.andcm p10,p0=r0,r24 // p10 <- region-6 AND granule-0 + +/* arch/ia64/sn/kernel/setup.c patches this code, you should check there if you need to mess about with this */ + .global sn2_alt_dtlb_miss_patch1 +sn2_alt_dtlb_miss_patch1: + { .mib +(p9) cmp.eq.or.andcm p6,p7=IA64_ISR_CODE_LFETCH,r22 // check isr.code field + cmp.ne p8,p0=r0,r23 // p8 <- cpl == 0? +(p8) br.cond.spnt.many ia64_ivt_page_fault // NB: gets patched + } + + ;; +(p10) mov cr.itir=r25 // use smaller pagesize for tc + dep r21=-1,r21,IA64_PSR_ED_BIT,1 // r21 is psr with ED enabled + or r19=r19,r17 // insert PTE control bits into r19 + ;; +(p6) mov cr.ipsr=r21 // p6 (speculation): set ed (else we can get stuck) +(p11) dep r19=-1,r19,4,1 // set bit 4 (uncached) if the access was to region 6 + ;; +(p7) itc.d r19 // insert the TLB entry + mov pr=r31,-1 // restore pr's + rfi +END(alt_dtlb_miss) + .align 8 + .global sn2_alt_dtlb_miss_end +sn2_alt_dtlb_miss_end: diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/sn/kernel/sn_ksyms.c linux-2.4.23-pre8/arch/ia64/sn/kernel/sn_ksyms.c --- linux-2.4.22/arch/ia64/sn/kernel/sn_ksyms.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/sn/kernel/sn_ksyms.c 2003-10-22 22:49:45.000000000 +0000 @@ -64,7 +64,6 @@ #include EXPORT_SYMBOL(sal_lock); EXPORT_SYMBOL(sn_partid); -EXPORT_SYMBOL(sn_local_partid); EXPORT_SYMBOL(sn_system_serial_number_string); EXPORT_SYMBOL(sn_partition_serial_number); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ia64/tools/print_offsets.c linux-2.4.23-pre8/arch/ia64/tools/print_offsets.c --- linux-2.4.22/arch/ia64/tools/print_offsets.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/ia64/tools/print_offsets.c 2003-10-22 22:49:35.000000000 +0000 @@ -1,6 +1,7 @@ /* * Utility to generate asm-ia64/offsets.h. * + * Copyright (C) 2002-2003 Fenghua Yu * Copyright (C) 1999-2001 Hewlett-Packard Co * David Mosberger-Tang * @@ -63,6 +64,14 @@ #endif { "IA64_TASK_PID_OFFSET", offsetof (struct task_struct, pid) }, { "IA64_TASK_MM_OFFSET", offsetof (struct task_struct, mm) }, + { "IA64_PT_REGS_B6_OFFSET", offsetof (struct pt_regs, b6) }, + { "IA64_PT_REGS_B7_OFFSET", offsetof (struct pt_regs, b7) }, + { "IA64_PT_REGS_AR_CSD_OFFSET", offsetof (struct pt_regs, ar_csd) }, + { "IA64_PT_REGS_AR_SSD_OFFSET", offsetof (struct pt_regs, ar_ssd) }, + { "IA64_PT_REGS_R8_OFFSET", offsetof (struct pt_regs, r8) }, + { "IA64_PT_REGS_R9_OFFSET", offsetof (struct pt_regs, r9) }, + { "IA64_PT_REGS_R10_OFFSET", offsetof (struct pt_regs, r10) }, + { "IA64_PT_REGS_R11_OFFSET", offsetof (struct pt_regs, r11) }, { "IA64_PT_REGS_CR_IPSR_OFFSET", offsetof (struct pt_regs, cr_ipsr) }, { "IA64_PT_REGS_CR_IIP_OFFSET", offsetof (struct pt_regs, cr_iip) }, { "IA64_PT_REGS_CR_IFS_OFFSET", offsetof (struct pt_regs, cr_ifs) }, @@ -72,19 +81,16 @@ { "IA64_PT_REGS_AR_RNAT_OFFSET", offsetof (struct pt_regs, ar_rnat) }, { "IA64_PT_REGS_AR_BSPSTORE_OFFSET",offsetof (struct pt_regs, ar_bspstore) }, { "IA64_PT_REGS_PR_OFFSET", offsetof (struct pt_regs, pr) }, - { "IA64_PT_REGS_B6_OFFSET", offsetof (struct pt_regs, b6) }, + { "IA64_PT_REGS_B0_OFFSET", offsetof (struct pt_regs, b0) }, { "IA64_PT_REGS_LOADRS_OFFSET", offsetof (struct pt_regs, loadrs) }, { "IA64_PT_REGS_R1_OFFSET", offsetof (struct pt_regs, r1) }, - { "IA64_PT_REGS_R2_OFFSET", offsetof (struct pt_regs, r2) }, - { "IA64_PT_REGS_R3_OFFSET", offsetof (struct pt_regs, r3) }, { "IA64_PT_REGS_R12_OFFSET", offsetof (struct pt_regs, r12) }, { "IA64_PT_REGS_R13_OFFSET", offsetof (struct pt_regs, r13) }, - { "IA64_PT_REGS_R14_OFFSET", offsetof (struct pt_regs, r14) }, + { "IA64_PT_REGS_AR_FPSR_OFFSET", offsetof (struct pt_regs, ar_fpsr) }, { "IA64_PT_REGS_R15_OFFSET", offsetof (struct pt_regs, r15) }, - { "IA64_PT_REGS_R8_OFFSET", offsetof (struct pt_regs, r8) }, - { "IA64_PT_REGS_R9_OFFSET", offsetof (struct pt_regs, r9) }, - { "IA64_PT_REGS_R10_OFFSET", offsetof (struct pt_regs, r10) }, - { "IA64_PT_REGS_R11_OFFSET", offsetof (struct pt_regs, r11) }, + { "IA64_PT_REGS_R14_OFFSET", offsetof (struct pt_regs, r14) }, + { "IA64_PT_REGS_R2_OFFSET", offsetof (struct pt_regs, r2) }, + { "IA64_PT_REGS_R3_OFFSET", offsetof (struct pt_regs, r3) }, { "IA64_PT_REGS_R16_OFFSET", offsetof (struct pt_regs, r16) }, { "IA64_PT_REGS_R17_OFFSET", offsetof (struct pt_regs, r17) }, { "IA64_PT_REGS_R18_OFFSET", offsetof (struct pt_regs, r18) }, @@ -102,21 +108,18 @@ { "IA64_PT_REGS_R30_OFFSET", offsetof (struct pt_regs, r30) }, { "IA64_PT_REGS_R31_OFFSET", offsetof (struct pt_regs, r31) }, { "IA64_PT_REGS_AR_CCV_OFFSET", offsetof (struct pt_regs, ar_ccv) }, - { "IA64_PT_REGS_AR_FPSR_OFFSET", offsetof (struct pt_regs, ar_fpsr) }, - { "IA64_PT_REGS_B0_OFFSET", offsetof (struct pt_regs, b0) }, - { "IA64_PT_REGS_B7_OFFSET", offsetof (struct pt_regs, b7) }, { "IA64_PT_REGS_F6_OFFSET", offsetof (struct pt_regs, f6) }, { "IA64_PT_REGS_F7_OFFSET", offsetof (struct pt_regs, f7) }, { "IA64_PT_REGS_F8_OFFSET", offsetof (struct pt_regs, f8) }, { "IA64_PT_REGS_F9_OFFSET", offsetof (struct pt_regs, f9) }, + { "IA64_PT_REGS_F10_OFFSET", offsetof (struct pt_regs, f10) }, + { "IA64_PT_REGS_F11_OFFSET", offsetof (struct pt_regs, f11) }, { "IA64_SWITCH_STACK_CALLER_UNAT_OFFSET", offsetof (struct switch_stack, caller_unat) }, { "IA64_SWITCH_STACK_AR_FPSR_OFFSET", offsetof (struct switch_stack, ar_fpsr) }, { "IA64_SWITCH_STACK_F2_OFFSET", offsetof (struct switch_stack, f2) }, { "IA64_SWITCH_STACK_F3_OFFSET", offsetof (struct switch_stack, f3) }, { "IA64_SWITCH_STACK_F4_OFFSET", offsetof (struct switch_stack, f4) }, { "IA64_SWITCH_STACK_F5_OFFSET", offsetof (struct switch_stack, f5) }, - { "IA64_SWITCH_STACK_F10_OFFSET", offsetof (struct switch_stack, f10) }, - { "IA64_SWITCH_STACK_F11_OFFSET", offsetof (struct switch_stack, f11) }, { "IA64_SWITCH_STACK_F12_OFFSET", offsetof (struct switch_stack, f12) }, { "IA64_SWITCH_STACK_F13_OFFSET", offsetof (struct switch_stack, f13) }, { "IA64_SWITCH_STACK_F14_OFFSET", offsetof (struct switch_stack, f14) }, diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/m68k/apollo/dn_ints.c linux-2.4.23-pre8/arch/m68k/apollo/dn_ints.c --- linux-2.4.22/arch/m68k/apollo/dn_ints.c 2002-11-28 23:53:09.000000000 +0000 +++ linux-2.4.23-pre8/arch/m68k/apollo/dn_ints.c 2003-10-22 22:49:09.000000000 +0000 @@ -43,7 +43,7 @@ int dn_request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *), unsigned long flags, const char *devname, void *dev_id) { if((irq<0) || (irq>15)) { - printk("Trying to request illegal IRQ\n"); + printk("Trying to request invalid IRQ\n"); return -ENXIO; } @@ -69,7 +69,7 @@ void dn_free_irq(unsigned int irq, void *dev_id) { if((irq<0) || (irq>15)) { - printk("Trying to free illegal IRQ\n"); + printk("Trying to free invalid IRQ\n"); return ; } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/m68k/atari/time.c linux-2.4.23-pre8/arch/m68k/atari/time.c --- linux-2.4.22/arch/m68k/atari/time.c 2002-08-03 00:39:43.000000000 +0000 +++ linux-2.4.23-pre8/arch/m68k/atari/time.c 2003-10-22 22:49:17.000000000 +0000 @@ -16,7 +16,7 @@ #include #include -#include +#include void __init atari_sched_init(void (*timer_routine)(int, void *, struct pt_regs *)) diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/m68k/config.in linux-2.4.23-pre8/arch/m68k/config.in --- linux-2.4.22/arch/m68k/config.in 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/m68k/config.in 2003-10-22 22:49:14.000000000 +0000 @@ -320,9 +320,9 @@ tristate ' EQL (serial line load balancing) support' CONFIG_EQUALIZER if [ "$CONFIG_ZORRO" = "y" ]; then tristate ' Ariadne support' CONFIG_ARIADNE - tristate ' Ariadne II support' CONFIG_ARIADNE2 tristate ' A2065 support' CONFIG_A2065 tristate ' Hydra support' CONFIG_HYDRA + tristate ' Zorro NS8390-based Ethernet support' CONFIG_ZORRO8390 fi if [ "$CONFIG_AMIGA_PCMCIA" = "y" ]; then tristate ' PCMCIA NE2000 support' CONFIG_APNE @@ -513,14 +513,10 @@ bool ' Disable watchdog shutdown on close' CONFIG_WATCHDOG_NOWAYOUT bool ' Software Watchdog' CONFIG_SOFT_WATCHDOG fi -if [ "$CONFIG_ATARI" = "y" ]; then - bool 'Enhanced Real Time Clock Support' CONFIG_RTC +if [ "$CONFIG_SUN3" = "y" ]; then + define_bool CONFIG_GEN_RTC y else - if [ "$CONFIG_SUN3" = "y" ]; then - define_bool CONFIG_GEN_RTC y - else - tristate 'Generic /dev/rtc emulation' CONFIG_GEN_RTC - fi + tristate 'Generic /dev/rtc emulation' CONFIG_GEN_RTC fi if [ "$CONFIG_GEN_RTC" != "n" ]; then bool ' Extended RTC operation' CONFIG_GEN_RTC_X @@ -560,6 +556,8 @@ bool ' Verbose BUG() reporting' CONFIG_DEBUG_BUGVERBOSE fi +int 'Kernel messages buffer length shift (0 = default)' CONFIG_LOG_BUF_SHIFT 0 + endmenu source crypto/Config.in diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/m68k/defconfig linux-2.4.23-pre8/arch/m68k/defconfig --- linux-2.4.22/arch/m68k/defconfig 2000-06-19 19:56:08.000000000 +0000 +++ linux-2.4.23-pre8/arch/m68k/defconfig 2003-10-22 22:47:36.000000000 +0000 @@ -177,7 +177,7 @@ # CONFIG_PPP is not set # CONFIG_EQUALIZER is not set # CONFIG_ARIADNE is not set -# CONFIG_ARIADNE2 is not set +# CONFIG_ZORRO8390 is not set # CONFIG_A2065 is not set # CONFIG_HYDRA is not set diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/m68k/kernel/ptrace.c linux-2.4.23-pre8/arch/m68k/kernel/ptrace.c --- linux-2.4.22/arch/m68k/kernel/ptrace.c 2002-08-03 00:39:43.000000000 +0000 +++ linux-2.4.23-pre8/arch/m68k/kernel/ptrace.c 2003-10-22 22:48:20.000000000 +0000 @@ -133,14 +133,9 @@ ret = ptrace_attach(child); goto out_tsk; } - ret = -ESRCH; - if (!(child->ptrace & PT_PTRACED)) - goto out_tsk; - if (child->state != TASK_STOPPED) { - if (request != PTRACE_KILL) - goto out_tsk; - } - if (child->p_pptr != current) + + ret = ptrace_check_attach(child, request == PTRACE_KILL); + if (ret < 0) goto out_tsk; switch (request) { diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/m68k/math-emu/fp_emu.h linux-2.4.23-pre8/arch/m68k/math-emu/fp_emu.h --- linux-2.4.22/arch/m68k/math-emu/fp_emu.h 2002-08-03 00:39:43.000000000 +0000 +++ linux-2.4.23-pre8/arch/m68k/math-emu/fp_emu.h 2003-10-22 22:47:30.000000000 +0000 @@ -115,6 +115,15 @@ __res; \ }) +#define fp_conv_long2ext(dest, src) ({ \ + register struct fp_ext *__dest asm ("a0") = dest; \ + register int __src asm ("d0") = src; \ + \ + asm volatile ("jsr fp_conv_ext2long" \ + : : "d" (__src), "a" (__dest) \ + : "a1", "d1", "d2", "memory"); \ +}) + #else /* __ASSEMBLY__ */ /* diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/m68k/math-emu/fp_log.c linux-2.4.23-pre8/arch/m68k/math-emu/fp_log.c --- linux-2.4.22/arch/m68k/math-emu/fp_log.c 1999-08-15 18:47:29.000000000 +0000 +++ linux-2.4.23-pre8/arch/m68k/math-emu/fp_log.c 2003-10-22 22:47:28.000000000 +0000 @@ -17,10 +17,22 @@ #include "fp_emu.h" +static const struct fp_ext fp_one = +{ + 0, 0, 0x3fff, { 0 } +}; + +extern struct fp_ext *fp_fadd(struct fp_ext *dest, const struct fp_ext *src); +extern struct fp_ext *fp_fdiv(struct fp_ext *dest, const struct fp_ext *src); +extern struct fp_ext *fp_fmul(struct fp_ext *dest, const struct fp_ext *src); + struct fp_ext * fp_fsqrt(struct fp_ext *dest, struct fp_ext *src) { - uprint("fsqrt\n"); + struct fp_ext tmp, src2; + int i, exp; + + dprint(PINSTR, "fsqrt\n"); fp_monadic_check(dest, src); @@ -34,6 +46,56 @@ if (IS_INF(dest)) return dest; + /* + * sqrt(m) * 2^(p) , if e = 2*p + * sqrt(m*2^e) = + * sqrt(2*m) * 2^(p) , if e = 2*p + 1 + * + * So we use the last bit of the exponent to decide wether to + * use the m or 2*m. + * + * Since only the fractional part of the mantissa is stored and + * the integer part is assumed to be one, we place a 1 or 2 into + * the fixed point representation. + */ + exp = dest->exp; + dest->exp = 0x3FFF; + if (!(exp & 1)) /* lowest bit of exponent is set */ + dest->exp++; + fp_copy_ext(&src2, dest); + + /* + * The taylor row arround a for sqrt(x) is: + * sqrt(x) = sqrt(a) + 1/(2*sqrt(a))*(x-a) + R + * With a=1 this gives: + * sqrt(x) = 1 + 1/2*(x-1) + * = 1/2*(1+x) + */ + fp_fadd(dest, &fp_one); + dest->exp--; /* * 1/2 */ + + /* + * We now apply the newton rule to the function + * f(x) := x^2 - r + * which has a null point on x = sqrt(r). + * + * It gives: + * x' := x - f(x)/f'(x) + * = x - (x^2 -r)/(2*x) + * = x - (x - r/x)/2 + * = (2*x - x + r/x)/2 + * = (x + r/x)/2 + */ + for (i = 0; i < 9; i++) { + fp_copy_ext(&tmp, &src2); + + fp_fdiv(&tmp, dest); + fp_fadd(dest, &tmp); + dest->exp--; + } + + dest->exp += (exp - 0x3FFF) / 2; + return dest; } @@ -123,20 +185,39 @@ struct fp_ext * fp_fgetexp(struct fp_ext *dest, struct fp_ext *src) { - uprint("fgetexp\n"); + dprint(PINSTR, "fgetexp\n"); fp_monadic_check(dest, src); + if (IS_INF(dest)) { + fp_set_nan(dest); + return dest; + } + if (IS_ZERO(dest)) + return dest; + + fp_conv_long2ext(dest, (int)dest->exp - 0x3FFF); + + fp_normalize_ext(dest); + return dest; } struct fp_ext * fp_fgetman(struct fp_ext *dest, struct fp_ext *src) { - uprint("fgetman\n"); + dprint(PINSTR, "fgetman\n"); fp_monadic_check(dest, src); + if (IS_ZERO(dest)) + return dest; + + if (IS_INF(dest)) + return dest; + + dest->exp = 0x3FFF; + return dest; } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/m68k/mm/kmap.c linux-2.4.23-pre8/arch/m68k/mm/kmap.c --- linux-2.4.22/arch/m68k/mm/kmap.c 2001-02-09 19:29:44.000000000 +0000 +++ linux-2.4.23-pre8/arch/m68k/mm/kmap.c 2003-10-22 22:48:41.000000000 +0000 @@ -71,7 +71,7 @@ addr = tmp->size + (unsigned long)tmp->addr; } area->addr = (void *)addr; - area->size = size + IO_SIZE; + area->size = size + IO_SIZE; /* leave a gap between */ area->next = *p; *p = area; return area; @@ -87,7 +87,10 @@ for (p = &iolist ; (tmp = *p) ; p = &tmp->next) { if (tmp->addr == addr) { *p = tmp->next; - __iounmap(tmp->addr, tmp->size); + if ( tmp->size > IO_SIZE ) + __iounmap(tmp->addr, tmp->size - IO_SIZE); + else + printk("free_io_area: Invalid I/O area size %lu\n", tmp->size); kfree(tmp); return; } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/m68k/mm/memory.c linux-2.4.23-pre8/arch/m68k/mm/memory.c --- linux-2.4.22/arch/m68k/mm/memory.c 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/m68k/mm/memory.c 2003-10-22 22:49:09.000000000 +0000 @@ -19,76 +19,10 @@ #include #include #include -#include #include -#ifdef CONFIG_AMIGA -#include -#endif struct pgtable_cache_struct quicklists; -void __bad_pte(pmd_t *pmd) -{ - printk("Bad pmd in pte_alloc: %08lx\n", pmd_val(*pmd)); - pmd_set(pmd, BAD_PAGETABLE); -} - -void __bad_pmd(pgd_t *pgd) -{ - printk("Bad pgd in pmd_alloc: %08lx\n", pgd_val(*pgd)); - pgd_set(pgd, (pmd_t *)BAD_PAGETABLE); -} - -#if 0 -pte_t *get_pte_slow(pmd_t *pmd, unsigned long offset) -{ - pte_t *pte; - - pte = (pte_t *) __get_free_page(GFP_KERNEL); - if (pmd_none(*pmd)) { - if (pte) { - clear_page(pte); - __flush_page_to_ram((unsigned long)pte); - flush_tlb_kernel_page((unsigned long)pte); - nocache_page((unsigned long)pte); - pmd_set(pmd, pte); - return pte + offset; - } - pmd_set(pmd, BAD_PAGETABLE); - return NULL; - } - free_page((unsigned long)pte); - if (pmd_bad(*pmd)) { - __bad_pte(pmd); - return NULL; - } - return (pte_t *)__pmd_page(*pmd) + offset; -} -#endif - -#if 0 -pmd_t *get_pmd_slow(pgd_t *pgd, unsigned long offset) -{ - pmd_t *pmd; - - pmd = get_pointer_table(); - if (pgd_none(*pgd)) { - if (pmd) { - pgd_set(pgd, pmd); - return pmd + offset; - } - pgd_set(pgd, (pmd_t *)BAD_PAGETABLE); - return NULL; - } - free_pointer_table(pmd); - if (pgd_bad(*pgd)) { - __bad_pmd(pgd); - return NULL; - } - return (pmd_t *)__pgd_page(*pgd) + offset; -} -#endif - /* ++andreas: {get,free}_pointer_table rewritten to use unused fields from struct page instead of separately kmalloced struct. Stolen from arch/sparc/mm/srmmu.c ... */ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/m68k/q40/q40ints.c linux-2.4.23-pre8/arch/m68k/q40/q40ints.c --- linux-2.4.22/arch/m68k/q40/q40ints.c 2003-06-13 14:51:31.000000000 +0000 +++ linux-2.4.23-pre8/arch/m68k/q40/q40ints.c 2003-10-22 22:48:25.000000000 +0000 @@ -124,7 +124,6 @@ case 11: printk("warning IRQ 10 and 11 not distinguishable\n"); irq=10; - default: } if (irqpc, fp->d0, fp->orig_d0, fp->d1, fp->d2); + printk("\tIIRQ_REG = %x, EIRQ_REG = %x\n",master_inb(IIRQ_REG),master_inb(EIRQ_REG)); } /* @@ -313,7 +313,6 @@ unsigned mir, mer; int irq,i; - repeat: mir=master_inb(IIRQ_REG); if (mir&Q40_IRQ_FRAME_MASK) { irq_tab[Q40_IRQ_FRAME].count++; @@ -373,7 +372,6 @@ /*printk("reenabling irq %d\n",irq); */ #endif } -// used to do 'goto repeat;' her, this delayed bh processing too long return; } } @@ -382,6 +380,7 @@ } iirq: mir=master_inb(IIRQ_REG); + /* should test whether keyboard irq is really enabled, doing it in defhand */ if (mir&Q40_IRQ_KEYB_MASK) { irq_tab[Q40_IRQ_KEYBOARD].count++; irq_tab[Q40_IRQ_KEYBOARD].handler(Q40_IRQ_KEYBOARD,irq_tab[Q40_IRQ_KEYBOARD].dev_id,fp); @@ -408,7 +407,9 @@ static void q40_defhand (int irq, void *dev_id, struct pt_regs *fp) { - printk ("Unknown q40 interrupt 0x%02x\n", irq); + if (irq!=Q40_IRQ_KEYBOARD) + printk ("Unknown q40 interrupt %d\n", irq); + else master_outb(-1,KEYBOARD_UNLOCK_REG); } static void sys_default_handler(int lev, void *dev_id, struct pt_regs *regs) { diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/mips/config-shared.in linux-2.4.23-pre8/arch/mips/config-shared.in --- linux-2.4.22/arch/mips/config-shared.in 2003-08-25 11:44:39.000000000 +0000 +++ linux-2.4.23-pre8/arch/mips/config-shared.in 2003-10-22 22:48:59.000000000 +0000 @@ -1039,7 +1039,12 @@ bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ if [ "$CONFIG_SMP" != "y" ]; then bool 'Run uncached' CONFIG_MIPS_UNCACHED +else + int 'Maximum number of CPUs (2-32)' CONFIG_NR_CPUS 32 fi + +int 'Kernel messages buffer length shift (0 = default)' CONFIG_LOG_BUF_SHIFT 0 + endmenu source crypto/Config.in diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/mips/kernel/irq.c linux-2.4.23-pre8/arch/mips/kernel/irq.c --- linux-2.4.22/arch/mips/kernel/irq.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/mips/kernel/irq.c 2003-10-22 22:47:49.000000000 +0000 @@ -870,7 +870,7 @@ if (!shared) { desc->depth = 0; - desc->status &= ~(IRQ_DISABLED | IRQ_AUTODETECT | IRQ_WAITING); + desc->status &= ~(IRQ_DISABLED | IRQ_AUTODETECT | IRQ_WAITING | IRQ_INPROGRESS); desc->handler->startup(irq); } spin_unlock_irqrestore(&desc->lock,flags); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/mips64/defconfig linux-2.4.23-pre8/arch/mips64/defconfig --- linux-2.4.22/arch/mips64/defconfig 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/mips64/defconfig 2003-10-22 22:48:01.000000000 +0000 @@ -102,6 +102,7 @@ # CONFIG_CPU_RM7000 is not set # CONFIG_CPU_SB1 is not set CONFIG_SMP=y +CONFIG_NR_CPUS=32 # CONFIG_64BIT_PHYS_ADDR is not set # CONFIG_CPU_ADVANCED is not set CONFIG_CPU_HAS_LLSC=y diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/mips64/kernel/irq.c linux-2.4.23-pre8/arch/mips64/kernel/irq.c --- linux-2.4.22/arch/mips64/kernel/irq.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/mips64/kernel/irq.c 2003-10-22 22:47:28.000000000 +0000 @@ -870,7 +870,7 @@ if (!shared) { desc->depth = 0; - desc->status &= ~(IRQ_DISABLED | IRQ_AUTODETECT | IRQ_WAITING); + desc->status &= ~(IRQ_DISABLED | IRQ_AUTODETECT | IRQ_WAITING | IRQ_INPROGRESS); desc->handler->startup(irq); } spin_unlock_irqrestore(&desc->lock,flags); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/parisc/config.in linux-2.4.23-pre8/arch/parisc/config.in --- linux-2.4.22/arch/parisc/config.in 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/parisc/config.in 2003-10-22 22:49:52.000000000 +0000 @@ -45,6 +45,10 @@ comment 'General options' bool 'Symmetric multi-processing support' CONFIG_SMP +if [ "$CONFIG_SMP" = "y" ]; then + int 'Maximum number of CPUs (2-32)' CONFIG_NR_CPUS 32 +fi + bool 'Chassis LCD and LED support' CONFIG_CHASSIS_LCD_LED bool 'Kernel Debugger support' CONFIG_KWDB @@ -194,6 +198,9 @@ #bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ + +int 'Kernel messages buffer length shift (0 = default)' CONFIG_LOG_BUF_SHIFT 0 + endmenu source crypto/Config.in diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/8260_io/uart.c linux-2.4.23-pre8/arch/ppc/8260_io/uart.c --- linux-2.4.22/arch/ppc/8260_io/uart.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/8260_io/uart.c 2003-10-22 22:47:39.000000000 +0000 @@ -47,6 +47,10 @@ #include #include +#ifdef CONFIG_MAGIC_SYSRQ +#include +#endif + #ifdef CONFIG_SERIAL_CONSOLE #include @@ -68,6 +72,14 @@ static int serial_refcount; static int serial_console_setup(struct console *co, char *options); +static void serial_console_write(struct console *c, const char *s, + unsigned count); +static kdev_t serial_console_device(struct console *c); + +#if defined(CONFIG_SERIAL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) +static unsigned long break_pressed; /* break, really ... */ +#endif + /* * Serial driver configuration section. Here are the various options: */ @@ -181,6 +193,16 @@ cbd_t *tx_cur; } ser_info_t; +static struct console sercons = { + name: "ttyS", + write: serial_console_write, + device: serial_console_device, + setup: serial_console_setup, + flags: CON_PRINTBUFFER, + index: CONFIG_SERIAL_CONSOLE_PORT, +}; + + static void change_speed(ser_info_t *info); static void rs_8xx_wait_until_sent(struct tty_struct *tty, int timeout); @@ -302,7 +324,7 @@ mark_bh(SERIAL_BH); } -static _INLINE_ void receive_chars(ser_info_t *info) +static _INLINE_ void receive_chars(ser_info_t *info, struct pt_regs *regs) { struct tty_struct *tty = info->tty; unsigned char ch, *cp; @@ -417,6 +439,19 @@ } } } + +#if defined(CONFIG_SERIAL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) + if (break_pressed && info->line == sercons.index) { + if (ch != 0 && time_before(jiffies, + break_pressed + HZ*5)) { + handle_sysrq(ch, regs, NULL, NULL); + break_pressed = 0; + goto ignore_char; + } else + break_pressed = 0; + } +#endif + if (tty->flip.count >= TTY_FLIPBUF_SIZE) break; @@ -425,6 +460,10 @@ tty->flip.count++; } +#if defined(CONFIG_SERIAL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) + ignore_char: +#endif + /* This BD is ready to be used again. Clear status. * Get next BD. */ @@ -442,7 +481,36 @@ queue_task(&tty->flip.tqueue, &tq_timer); } -static _INLINE_ void transmit_chars(ser_info_t *info) +static _INLINE_ void receive_break(ser_info_t *info, struct pt_regs *regs) +{ + struct tty_struct *tty = info->tty; + + info->state->icount.brk++; + +#if defined(CONFIG_SERIAL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) + if (info->line == sercons.index) { + if (!break_pressed) { + break_pressed = jiffies; + return; + } else + break_pressed = 0; + } +#endif + + /* Check to see if there is room in the tty buffer for + * the break. If not, we exit now, losing the break. FIXME + */ + if ((tty->flip.count + 1) >= TTY_FLIPBUF_SIZE) + return; + *(tty->flip.flag_buf_ptr++) = TTY_BREAK; + *(tty->flip.char_buf_ptr++) = 0; + tty->flip.count++; + + queue_task(&tty->flip.tqueue, &tq_timer); +} + + +static _INLINE_ void transmit_chars(ser_info_t *info, struct pt_regs *regs) { if (info->flags & TX_WAKEUP) { @@ -543,19 +611,23 @@ if ((idx = info->state->smc_scc_num) < SCC_NUM_BASE) { smcp = &immr->im_smc[idx]; events = smcp->smc_smce; + if (events & SMCM_BRKE) + receive_break(info, regs); if (events & SMCM_RX) - receive_chars(info); + receive_chars(info, regs); if (events & SMCM_TX) - transmit_chars(info); + transmit_chars(info, regs); smcp->smc_smce = events; } else { sccp = &immr->im_scc[idx - SCC_IDX_BASE]; events = sccp->scc_scce; + if (events & SMCM_BRKE) + receive_break(info, regs); if (events & SCCM_RX) - receive_chars(info); + receive_chars(info, regs); if (events & SCCM_TX) - transmit_chars(info); + transmit_chars(info, regs); sccp->scc_scce = events; } @@ -2218,16 +2290,6 @@ return MKDEV(TTYAUX_MAJOR, 64 + c->index); } - -static struct console sercons = { - name: "ttyS", - write: serial_console_write, - device: serial_console_device, - setup: serial_console_setup, - flags: CON_PRINTBUFFER, - index: CONFIG_SERIAL_CONSOLE_PORT, -}; - /* * Register console. */ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/8xx_io/Config.in linux-2.4.23-pre8/arch/ppc/8xx_io/Config.in --- linux-2.4.22/arch/ppc/8xx_io/Config.in 2001-10-15 20:35:26.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/8xx_io/Config.in 2003-10-22 22:48:19.000000000 +0000 @@ -2,8 +2,14 @@ # MPC8xx Communication options # mainmenu_option next_comment -comment 'MPC8xx CPM Options' +comment 'MPC8xx Options' +comment 'Generic MPC8xx Options' +bool 'Copy-Back Data Cache (else Writethrough)' CONFIG_8xx_COPYBACK +bool 'CPU6 Silicon Errata (860 Pre Rev. C)' CONFIG_8xx_CPU6 +bool 'I2C/SPI Microcode Patch' CONFIG_UCODE_PATCH + +comment 'MPC8xx CPM Options' if [ "$CONFIG_NET_ETHERNET" = "y" ]; then bool 'CPM SCC Ethernet' CONFIG_SCC_ENET if [ "$CONFIG_SCC_ENET" = "y" ]; then @@ -12,25 +18,28 @@ SCC2 CONFIG_SCC2_ENET \ SCC3 CONFIG_SCC3_ENET" SCC1 fi - bool '860T FEC Ethernet' CONFIG_FEC_ENET + bool '8xxT FEC Ethernet' CONFIG_FEC_ENET if [ "$CONFIG_FEC_ENET" = "y" ]; then bool 'Use MDIO for PHY configuration' CONFIG_USE_MDIO fi bool 'Use Big CPM Ethernet Buffers' CONFIG_ENET_BIG_BUFFERS fi +if [ "$CONFIG_SCC3_ENET" != "y" ]; then + bool 'Use SMC1 for UART' CONFIG_8xx_SMC1 +fi bool 'Use SMC2 for UART' CONFIG_SMC2_UART if [ "$CONFIG_SMC2_UART" = "y" ]; then bool 'Use Alternate SMC2 I/O (823/850)' CONFIG_ALTSMC2 bool 'Use SMC2 for Console' CONFIG_CONS_SMC2 fi -bool 'Enable SCC2 and SCC3 for UART' CONFIG_USE_SCC_IO - -# This doesn't really belong here, but it is convenient to ask -# 8xx specific questions. - -comment 'Generic MPC8xx Options' -bool 'Copy-Back Data Cache (else Writethrough)' CONFIG_8xx_COPYBACK -bool 'CPU6 Silicon Errata (860 Pre Rev. C)' CONFIG_8xx_CPU6 -bool 'I2C/SPI Microcode Patch' CONFIG_UCODE_PATCH - +if [ "$CONFIG_SCC1_ENET" != "y" ]; then + bool 'Use SCC1 for UART' CONFIG_8xx_SCC1 +fi +if [ "$CONFIG_SCC2_ENET" != "y" ]; then + bool 'Use SCC2 for UART' CONFIG_8xx_SCC2 +fi +if [ "$CONFIG_SCC3_ENET" != "y" ]; then + bool 'Use SCC3 for UART' CONFIG_8xx_SCC3 +fi +bool 'Use SCC4 for UART' CONFIG_8xx_SCC4 endmenu diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/8xx_io/commproc.c linux-2.4.23-pre8/arch/ppc/8xx_io/commproc.c --- linux-2.4.22/arch/ppc/8xx_io/commproc.c 2003-06-13 14:51:31.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/8xx_io/commproc.c 2003-10-22 22:49:01.000000000 +0000 @@ -54,6 +54,7 @@ static struct cpm_action cpm_vecs[CPMVEC_NR]; static void cpm_interrupt(int irq, void * dev, struct pt_regs * regs); static void cpm_error_interrupt(int irq, void *, struct pt_regs * regs); +static void alloc_host_memory(void); /* Define a table of names to identify CPM interrupt handlers in * /proc/interrupts. @@ -104,7 +105,7 @@ }; void -m8xx_cpm_reset(uint host_page_addr) +m8xx_cpm_reset() { volatile immap_t *imp; volatile cpm8xx_t *commproc; @@ -130,7 +131,7 @@ * this is what we realy want for some applications, but the * manual recommends it. * Bit 25, FAM can also be set to use FEC aggressive mode (860T). - */ + */ imp->im_siu_conf.sc_sdcr = 1; /* Reclaim the DP memory for our use. @@ -138,25 +139,23 @@ dp_alloc_base = CPM_DATAONLY_BASE; dp_alloc_top = dp_alloc_base + CPM_DATAONLY_SIZE; - /* Set the host page for allocation. + /* Tell everyone where the comm processor resides. */ - host_buffer = host_page_addr; /* Host virtual page address */ - host_end = host_page_addr + PAGE_SIZE; + cpmp = (cpm8xx_t *)commproc; +} - /* We need to get this page early, so I have to do it the - * hard way. - */ - if (get_pteptr(&init_mm, host_page_addr, &pte)) { - pte_val(*pte) |= _PAGE_NO_CACHE; - flush_tlb_page(init_mm.mmap, host_buffer); - } - else { - panic("Huh? No CPM host page?"); - } +/* We used to do this earlier, but have to postpone as long as possible + * to ensure the kernel VM is now running. + */ +static void +alloc_host_memory() +{ + uint physaddr; - /* Tell everyone where the comm processor resides. + /* Set the host page for allocation. */ - cpmp = (cpm8xx_t *)commproc; + host_buffer = (uint)consistent_alloc(GFP_KERNEL, PAGE_SIZE, &physaddr); + host_end = host_buffer + PAGE_SIZE; } /* This is called during init_IRQ. We used to do it above, but this @@ -321,6 +320,9 @@ { uint retloc; + if (host_buffer == 0) + alloc_host_memory(); + if ((host_buffer + size) >= host_end) return(0); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/8xx_io/enet.c linux-2.4.23-pre8/arch/ppc/8xx_io/enet.c --- linux-2.4.22/arch/ppc/8xx_io/enet.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/8xx_io/enet.c 2003-10-22 22:48:19.000000000 +0000 @@ -137,6 +137,11 @@ cbd_t *cur_rx, *cur_tx; /* The next free ring entry */ cbd_t *dirty_tx; /* The ring entries to be free()ed. */ scc_t *sccp; + + /* Virtual addresses for the receive buffers because we can't + * do a __va() on them anymore. + */ + unsigned char *rx_vaddr[RX_RING_SIZE]; struct net_device_stats stats; uint tx_free; spinlock_t lock; @@ -498,7 +503,7 @@ skb->dev = dev; skb_put(skb,pkt_len-4); /* Make room */ eth_copy_and_sum(skb, - (unsigned char *)__va(bdp->cbd_bufaddr), + cep->rx_vaddr[bdp - cep->rx_bd_base], pkt_len-4, 0); skb->protocol=eth_type_trans(skb,dev); netif_rx(skb); @@ -632,10 +637,9 @@ { struct net_device *dev; struct scc_enet_private *cep; - int i, j; - unsigned char *eap; - unsigned long mem_addr; - pte_t *pte; + int i, j, k; + unsigned char *eap, *ba; + dma_addr_t mem_addr; bd_t *bd; volatile cbd_t *bdp; volatile cpm8xx_t *cp; @@ -826,24 +830,21 @@ bdp->cbd_sc |= BD_SC_WRAP; bdp = cep->rx_bd_base; + k = 0; for (i=0; icbd_sc = BD_ENET_RX_EMPTY | BD_ENET_RX_INTR; - bdp->cbd_bufaddr = __pa(mem_addr); + bdp->cbd_bufaddr = mem_addr; + cep->rx_vaddr[k++] = ba; mem_addr += CPM_ENET_RX_FRSIZE; + ba += CPM_ENET_RX_FRSIZE; bdp++; } } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/8xx_io/fec.c linux-2.4.23-pre8/arch/ppc/8xx_io/fec.c --- linux-2.4.22/arch/ppc/8xx_io/fec.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/8xx_io/fec.c 2003-10-22 22:49:40.000000000 +0000 @@ -161,7 +161,12 @@ cbd_t *tx_bd_base; cbd_t *cur_rx, *cur_tx; /* The next free ring entry */ cbd_t *dirty_tx; /* The ring entries to be free()ed. */ - scc_t *sccp; + + /* Virtual addresses for the receive buffers because we can't + * do a __va() on them anymore. + */ + unsigned char *rx_vaddr[RX_RING_SIZE]; + struct net_device_stats stats; uint tx_free; spinlock_t lock; @@ -587,7 +592,7 @@ fep->stats.rx_packets++; pkt_len = bdp->cbd_datlen; fep->stats.rx_bytes += pkt_len; - data = (__u8*)__va(bdp->cbd_bufaddr); + data = fep->rx_vaddr[bdp - fep->rx_bd_base]; /* This does 16 byte alignment, exactly what we need. * The packet length includes FCS, but we don't want to @@ -602,9 +607,7 @@ } else { skb->dev = dev; skb_put(skb,pkt_len-4); /* Make room */ - eth_copy_and_sum(skb, - (unsigned char *)__va(bdp->cbd_bufaddr), - pkt_len-4, 0); + eth_copy_and_sum(skb, data, pkt_len-4, 0); skb->protocol=eth_type_trans(skb,dev); netif_rx(skb); } @@ -1700,10 +1703,9 @@ { struct net_device *dev; struct fec_enet_private *fep; - int i, j; - unsigned char *eap, *iap; - unsigned long mem_addr; - pte_t *pte; + int i, j, k; + unsigned char *eap, *iap, *ba; + dma_addr_t mem_addr; volatile cbd_t *bdp; cbd_t *cbd_base; volatile immap_t *immap; @@ -1774,14 +1776,7 @@ printk("FEC initialization failed.\n"); return 1; } - mem_addr = __get_free_page(GFP_KERNEL); - cbd_base = (cbd_t *)mem_addr; - - /* Make it uncached. - */ - pte = va_to_pte(mem_addr); - pte_val(*pte) |= _PAGE_NO_CACHE; - flush_tlb_page(init_mm.mmap, mem_addr); + cbd_base = (cbd_t *)consistent_alloc(GFP_KERNEL, PAGE_SIZE, &mem_addr); /* Set receive and transmit descriptor base. */ @@ -1793,24 +1788,21 @@ /* Initialize the receive buffer descriptors. */ bdp = fep->rx_bd_base; + k = 0; for (i=0; icbd_sc = BD_ENET_RX_EMPTY; - bdp->cbd_bufaddr = __pa(mem_addr); + bdp->cbd_bufaddr = mem_addr; + fep->rx_vaddr[k++] = ba; mem_addr += FEC_ENET_RX_FRSIZE; + ba += FEC_ENET_RX_FRSIZE; bdp++; } } @@ -1974,8 +1966,8 @@ /* Set receive and transmit descriptor base. */ - fecp->fec_r_des_start = __pa((uint)(fep->rx_bd_base)); - fecp->fec_x_des_start = __pa((uint)(fep->tx_bd_base)); + fecp->fec_r_des_start = iopa((uint)(fep->rx_bd_base)); + fecp->fec_x_des_start = iopa((uint)(fep->tx_bd_base)); fep->dirty_tx = fep->cur_tx = fep->tx_bd_base; fep->tx_free = TX_RING_SIZE; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/8xx_io/uart.c linux-2.4.23-pre8/arch/ppc/8xx_io/uart.c --- linux-2.4.22/arch/ppc/8xx_io/uart.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/8xx_io/uart.c 2003-10-22 22:49:14.000000000 +0000 @@ -81,7 +81,11 @@ #define TX_WAKEUP ASYNC_SHARE_IRQ static char *serial_name = "CPM UART driver"; -static char *serial_version = "0.03"; +static char *serial_version = "0.04"; + +/* TX buffer length used by my_console_write. + Assume minumun length until it gets set by this driver */ +static int console_tx_buf_len = 1; static DECLARE_TASK_QUEUE(tq_serial); @@ -126,10 +130,27 @@ * type of SMC or SCC. * The SMCs do not support any modem control signals. */ -#define smc_scc_num hub6 -#define NUM_IS_SCC ((int)0x00010000) -#define PORT_NUM(P) ((P) & 0x0000ffff) -#define PORT_IS_SCC(P) ((P) & NUM_IS_SCC) +#define smc_scc_num hub6 +#define NUM_IS_SCC ((int)0x000100000) +#define NUM_BRG ((int)0x0000FF00) +#define NUM_BRG_SHIFT 8 +#define NUM ((int)0x000000FF) +#define NUM_SHIFT 0 +#define PORT_NUM(P) ((P) & NUM) +#define PORT_NUM_SET(N) (((N)-1) << NUM_SHIFT) +#define PORT_IS_SCC(P) ((P) & NUM_IS_SCC) +#define PORT_BRG(P) (((P) & NUM_BRG) >> NUM_BRG_SHIFT) +#define PORT_BRG_SET(P,B) (P) = (((P) & ~NUM_BRG) | ((B) << NUM_BRG_SHIFT)) + +/* Short names for the ports +*/ +#define QUICC_CPM_SMC1 (PORT_NUM_SET(1)) +#define QUICC_CPM_SMC2 (PORT_NUM_SET(2)) +#define QUICC_CPM_SCC1 (PORT_NUM_SET(1)|NUM_IS_SCC) +#define QUICC_CPM_SCC2 (PORT_NUM_SET(2)|NUM_IS_SCC) +#define QUICC_CPM_SCC3 (PORT_NUM_SET(3)|NUM_IS_SCC) +#define QUICC_CPM_SCC4 (PORT_NUM_SET(4)|NUM_IS_SCC) +#define QUICC_MAX_BRG 3 /* BRG1..BRG4 */ /* The serial port to use for KGDB. */ #ifdef CONFIG_KGDB_TTYS1 @@ -151,22 +172,24 @@ */ static struct serial_state rs_table[] = { /* UART CLK PORT IRQ FLAGS NUM */ -#ifndef CONFIG_SCC3_ENET /* SMC1 not usable with Ethernet on SCC3 */ - { 0, 0, PROFF_SMC1, CPMVEC_SMC1, 0, 0 }, /* SMC1 ttyS0 */ +#ifdef CONFIG_8xx_SMC1 + { 0, 0, PROFF_SMC1, CPMVEC_SMC1, 0, QUICC_CPM_SMC1 }, /* SMC1 ttySx */ +#endif +#ifdef CONFIG_8xx_SMC2 + { 0, 0, PROFF_SMC2, CPMVEC_SMC2, 0, QUICC_CPM_SMC2 }, /* SMC2 ttySx */ +#endif +#ifdef CONFIG_8xx_SCC1 + { 0, 0, PROFF_SCC1, CPMVEC_SCC1, 0, QUICC_CPM_SCC1 }, /* SCC1 ttySx */ +#endif +#ifdef CONFIG_8xx_SCC2 + { 0, 0, PROFF_SCC2, CPMVEC_SCC2, 0, QUICC_CPM_SCC2 }, /* SCC2 ttySx */ +#endif +#ifdef CONFIG_8xx_SCC3 + { 0, 0, PROFF_SCC3, CPMVEC_SCC3, 0, QUICC_CPM_SCC3 }, /* SCC3 ttySx */ +#endif +#ifdef CONFIG_8xx_SCC4 + { 0, 0, PROFF_SCC4, CPMVEC_SCC4, 0, QUICC_CPM_SCC4 }, /* SCC4 ttySx */ #endif -#if !defined(CONFIG_USB_MPC8xx) && !defined(CONFIG_USB_CLIENT_MPC8xx) -# ifdef CONFIG_SMC2_UART - { 0, 0, PROFF_SMC2, CPMVEC_SMC2, 0, 1 }, /* SMC2 ttyS1 */ -# endif -# ifdef CONFIG_USE_SCC_IO - { 0, 0, PROFF_SCC2, CPMVEC_SCC2, 0, (NUM_IS_SCC | 1) }, /* SCC2 ttyS2 */ - { 0, 0, PROFF_SCC3, CPMVEC_SCC3, 0, (NUM_IS_SCC | 2) }, /* SCC3 ttyS3 */ -# endif - #else /* CONFIG_USB_xxx */ -# ifdef CONFIG_USE_SCC_IO - { 0, 0, PROFF_SCC3, CPMVEC_SCC3, 0, (NUM_IS_SCC | 2) }, /* SCC3 ttyS3 */ -# endif -#endif /* CONFIG_USB_xxx */ }; #define NR_PORTS (sizeof(rs_table)/sizeof(struct serial_state)) @@ -177,6 +200,7 @@ /* The number of buffer descriptors and their sizes. */ +#define EARLY_BUF_SIZE 4 #define RX_NUM_FIFO 4 #define RX_BUF_SIZE 32 #define TX_NUM_FIFO 4 @@ -218,6 +242,12 @@ cbd_t *rx_cur; cbd_t *tx_bd_base; cbd_t *tx_cur; + + /* Virtual addresses for the FIFOs because we can't __va() a + * physical address anymore. + */ + unsigned char *rx_va_base; + unsigned char *tx_va_base; } ser_info_t; static struct console sercons = { @@ -394,13 +424,13 @@ /* Get the number of characters and the buffer pointer. */ i = bdp->cbd_datlen; - cp = (unsigned char *)__va(bdp->cbd_bufaddr); + cp = info->rx_va_base + ((bdp - info->rx_bd_base) * RX_BUF_SIZE); status = bdp->cbd_sc; #ifdef CONFIG_KGDB - if (info->state->smc_scc_num == KGDB_SER_IDX) { - if (*cp == 0x03 || *cp == '$') - breakpoint(); + if (info->state->smc_scc_num == KGDB_SER_IDX && + (*cp == 0x03 || *cp == '$')) { + breakpoint(); return; } #endif @@ -420,7 +450,7 @@ icount->rx++; #ifdef SERIAL_DEBUG_INTR - printk("DR%02x:%02x...", ch, status); + printk("DR%02x:%02x...", ch, status); #endif *tty->flip.flag_buf_ptr = 0; if (status & (BD_SC_BR | BD_SC_FR | @@ -1033,7 +1063,7 @@ smcp->smc_smcmr = new_mode; } - m8xx_cpm_setbrg((state - rs_table), baud_rate); + m8xx_cpm_setbrg(PORT_BRG(state->smc_scc_num), baud_rate); restore_flags(flags); } @@ -1042,6 +1072,8 @@ { ser_info_t *info = (ser_info_t *)tty->driver_data; volatile cbd_t *bdp; + unsigned char *cp; + unsigned long flags; if (serial_paranoia_check(info, tty->device, "rs_put_char")) return; @@ -1049,21 +1081,22 @@ if (!tty) return; + local_irq_save(flags); bdp = info->tx_cur; - while (bdp->cbd_sc & BD_SC_READY); - - *((char *)__va(bdp->cbd_bufaddr)) = ch; - bdp->cbd_datlen = 1; - bdp->cbd_sc |= BD_SC_READY; - /* Get next BD. */ if (bdp->cbd_sc & BD_SC_WRAP) - bdp = info->tx_bd_base; + info->tx_cur = info->tx_bd_base; else - bdp++; + info->tx_cur = (cbd_t *)bdp + 1; + local_irq_restore(flags); - info->tx_cur = (cbd_t *)bdp; + while (bdp->cbd_sc & BD_SC_READY); + + cp = info->tx_va_base + ((bdp - info->tx_bd_base) * TX_BUF_SIZE); + *cp = ch; + bdp->cbd_datlen = 1; + bdp->cbd_sc |= BD_SC_READY; } @@ -1073,6 +1106,8 @@ int c, ret = 0; ser_info_t *info = (ser_info_t *)tty->driver_data; volatile cbd_t *bdp; + unsigned char *cp; + unsigned long flags; #ifdef CONFIG_KGDB_CONSOLE /* Try to let stub handle output. Returns true if it did. */ @@ -1086,43 +1121,50 @@ if (!tty) return 0; - bdp = info->tx_cur; - while (1) { c = MIN(count, TX_BUF_SIZE); if (c <= 0) break; + local_irq_save(flags); + bdp = info->tx_cur; if (bdp->cbd_sc & BD_SC_READY) { info->flags |= TX_WAKEUP; + local_irq_restore(flags); break; } + /* Get next BD. + */ + if (bdp->cbd_sc & BD_SC_WRAP) + info->tx_cur = info->tx_bd_base; + else + info->tx_cur = (cbd_t *)bdp + 1; + local_irq_restore(flags); - if (from_user) { - if (copy_from_user(__va(bdp->cbd_bufaddr), buf, c)) { - if (!ret) - ret = -EFAULT; - break; - } - } else { - memcpy(__va(bdp->cbd_bufaddr), buf, c); - } + cp = info->tx_va_base + ((bdp - info->tx_bd_base) * + TX_BUF_SIZE); + if (from_user) + c -= copy_from_user((void *)cp, buf, c); + else + memcpy((void *)cp, buf, c); - bdp->cbd_datlen = c; - bdp->cbd_sc |= BD_SC_READY; + if (c) { + bdp->cbd_datlen = c; + bdp->cbd_sc |= BD_SC_READY; + } else { + /* Need to TX at least 1 char to keep CPM sane */ + bdp->cbd_datlen = 1; + *cp = 0; + bdp->cbd_sc |= BD_SC_READY; + if (!ret) + ret = -EFAULT; + break; + } buf += c; count -= c; ret += c; - - /* Get next BD. - */ - if (bdp->cbd_sc & BD_SC_WRAP) - bdp = info->tx_bd_base; - else - bdp++; - info->tx_cur = (cbd_t *)bdp; } return ret; } @@ -1181,27 +1223,29 @@ static void rs_8xx_send_xchar(struct tty_struct *tty, char ch) { volatile cbd_t *bdp; + unsigned char *cp; + unsigned long flags; ser_info_t *info = (ser_info_t *)tty->driver_data; if (serial_paranoia_check(info, tty->device, "rs_send_char")) return; + local_irq_save(flags); bdp = info->tx_cur; - while (bdp->cbd_sc & BD_SC_READY); - - *((char *)__va(bdp->cbd_bufaddr)) = ch; - bdp->cbd_datlen = 1; - bdp->cbd_sc |= BD_SC_READY; - /* Get next BD. */ if (bdp->cbd_sc & BD_SC_WRAP) - bdp = info->tx_bd_base; + info->tx_cur = info->tx_bd_base; else - bdp++; + info->tx_cur = (cbd_t *)bdp + 1; + local_irq_restore(flags); + while (bdp->cbd_sc & BD_SC_READY); - info->tx_cur = (cbd_t *)bdp; + cp = info->tx_va_base + ((bdp - info->tx_bd_base) * TX_BUF_SIZE); + *cp = ch; + bdp->cbd_datlen = 1; + bdp->cbd_sc |= BD_SC_READY; } /* @@ -1772,7 +1816,7 @@ static void rs_8xx_wait_until_sent(struct tty_struct *tty, int timeout) { ser_info_t *info = (ser_info_t *)tty->driver_data; - unsigned long orig_jiffies, char_time; + unsigned long orig_jiffies, char_time, tst_res; /*int lsr;*/ volatile cbd_t *bdp; @@ -1807,6 +1851,7 @@ * are empty. */ do { + unsigned long flags; #ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT printk("lsr = %d (jiff=%lu)...", lsr, jiffies); #endif @@ -1824,12 +1869,15 @@ * is the buffer is available. There are still characters * in the CPM FIFO. */ + local_irq_save(flags); bdp = info->tx_cur; if (bdp == info->tx_bd_base) bdp += (TX_NUM_FIFO-1); else bdp--; - } while (bdp->cbd_sc & BD_SC_READY); + tst_res = !!(bdp->cbd_sc & BD_SC_READY); + local_irq_restore(flags); + } while (tst_res); current->state = TASK_RUNNING; #ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT printk("lsr = %d (jiff=%lu)...done\n", lsr, jiffies); @@ -2217,6 +2265,11 @@ #ifdef CONFIG_SERIAL_CONSOLE +/* I need this just so I can store the virtual addresses and have + * common functions for the early console printing. + */ +static ser_info_t consinfo; + /* * Print a string to the serial port trying not to disturb any possible * real use of the port... @@ -2226,10 +2279,11 @@ { struct serial_state *ser; ser_info_t *info; - unsigned i; + unsigned i, c, cr_missing, max_tx_size; volatile cbd_t *bdp, *bdbase; volatile smc_uart_t *up; volatile u_char *cp; + unsigned long flags; ser = rs_table + idx; @@ -2238,82 +2292,72 @@ * we simply use the single buffer allocated. */ if ((info = (ser_info_t *)ser->info) != NULL) { - bdp = info->tx_cur; bdbase = info->tx_bd_base; - } - else { - /* Pointer to UART in parameter ram. - */ + } else { + /* Pointer to UART in parameter ram. */ up = (smc_uart_t *)&cpmp->cp_dparam[ser->port]; - /* Get the address of the host memory buffer. - */ - bdp = bdbase = (cbd_t *)&cpmp->cp_dpmem[up->smc_tbase]; - } + /* Get the address of the host memory buffer.*/ + info = &consinfo; + info->tx_bd_base = (cbd_t *)bdbase = (cbd_t *)&cpmp->cp_dpmem[up->smc_tbase]; + info->tx_cur = (cbd_t *)bdbase; + } + max_tx_size = console_tx_buf_len; + cr_missing = 0; + while (1){ + c = MIN(max_tx_size, count); + if (c <= 0) + break; - /* - * We need to gracefully shut down the transmitter, disable - * interrupts, then send our bytes out. - */ + local_irq_save(flags); + bdp = info->tx_cur; + bdbase = info->tx_bd_base; + if (bdp->cbd_sc & BD_SC_WRAP) + info->tx_cur = (cbd_t *)bdbase; + else + info->tx_cur = (cbd_t *)(bdp+1); + local_irq_restore(flags); - /* - * Now, do each character. This is not as bad as it looks - * since this is a holding FIFO and not a transmitting FIFO. - * We could add the complexity of filling the entire transmit - * buffer, but we would just wait longer between accesses...... - */ - for (i = 0; i < count; i++, s++) { /* Wait for transmitter fifo to empty. * Ready indicates output is ready, and xmt is doing * that, not that it is ready for us to send. */ while (bdp->cbd_sc & BD_SC_READY); - /* Send the character out. + /* Send the characters out. * If the buffer address is in the CPM DPRAM, don't * convert it. */ if ((uint)(bdp->cbd_bufaddr) > (uint)IMAP_ADDR) cp = (u_char *)(bdp->cbd_bufaddr); else - cp = __va(bdp->cbd_bufaddr); - *cp = *s; + cp = info->tx_va_base + ((bdp - info->tx_bd_base) * TX_BUF_SIZE); - bdp->cbd_datlen = 1; + i=1; /* Keeps track of consumed TX buffer space */ + if (cr_missing) { + /* Previus loop didn't have room for the CR, insert it first in this */ + *cp++ = '\r'; + i++; + } + cr_missing = 0; + for (; i <= c; i++) { + if ((*cp++ = *s++) != '\n') + continue; /* Copy bytes until a NewLine is found */ + /* NewLine found, see if there is space in the TX buffer to add a CR */ + if (i < max_tx_size) { + *cp++ = '\r'; /* yes, there is space to add a CR */ + i++; + } else + cr_missing = 1; /* No space in the TX buffer, + rember it so it can be inserted in the next loop */ + } + count -= (c-cr_missing); + bdp->cbd_datlen = i-1; bdp->cbd_sc |= BD_SC_READY; - if (bdp->cbd_sc & BD_SC_WRAP) - bdp = bdbase; - else - bdp++; - - /* if a LF, also do CR... */ - if (*s == 10) { - while (bdp->cbd_sc & BD_SC_READY); - cp = __va(bdp->cbd_bufaddr); - *cp = 13; - bdp->cbd_datlen = 1; - bdp->cbd_sc |= BD_SC_READY; - - if (bdp->cbd_sc & BD_SC_WRAP) { - bdp = bdbase; - } - else { - bdp++; - } - } } - - /* - * Finally, Wait for transmitter & holding register to empty - * and restore the IER - */ - while (bdp->cbd_sc & BD_SC_READY); - - if (info) - info->tx_cur = (cbd_t *)bdp; + /* while (bdp->cbd_sc & BD_SC_READY); is this really needed? */ } - static void serial_console_write(struct console *c, const char *s, unsigned count) { @@ -2358,10 +2402,13 @@ * If the port has been initialized for general use, we must * use information from the port structure. */ - if ((info = (ser_info_t *)ser->info)) + if ((info = (ser_info_t *)ser->info)) { bdp = info->rx_cur; - else + } + else { bdp = (cbd_t *)&cpmp->cp_dpmem[up->smc_rbase]; + info = &consinfo; + } /* * We need to gracefully shut down the receiver, disable @@ -2383,7 +2430,7 @@ if ((uint)(bdp->cbd_bufaddr) > (uint)IMAP_ADDR) cp = (u_char *)(bdp->cbd_bufaddr); else - cp = __va(bdp->cbd_bufaddr); + cp = info->rx_va_base + ((bdp - info->rx_bd_base) * RX_BUF_SIZE); if (obuf) { i = c = bdp->cbd_datlen; @@ -2522,6 +2569,43 @@ /* * The serial driver boot-time initialization code! */ + +int __init rs_8xx_alloc_brg(int port) +{ + static int brg = 0; + volatile cpm8xx_t *cp = cpmp; + int res = brg; + + /* "Wire" the BRG to the specified port + */ + switch (port) { + case QUICC_CPM_SMC1: + cp->cp_simode = (cp->cp_simode & ~(0x07<<12)) | (brg<<12); + break; + case QUICC_CPM_SMC2: + cp->cp_simode = (cp->cp_simode & ~(0x07<<28)) | (brg<<28); + break; + case QUICC_CPM_SCC1: + cp->cp_sicr = (cp->cp_sicr & ~(0xFF<<0)) | (((brg<<3)|(brg<<0))<<0); + break; + case QUICC_CPM_SCC2: + cp->cp_sicr = (cp->cp_sicr & ~(0xFF<<8)) | (((brg<<3)|(brg<<0))<<8); + break; + case QUICC_CPM_SCC3: + cp->cp_sicr = (cp->cp_sicr & ~(0xFF<<16)) | (((brg<<3)|(brg<<0))<<16); + break; + case QUICC_CPM_SCC4: + cp->cp_sicr = (cp->cp_sicr & ~(0xFF<<24)) | (((brg<<3)|(brg<<0))<<24); + break; + } + /* Consume this BRG - Note: the last BRG will be reused if this + */ + /* function is called too many times! + */ + if (brg < QUICC_MAX_BRG) brg++; + return res; +} + int __init rs_8xx_init(void) { struct serial_state * state; @@ -2668,9 +2752,12 @@ state->icount.rx = state->icount.tx = 0; state->icount.frame = state->icount.parity = 0; state->icount.overrun = state->icount.brk = 0; - printk(KERN_INFO "ttyS%02d at 0x%04x is a %s\n", + PORT_BRG_SET(state->smc_scc_num, rs_8xx_alloc_brg(state->smc_scc_num)); + printk(KERN_INFO "ttyS%d at 0x%04x is on %s%d using BRG%d\n", i, (unsigned int)(state->port), - PORT_IS_SCC(state->smc_scc_num) ? "SCC" : "SMC"); + PORT_IS_SCC(state->smc_scc_num) ? "SCC" : "SMC", + PORT_NUM(state->smc_scc_num)+1, + PORT_BRG(state->smc_scc_num)+1); #ifdef CONFIG_SERIAL_CONSOLE /* If we just printed the message on the console port, and * we are about to initialize it for general use, we have @@ -2704,6 +2791,7 @@ /* Allocate space for FIFOs in the host memory. */ mem_addr = m8xx_cpm_hostalloc(RX_NUM_FIFO * RX_BUF_SIZE); + info->rx_va_base = (unsigned char *)mem_addr; /* Set the physical address of the host memory * buffers in the buffer descriptors, and the @@ -2713,12 +2801,12 @@ info->rx_cur = info->rx_bd_base = (cbd_t *)bdp; for (j=0; j<(RX_NUM_FIFO-1); j++) { - bdp->cbd_bufaddr = __pa(mem_addr); + bdp->cbd_bufaddr = iopa(mem_addr); bdp->cbd_sc = BD_SC_EMPTY | BD_SC_INTRPT; mem_addr += RX_BUF_SIZE; bdp++; } - bdp->cbd_bufaddr = __pa(mem_addr); + bdp->cbd_bufaddr = iopa(mem_addr); bdp->cbd_sc = BD_SC_WRAP | BD_SC_EMPTY | BD_SC_INTRPT; idx = PORT_NUM(info->state->smc_scc_num); @@ -2738,6 +2826,7 @@ /* Allocate space for FIFOs in the host memory. */ mem_addr = m8xx_cpm_hostalloc(TX_NUM_FIFO * TX_BUF_SIZE); + info->tx_va_base = (unsigned char *)mem_addr; /* Set the physical address of the host memory * buffers in the buffer descriptors, and the @@ -2747,12 +2836,12 @@ info->tx_cur = info->tx_bd_base = (cbd_t *)bdp; for (j=0; j<(TX_NUM_FIFO-1); j++) { - bdp->cbd_bufaddr = __pa(mem_addr); + bdp->cbd_bufaddr = iopa(mem_addr); bdp->cbd_sc = BD_SC_INTRPT; mem_addr += TX_BUF_SIZE; bdp++; } - bdp->cbd_bufaddr = __pa(mem_addr); + bdp->cbd_bufaddr = iopa(mem_addr); bdp->cbd_sc = (BD_SC_WRAP | BD_SC_INTRPT); if (PORT_IS_SCC(info->state->smc_scc_num)) { @@ -2846,12 +2935,14 @@ } #endif /* CONFIG_ALTSMC2 */ +#if 0 /* Connect the baud rate generator to the * SMC based upon index in rs_table. Also * make sure it is connected to NMSI. */ cp->cp_simode &= ~(0xffff << (idx * 16)); cp->cp_simode |= (i << ((idx * 16) + 12)); +#endif up->smc_tbase = dp_addr; @@ -2903,11 +2994,11 @@ /* Set up the baud rate generator. */ - m8xx_cpm_setbrg(i, baud_table[baud_idx]); + m8xx_cpm_setbrg(PORT_BRG(state->smc_scc_num), baud_table[baud_idx]); } } - + console_tx_buf_len = TX_BUF_SIZE; return 0; } @@ -2959,20 +3050,28 @@ * from dual port ram, and a character buffer area from host mem. */ + /* Allocate space for two FIFOs. We can't allocate from host + * memory yet because vm allocator isn't initialized + * during this early console init. + */ + dp_addr = m8xx_cpm_dpalloc(2*EARLY_BUF_SIZE); + mem_addr = (uint)(&cpmp->cp_dpmem[dp_addr]); + /* Allocate space for two buffer descriptors in the DP ram. */ dp_addr = m8xx_cpm_dpalloc(sizeof(cbd_t) * 2); - /* Allocate space for two 2 byte FIFOs in the host memory. - */ - mem_addr = m8xx_cpm_hostalloc(8); - /* Set the physical address of the host memory buffers in * the buffer descriptors. */ bdp = (cbd_t *)&cp->cp_dpmem[dp_addr]; - bdp->cbd_bufaddr = __pa(mem_addr); - (bdp+1)->cbd_bufaddr = __pa(mem_addr+4); + bdp->cbd_bufaddr = iopa(mem_addr); + (bdp+1)->cbd_bufaddr = iopa(mem_addr+4); + + consinfo.rx_va_base = (unsigned char *) mem_addr; + consinfo.rx_bd_base = (cbd_t *) bdp; + consinfo.tx_va_base = (unsigned char *) (mem_addr + EARLY_BUF_SIZE); + consinfo.tx_bd_base = (cbd_t *) (bdp+1); /* For the receive, set empty and wrap. * For transmit, set wrap. @@ -3073,7 +3172,7 @@ /* Set up the baud rate generator. */ m8xx_cpm_setbrg((ser - rs_table), bd->bi_baudrate); - + console_tx_buf_len = EARLY_BUF_SIZE; return 0; } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/Makefile linux-2.4.23-pre8/arch/ppc/Makefile --- linux-2.4.22/arch/ppc/Makefile 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/Makefile 2003-10-22 22:47:38.000000000 +0000 @@ -14,7 +14,7 @@ # # Be sure to change PAGE_OFFSET in include/asm-ppc/page.h to match -KERNELLOAD =0xc0000000 +KERNELLOAD =$(CONFIG_KERNEL_START) LINKFLAGS = -T arch/ppc/vmlinux.lds -Ttext $(KERNELLOAD) -Bstatic CPPFLAGS := $(CPPFLAGS) -I$(TOPDIR)/arch/$(ARCH) @@ -42,18 +42,13 @@ CFLAGS += $(shell echo $(CONFIG_COMPILE_OPTIONS) | sed -e 's/"//g') endif -ifdef CONFIG_40x - HEAD := arch/ppc/kernel/head_4xx.o -else - ifdef CONFIG_8xx - HEAD := arch/ppc/kernel/head_8xx.o - else - HEAD := arch/ppc/kernel/head.o - ifdef CONFIG_6xx - HEAD += arch/ppc/kernel/idle_6xx.o - endif - endif -endif +HEAD-y := arch/ppc/kernel/head.o +HEAD-$(CONFIG_40x) := arch/ppc/kernel/head_4xx.o +HEAD-$(CONFIG_44x) := arch/ppc/kernel/head_44x.o +HEAD-$(CONFIG_8xx) := arch/ppc/kernel/head_8xx.o +HEAD-$(CONFIG_6xx) += arch/ppc/kernel/idle_6xx.o + +HEAD := $(HEAD-y) ARCH_SUBDIRS = arch/ppc/kernel arch/ppc/platforms arch/ppc/mm arch/ppc/lib SUBDIRS := $(SUBDIRS) $(ARCH_SUBDIRS) @@ -90,7 +85,7 @@ checks: @$(MAKE) -C arch/$(ARCH)/kernel checks -BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd +BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd uImage # All the instructions talk about "make bzImage". bzImage: zImage diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/boot/Makefile linux-2.4.23-pre8/arch/ppc/boot/Makefile --- linux-2.4.22/arch/ppc/boot/Makefile 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/boot/Makefile 2003-10-22 22:49:04.000000000 +0000 @@ -17,7 +17,7 @@ AFLAGS += -D__BOOTER__ OBJCOPY_ARGS = -O elf32-powerpc -MKIMAGE := ./utils/mkimage.wrapper +MKIMAGE := $(TOPDIR)/scripts/mkuboot.sh lib/zlib.a: lib/zlib.c $(MAKE) -C lib @@ -61,12 +61,14 @@ gzip $(GZIP_FLAGS) images/vmapus endif -# Make an image for PPCBoot -pImage: images/vmlinux.gz - $(MKIMAGE) -A ppc -O linux -T kernel -C gzip -a 00000000 -e 00000000 \ +# Make an image for PPCBoot / U-Boot. +uImage: $(MKIMAGE) images/vmlinux.gz + $(CONFIG_SHELL) $(MKIMAGE) -A ppc -O linux -T kernel \ + -C gzip -a 00000000 -e 00000000 \ -n 'Linux-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)' \ - -d $< images/vmlinux.PPCBoot - ln -sf vmlinux.PPCBoot images/pImage + -d images/vmlinux.gz images/vmlinux.UBoot + ln -sf vmlinux.UBoot images/uImage + rm -f ./mkuboot # These are subdirs with files not normally rm'ed. -- Tom clean: diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/boot/common/crt0.S linux-2.4.23-pre8/arch/ppc/boot/common/crt0.S --- linux-2.4.22/arch/ppc/boot/common/crt0.S 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/boot/common/crt0.S 2003-10-22 22:49:10.000000000 +0000 @@ -70,7 +70,7 @@ ## Set up the stack lis r9,_start@h # r9 = &_start (text section entry) - addi r9,r9,_start@l + ori r9,r9,_start@l subi r1,r9,64 # Start the stack 64 bytes below _start clrrwi r1,r1,4 # Make sure it is aligned on 16 bytes. li r0,0 diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/boot/common/util.S linux-2.4.23-pre8/arch/ppc/boot/common/util.S --- linux-2.4.22/arch/ppc/boot/common/util.S 2003-06-13 14:51:31.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/boot/common/util.S 2003-10-22 22:47:44.000000000 +0000 @@ -160,9 +160,22 @@ blr +/* udelay (on non-601 processors) needs to know the period of the + * timebase in nanoseconds. This used to be hardcoded to be 60ns + * (period of 66MHz/4). Now a variable is used that is initialized to + * 60 for backward compatibility, but it can be overridden as necessary + * with code something like this: + * extern unsigned long timebase_period_ns; + * timebase_period_ns = 1000000000 / bd->bi_tbfreq; + */ + .data + .globl timebase_period_ns +timebase_period_ns: + .long 60 + + .text /* * Delay for a number of microseconds - * -- Use the BUS timer (assumes 66MHz) */ .globl udelay udelay: @@ -180,8 +193,13 @@ .udelay_not_601: mulli r4,r3,1000 /* nanoseconds */ - addi r4,r4,59 - li r5,60 + /* Change r4 to be the number of ticks using: + * (nanoseconds + (timebase_period_ns - 1 )) / timebase_period_ns + * timebase_period_ns defaults to 60 (16.6MHz) */ + lis r5,timebase_period_ns@ha + lwz r5,timebase_period_ns@l(r5) + add r4,r4,r5 + addi r4,r4,-1 divw r4,r4,r5 /* BUS ticks */ 1: mftbu r5 mftb r6 diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/boot/images/Makefile linux-2.4.23-pre8/arch/ppc/boot/images/Makefile --- linux-2.4.22/arch/ppc/boot/images/Makefile 2002-08-03 00:39:43.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/boot/images/Makefile 2003-10-22 22:47:40.000000000 +0000 @@ -9,4 +9,4 @@ gzip -vf9 vmlinux clean: - rm -f sImage vmapus vmlinux* miboot* zImage* zvmlinux* + rm -f sImage vmapus vmlinux* miboot* zImage* zvmlinux* uImage diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/boot/simple/Makefile linux-2.4.23-pre8/arch/ppc/boot/simple/Makefile --- linux-2.4.22/arch/ppc/boot/simple/Makefile 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/boot/simple/Makefile 2003-10-22 22:47:30.000000000 +0000 @@ -28,6 +28,35 @@ TFTPIMAGE := /tftpboot/zImage.embedded MISC := misc-embedded.o endif +ifeq ($(CONFIG_IBM_OPENBIOS),y) +ZIMAGE := zImage-TREE +ZIMAGEINITRD := zImage.initrd-TREE +END := treeboot +ZNETBOOT := zImage.treeboot +ZNETBOOTRD := zImage.initrd.treeboot +TFTPIMAGE := /tftpboot/zImage.embedded +MISC := misc-embedded.o +endif +ifeq ($(CONFIG_EBONY),y) +ZIMAGE := zImage-TREE +ZIMAGEINITRD := zImage.initrd-TREE +END := ebony +ENTRYPOINT := 0x00800000 +ZNETBOOT := zImage.treeboot +ZNETBOOTRD := zImage.initrd.treeboot +TFTPIMAGE := /tftpboot/zImage.$(END) +EXTRA := misc-44x.o +endif +ifeq ($(CONFIG_OCOTEA),y) +ZIMAGE := zImage-TREE +ZIMAGEINITRD := zImage.initrd-TREE +END := ocotea +ENTRYPOINT := 0x00800000 +ZNETBOOT := zImage.treeboot +ZNETBOOTRD := zImage.initrd.treeboot +TFTPIMAGE := /tftpboot/zImage.$(END) +EXTRA := misc-44x.o +endif ifeq ($(CONFIG_GEMINI),y) ZIMAGE := zImage-SMON ZIMAGEINITRD := zImage.initrd-SMON @@ -68,7 +97,7 @@ ifdef CONFIG_8xx LD_ARGS := -T ../ld.script -Ttext 0x00180000 -Bstatic endif -ifeq ($(CONFIG_8260)$(CONFIG_4xx),y) +ifeq ($(CONFIG_8260)$(CONFIG_40x),y) LD_ARGS := -T ../ld.script -Ttext 0x00400000 -Bstatic endif OBJCOPY_ARGS := -O elf32-powerpc @@ -147,10 +176,10 @@ mv zvmlinux.initrd ../images/zImage.initrd.embedded zImage-PAL4: zvmlinux - cp zvmlinux ../images/zImage.pal4 + mv zvmlinux ../images/zImage.pal4 zImage.initrd-PAL4: zvmlinux.initrd - cp zvmlinux.initrd ../images/zImage.initrd.pal4 + mv zvmlinux.initrd ../images/zImage.initrd.pal4 zImage-PPLUS: zvmlinux $(MKPREP) $(MKBUGBOOT) $(MKPREP) -pbp zvmlinux ../images/zImage.pplus diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/boot/simple/embed_config.c linux-2.4.23-pre8/arch/ppc/boot/simple/embed_config.c --- linux-2.4.22/arch/ppc/boot/simple/embed_config.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/boot/simple/embed_config.c 2003-10-22 22:49:19.000000000 +0000 @@ -22,6 +22,7 @@ #if defined(CONFIG_405GP) || defined(CONFIG_NP405H) || defined(CONFIG_NP405L) #include #endif +extern unsigned long timebase_period_ns; /* For those boards that don't provide one. */ @@ -640,7 +641,7 @@ } #endif /* WILLOW */ -#ifdef CONFIG_TREEBOOT +#ifdef CONFIG_IBM_OPENBIOS /* This could possibly work for all treeboot roms. */ #define BOARD_INFO_VECTOR 0xFFFE0B50 @@ -654,15 +655,12 @@ bd_t *(*get_board_info)(void) = (bd_t *(*)(void))(*(unsigned long *)BOARD_INFO_VECTOR); #if !defined(CONFIG_STB03xxx) - volatile emac_t *emacp; - emacp = (emac_t *)EMAC0_BASE; /* assume 1st emac - armin */ - /* shut down the Ethernet controller that the boot rom * sometimes leaves running. */ - mtdcr(DCRN_MALCR, MALCR_MMSR); /* 1st reset MAL */ - while (mfdcr(DCRN_MALCR) & MALCR_MMSR) {}; /* wait for the reset */ - emacp->em0mr0 = 0x20000000; /* then reset EMAC */ + mtdcr(DCRN_MALCR(DCRN_MAL_BASE), MALCR_MMSR); /* 1st reset MAL */ + while (mfdcr(DCRN_MALCR(DCRN_MAL_BASE)) & MALCR_MMSR) {}; /* wait for the reset */ + out_be32((u32 *)EMAC0_BASE, 0x20000000); /* then reset EMAC */ eieio(); #endif @@ -752,6 +750,6 @@ bd->bi_busfreq = 100000000; bd->bi_pci_busfreq= 33000000 ; #endif + timebase_period_ns = 1000000000 / bd->bi_tbfreq; } #endif - diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/boot/simple/head.S linux-2.4.23-pre8/arch/ppc/boot/simple/head.S --- linux-2.4.22/arch/ppc/boot/simple/head.S 2003-06-13 14:51:31.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/boot/simple/head.S 2003-10-22 22:49:22.000000000 +0000 @@ -35,8 +35,8 @@ .globl start start: bl start_ -#ifdef CONFIG_TREEBOOT - /* The IBM "Tree" bootrom knows that the address of the bootrom +#ifdef CONFIG_IBM_OPENBIOS + /* The IBM OpenBIOS bootroms know that the address of the bootrom * read only structure is 4 bytes after _start. */ .long 0x62726f6d # structure ID - "brom" diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/boot/simple/misc-44x.c linux-2.4.23-pre8/arch/ppc/boot/simple/misc-44x.c --- linux-2.4.22/arch/ppc/boot/simple/misc-44x.c 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/boot/simple/misc-44x.c 2003-10-22 22:48:11.000000000 +0000 @@ -0,0 +1,34 @@ +/* + * arch/ppc/simple/misc-44x.c + * + * Misc. bootloader code for IBM PPC 44x reference boards (Ebony, Ocotea) + * + * Matt Porter + * Eugene Surovegin + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ +#include +#include +#include +#include +#include + +extern struct bi_record *decompress_kernel(unsigned long load_addr, + int num_words, unsigned long cksum); +extern unsigned long timebase_period_ns; + +struct bi_record * +load_kernel(unsigned long load_addr, int num_words, unsigned long cksum) +{ + timebase_period_ns = 3; + mtdcr(DCRN_MALCR(DCRN_MAL_BASE), MALCR_MMSR); /* reset MAL */ + while (mfdcr(DCRN_MALCR(DCRN_MAL_BASE)) & MALCR_MMSR) {}; /* wait for reset */ + *(volatile unsigned long *)PPC44x_EMAC0_MR0 = 0x20000000; /* reset EMAC */ + eieio(); + + return decompress_kernel(load_addr, num_words, cksum); +} diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/boot/simple/misc-embedded.c linux-2.4.23-pre8/arch/ppc/boot/simple/misc-embedded.c --- linux-2.4.22/arch/ppc/boot/simple/misc-embedded.c 2003-06-13 14:51:31.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/boot/simple/misc-embedded.c 2003-10-22 22:48:38.000000000 +0000 @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -78,6 +79,14 @@ extern void gunzip(void *, int, unsigned char *, int *); extern void embed_config(bd_t **bp); +/* Weak function for boards which don't need to build the + * board info struct because they are using PPCBoot/U-Boot. + */ +void __attribute__ ((weak)) +embed_config(bd_t **bdp) +{ +} + unsigned long load_kernel(unsigned long load_addr, int num_words, unsigned long cksum, bd_t *bp) diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/boot/utils/mkimage.wrapper linux-2.4.23-pre8/arch/ppc/boot/utils/mkimage.wrapper --- linux-2.4.22/arch/ppc/boot/utils/mkimage.wrapper 2002-08-03 00:39:43.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/boot/utils/mkimage.wrapper 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -#!/bin/bash - -# -# Build PPCBoot image when `mkimage' tool is available. -# - -MKIMAGE=$(type -path mkimage) - -if [ -z "${MKIMAGE}" ]; then - # Doesn't exist - echo '"mkimage" command not found - PPCBoot images will not be built' >&2 - exit 0; -fi - -# Call "mkimage" to create PPCBoot image -${MKIMAGE} "$@" diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/config.in linux-2.4.23-pre8/arch/ppc/config.in --- linux-2.4.22/arch/ppc/config.in 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/config.in 2003-10-22 22:49:00.000000000 +0000 @@ -12,6 +12,7 @@ mainmenu_option next_comment comment 'Code maturity level options' bool 'Prompt for development and/or incomplete code/drivers' CONFIG_EXPERIMENTAL +bool 'Prompt for advanced kernel configuration options' CONFIG_ADVANCED_OPTIONS endmenu mainmenu_option next_comment @@ -30,11 +31,12 @@ choice 'Processor Type' \ "6xx/7xx/74xx/8260 CONFIG_6xx \ 40x CONFIG_40x \ + 44x CONFIG_44x \ POWER3 CONFIG_POWER3 \ POWER4 CONFIG_POWER4 \ 8xx CONFIG_8xx" 6xx -if [ "$CONFIG_40x" = "y" ]; then +if [ "$CONFIG_40x" = "y" -o "$CONFIG_44x" = "y" ]; then define_bool CONFIG_4xx y fi @@ -64,6 +66,12 @@ Walnut CONFIG_WALNUT" Walnut fi +if [ "$CONFIG_44x" = "y" ]; then + choice 'Machine Type' \ + "Ebony CONFIG_EBONY \ + Ocotea CONFIG_OCOTEA" Ebony +fi + if [ "$CONFIG_8xx" = "y" ]; then define_bool CONFIG_SERIAL_CONSOLE y define_bool CONFIG_NOT_COHERENT_CACHE y @@ -73,6 +81,7 @@ RPX-Classic CONFIG_RPXCLASSIC \ BSE-IP CONFIG_BSEIP \ FADS CONFIG_FADS \ + D-Box2 CONFIG_DBOX2 \ TQM823L CONFIG_TQM823L \ TQM850L CONFIG_TQM850L \ TQM855L CONFIG_TQM855L \ @@ -123,6 +132,7 @@ bool 'Symmetric multi-processing support' CONFIG_SMP if [ "$CONFIG_SMP" = "y" ]; then bool ' Distribute interrupts on all CPUs by default' CONFIG_IRQ_ALL_CPUS + int 'Maximum number of CPUs (2-32)' CONFIG_NR_CPUS 32 fi if [ "$CONFIG_6xx" = "y" -a "$CONFIG_8260" = "n" ];then @@ -134,35 +144,103 @@ fi define_bool CONFIG_PPC_ISATIMER y fi +if [ "$CONFIG_POWER4" = "y" ]; then + bool 'VMX (same as AltiVec) support' CONFIG_ALTIVEC +fi if [ "$CONFIG_4xx" = "y" -o "$CONFIG_8xx" = "y" ]; then bool 'Math emulation' CONFIG_MATH_EMULATION fi -if [ "$CONFIG_40x" = "y" ]; then -# It's often necessary to know the specific 4xx processor type. -# Fortunately, it is impled (so far) from the board type, so we -# don't need to ask more redundant questions. +if [ "$CONFIG_4xx" = "y" ]; then + + bool 'PPC4xx DMA controller support' CONFIG_PPC4xx_DMA + if [ "$CONFIG_PPC4xx_DMA" = "y" ]; then + define_bool CONFIG_PPC4xx_EDMA y + fi + +# +# Set generic PPC4xx options +# + define_bool CONFIG_NOT_COHERENT_CACHE y + + if [ "$CONFIG_40x" = "y" ]; then + choice 'TTYS0 device and default console' \ + "UART0 CONFIG_UART0_TTYS0 \ + UART1 CONFIG_UART0_TTYS1" UART0 + fi + +# +# Set processor implementation based on board +# if [ "$CONFIG_OAK" = "y" -o "$CONFIG_TIVO" = "y" ]; then define_bool CONFIG_403GCX y - define_bool CONFIG_IBM_OPENBIOS y fi + if [ "$CONFIG_WALNUT" = "y" ]; then define_bool CONFIG_405GP y - define_bool CONFIG_BIOS_FIXUP y - define_bool CONFIG_IBM_OPENBIOS y - define_bool CONFIG_IBM405_ERR77 y + fi + + if [ "$CONFIG_EBONY" = "y" ]; then + define_bool CONFIG_440GP y + fi + + if [ "$CONFIG_OCOTEA" = "y" ]; then + define_bool CONFIG_440GX y + fi + +# +# Set options based on processor implementation +# + if [ "$CONFIG_405GP" = "y" ]; then define_bool CONFIG_IBM_OCP y + define_bool CONFIG_405 y fi + + if [ "$CONFIG_440GP" = "y" ]; then + define_bool CONFIG_IBM_OCP y + define_bool CONFIG_GEN550 y + define_bool CONFIG_440 y + fi + + if [ "$CONFIG_440GX" = "y" ]; then + define_bool CONFIG_IBM_OCP y + define_bool CONFIG_GEN550 y + define_bool CONFIG_IBM_EMAC4 y + define_bool CONFIG_440A y + fi + +# +# Set options based on processor core +# if [ "$CONFIG_40x" = "y" ]; then - choice 'TTYS0 device and default console' \ - "UART0 CONFIG_UART0_TTYS0 \ - UART1 CONFIG_UART0_TTYS1" UART0 + define_bool CONFIG_IBM405_ERR51 y + fi + + if [ "$CONFIG_405" = "y" ]; then + define_bool CONFIG_IBM405_ERR77 y + fi + + if [ "$CONFIG_44x" = "y" ]; then + define_bool CONFIG_PTE_64BIT y + define_bool CONFIG_PIN_TLB y + define_bool CONFIG_BOOKE y + fi + +# +# Set other board specific options +# + if [ "$CONFIG_OAK" = "y" -o "$CONFIG_TIVO" = "y" -o \ + "$CONFIG_WALNUT" = "y" ]; then + define_bool CONFIG_IBM_OPENBIOS y + fi + + if [ "$CONFIG_WALNUT" = "y" ]; then + define_bool CONFIG_BIOS_FIXUP y fi - define_bool CONFIG_IBM405_ERR51 y - define_bool CONFIG_NOT_COHERENT_CACHE y fi + if [ "$CONFIG_8xx" = "y" -o "$CONFIG_8260" = "y" ]; then define_bool CONFIG_EMBEDDEDBOOT y fi @@ -172,8 +250,49 @@ comment 'General setup' bool 'High memory support (experimental)' CONFIG_HIGHMEM +if [ "$CONFIG_ADVANCED_OPTIONS" = "y" ]; then + if [ "$CONFIG_HIGHMEM" = "y" ]; then + bool " Set high memory pool address" CONFIG_HIGHMEM_START_BOOL + if [ "$CONFIG_HIGHMEM_START_BOOL" = "y" ]; then + hex " Virtual start address of high memory pool" CONFIG_HIGHMEM_START 0xfe000000 + fi + fi + bool " Set maximum low memory" CONFIG_LOWMEM_SIZE_BOOL + if [ "$CONFIG_LOWMEM_SIZE_BOOL" = "y" ]; then + hex " Maximum low memory size (in bytes)" CONFIG_LOWMEM_SIZE 0x20000000 + fi + + bool "Set custom kernel base address" CONFIG_KERNEL_START_BOOL + if [ "$CONFIG_KERNEL_START_BOOL" = "y" ]; then + hex " Virtual address of kernel base" CONFIG_KERNEL_START 0xc0000000 + fi + bool "Set custom user task size" CONFIG_TASK_SIZE_BOOL + if [ "$CONFIG_TASK_SIZE_BOOL" = "y" ]; then + hex " Size of user task space" CONFIG_TASK_SIZE 0x80000000 + fi +fi + +if [ "$CONFIG_HIGHMEM_START_BOOL" != "y" ]; then + define_hex CONFIG_HIGHMEM_START 0xfe000000 +fi + +if [ "$CONFIG_LOWMEM_SIZE_BOOL" != "y" ]; then + define_hex CONFIG_LOWMEM_SIZE 0x30000000 +fi -define_bool CONFIG_ISA n +if [ "$CONFIG_KERNEL_START_BOOL" != "y" ]; then + define_hex CONFIG_KERNEL_START 0xc0000000 +fi + +if [ "$CONFIG_TASK_SIZE_BOOL" != "y" ]; then + define_hex CONFIG_TASK_SIZE 0x80000000 +fi + +if [ "$CONFIG_ALL_PPC" = "y" ]; then + bool 'Support for ISA-bus hardware' CONFIG_ISA +else + define_bool CONFIG_ISA n +fi define_bool CONFIG_EISA n define_bool CONFIG_SBUS n @@ -487,4 +606,7 @@ if [ "$CONFIG_GEN550" = "y" ]; then bool 'Support for early boot texts over serial port' CONFIG_SERIAL_TEXT_DEBUG fi + +int 'Kernel messages buffer length shift (0 = default)' CONFIG_LOG_BUF_SHIFT 0 + endmenu diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/configs/IVMS8_defconfig linux-2.4.23-pre8/arch/ppc/configs/IVMS8_defconfig --- linux-2.4.22/arch/ppc/configs/IVMS8_defconfig 2003-06-13 14:51:31.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/configs/IVMS8_defconfig 2003-10-22 22:47:44.000000000 +0000 @@ -506,14 +506,8 @@ # CONFIG_SOUND is not set # -# MPC8xx CPM Options +# MPC8xx Options # -# CONFIG_SCC_ENET is not set -CONFIG_FEC_ENET=y -CONFIG_USE_MDIO=y -CONFIG_ENET_BIG_BUFFERS=y -# CONFIG_SMC2_UART is not set -# CONFIG_USE_SCC_IO is not set # # Generic MPC8xx Options @@ -523,6 +517,27 @@ # CONFIG_UCODE_PATCH is not set # +# MPC8xx CPM Options +# +# CONFIG_SCC_ENET is not set +CONFIG_FEC_ENET=y +CONFIG_USE_MDIO=y +# CONFIG_FEC_GENERIC_PHY is not set +# CONFIG_FEC_AM79C874 is not set +# CONFIG_FEC_LXT970 is not set +# CONFIG_FEC_QS6612 is not set +# CONFIG_FEC_LXT970 is not set +CONFIG_FEC_DP83843=y +# CONFIG_FEC_DP83846A is not set +CONFIG_ENET_BIG_BUFFERS=y +CONFIG_8xx_SMC1=y +# CONFIG_SMC2_UART is not set +# CONFIG_8xx_SCC1 is not set +# CONFIG_8xx_SCC2 is not set +# CONFIG_8xx_SCC3 is not set +# CONFIG_8xx_SCC4 is not set + +# # USB support # # CONFIG_USB is not set diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/configs/SM850_defconfig linux-2.4.23-pre8/arch/ppc/configs/SM850_defconfig --- linux-2.4.22/arch/ppc/configs/SM850_defconfig 2003-06-13 14:51:31.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/configs/SM850_defconfig 2003-10-22 22:48:35.000000000 +0000 @@ -470,6 +470,17 @@ # CONFIG_SOUND is not set # +# MPC8xx Options +# + +# +# Generic MPC8xx Options +# +CONFIG_8xx_COPYBACK=y +CONFIG_8xx_CPU6=y +# CONFIG_UCODE_PATCH is not set + +# # MPC8xx CPM Options # CONFIG_SCC_ENET=y @@ -481,14 +492,9 @@ CONFIG_SMC2_UART=y CONFIG_ALTSMC2=y CONFIG_CONS_SMC2=y -# CONFIG_USE_SCC_IO is not set - -# -# Generic MPC8xx Options -# -CONFIG_8xx_COPYBACK=y -CONFIG_8xx_CPU6=y -# CONFIG_UCODE_PATCH is not set +# CONFIG_8xx_SCC1 is not set +# CONFIG_8xx_SCC2 is not set +# CONFIG_8xx_SCC4 is not set # # USB support diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/configs/SPD823TS_defconfig linux-2.4.23-pre8/arch/ppc/configs/SPD823TS_defconfig --- linux-2.4.22/arch/ppc/configs/SPD823TS_defconfig 2003-06-13 14:51:31.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/configs/SPD823TS_defconfig 2003-10-22 22:49:47.000000000 +0000 @@ -469,6 +469,17 @@ # CONFIG_SOUND is not set # +# MPC8xx Options +# + +# +# Generic MPC8xx Options +# +CONFIG_8xx_COPYBACK=y +# CONFIG_8xx_CPU6 is not set +# CONFIG_UCODE_PATCH is not set + +# # MPC8xx CPM Options # CONFIG_SCC_ENET=y @@ -477,17 +488,13 @@ # CONFIG_SCC3_ENET is not set # CONFIG_FEC_ENET is not set CONFIG_ENET_BIG_BUFFERS=y +CONFIG_8xx_SMC1=y CONFIG_SMC2_UART=y CONFIG_ALTSMC2=y # CONFIG_CONS_SMC2 is not set -# CONFIG_USE_SCC_IO is not set - -# -# Generic MPC8xx Options -# -CONFIG_8xx_COPYBACK=y -# CONFIG_8xx_CPU6 is not set -# CONFIG_UCODE_PATCH is not set +# CONFIG_8xx_SCC1 is not set +# CONFIG_8xx_SCC3 is not set +# CONFIG_8xx_SCC4 is not set # # USB support diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/configs/TQM823L_defconfig linux-2.4.23-pre8/arch/ppc/configs/TQM823L_defconfig --- linux-2.4.22/arch/ppc/configs/TQM823L_defconfig 2003-06-13 14:51:31.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/configs/TQM823L_defconfig 2003-10-22 22:48:00.000000000 +0000 @@ -470,6 +470,17 @@ # CONFIG_SOUND is not set # +# MPC8xx Options +# + +# +# Generic MPC8xx Options +# +CONFIG_8xx_COPYBACK=y +# CONFIG_8xx_CPU6 is not set +# CONFIG_UCODE_PATCH is not set + +# # MPC8xx CPM Options # CONFIG_SCC_ENET=y @@ -478,17 +489,13 @@ # CONFIG_SCC3_ENET is not set # CONFIG_FEC_ENET is not set CONFIG_ENET_BIG_BUFFERS=y +CONFIG_8xx_SMC1=y CONFIG_SMC2_UART=y CONFIG_ALTSMC2=y # CONFIG_CONS_SMC2 is not set -# CONFIG_USE_SCC_IO is not set - -# -# Generic MPC8xx Options -# -CONFIG_8xx_COPYBACK=y -# CONFIG_8xx_CPU6 is not set -# CONFIG_UCODE_PATCH is not set +# CONFIG_8xx_SCC1 is not set +# CONFIG_8xx_SCC3 is not set +# CONFIG_8xx_SCC4 is not set # # USB support diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/configs/TQM850L_defconfig linux-2.4.23-pre8/arch/ppc/configs/TQM850L_defconfig --- linux-2.4.22/arch/ppc/configs/TQM850L_defconfig 2003-06-13 14:51:31.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/configs/TQM850L_defconfig 2003-10-22 22:49:02.000000000 +0000 @@ -470,6 +470,17 @@ # CONFIG_SOUND is not set # +# MPC8xx Options +# + +# +# Generic MPC8xx Options +# +CONFIG_8xx_COPYBACK=y +# CONFIG_8xx_CPU6 is not set +# CONFIG_UCODE_PATCH is not set + +# # MPC8xx CPM Options # CONFIG_SCC_ENET=y diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/configs/TQM860L_defconfig linux-2.4.23-pre8/arch/ppc/configs/TQM860L_defconfig --- linux-2.4.22/arch/ppc/configs/TQM860L_defconfig 2003-06-13 14:51:31.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/configs/TQM860L_defconfig 2003-10-22 22:48:22.000000000 +0000 @@ -511,6 +511,17 @@ # CONFIG_SOUND is not set # +# MPC8xx Options +# + +# +# Generic MPC8xx Options +# +CONFIG_8xx_COPYBACK=y +# CONFIG_8xx_CPU6 is not set +# CONFIG_UCODE_PATCH is not set + +# # MPC8xx CPM Options # CONFIG_SCC_ENET=y @@ -519,17 +530,13 @@ # CONFIG_SCC3_ENET is not set # CONFIG_FEC_ENET is not set CONFIG_ENET_BIG_BUFFERS=y +CONFIG_8xx_SMC1=y CONFIG_SMC2_UART=y # CONFIG_ALTSMC2 is not set # CONFIG_CONS_SMC2 is not set -# CONFIG_USE_SCC_IO is not set - -# -# Generic MPC8xx Options -# -CONFIG_8xx_COPYBACK=y -# CONFIG_8xx_CPU6 is not set -# CONFIG_UCODE_PATCH is not set +# CONFIG_8xx_SCC2 is not set +# CONFIG_8xx_SCC3 is not set +# CONFIG_8xx_SCC4 is not set # # USB support diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/configs/apus_defconfig linux-2.4.23-pre8/arch/ppc/configs/apus_defconfig --- linux-2.4.22/arch/ppc/configs/apus_defconfig 2003-06-13 14:51:31.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/configs/apus_defconfig 2003-10-22 22:49:18.000000000 +0000 @@ -415,7 +415,7 @@ # CONFIG_BMAC is not set # CONFIG_GMAC is not set CONFIG_ARIADNE=y -CONFIG_NE2K_ZORRO=y +CONFIG_ZORRO8390=y CONFIG_A2065=y CONFIG_HYDRA=y # CONFIG_SUNLANCE is not set diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/configs/bseip_defconfig linux-2.4.23-pre8/arch/ppc/configs/bseip_defconfig --- linux-2.4.22/arch/ppc/configs/bseip_defconfig 2003-06-13 14:51:31.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/configs/bseip_defconfig 2003-10-22 22:48:10.000000000 +0000 @@ -469,6 +469,17 @@ # CONFIG_SOUND is not set # +# MPC8xx Options +# + +# +# Generic MPC8xx Options +# +CONFIG_8xx_COPYBACK=y +# CONFIG_8xx_CPU6 is not set +# CONFIG_UCODE_PATCH is not set + +# # MPC8xx CPM Options # CONFIG_SCC_ENET=y @@ -477,17 +488,13 @@ # CONFIG_SCC3_ENET is not set # CONFIG_FEC_ENET is not set # CONFIG_ENET_BIG_BUFFERS is not set +CONFIG_8xx_SMC1=y CONFIG_SMC2_UART=y # CONFIG_ALTSMC2 is not set # CONFIG_CONS_SMC2 is not set -# CONFIG_USE_SCC_IO is not set - -# -# Generic MPC8xx Options -# -CONFIG_8xx_COPYBACK=y -# CONFIG_8xx_CPU6 is not set -# CONFIG_UCODE_PATCH is not set +# CONFIG_8xx_SCC1 is not set +# CONFIG_8xx_SCC3 is not set +# CONFIG_8xx_SCC4 is not set # # USB support diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/configs/ebony_defconfig linux-2.4.23-pre8/arch/ppc/configs/ebony_defconfig --- linux-2.4.22/arch/ppc/configs/ebony_defconfig 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/configs/ebony_defconfig 2003-10-22 22:47:39.000000000 +0000 @@ -0,0 +1,491 @@ +# +# Automatically generated by make menuconfig: don't edit +# +# CONFIG_UID16 is not set +# CONFIG_RWSEM_GENERIC_SPINLOCK is not set +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_HAVE_DEC_LOCK=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y + +# +# Loadable module support +# +CONFIG_MODULES=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y + +# +# Platform support +# +CONFIG_PPC=y +CONFIG_PPC32=y +# CONFIG_6xx is not set +# CONFIG_40x is not set +CONFIG_44x=y +# CONFIG_POWER3 is not set +# CONFIG_POWER4 is not set +# CONFIG_8xx is not set +CONFIG_4xx=y +CONFIG_EBONY=y +# CONFIG_OCOTEA is not set +# CONFIG_SMP is not set +# CONFIG_MATH_EMULATION is not set +# CONFIG_PPC4xx_DMA is not set +CONFIG_NOT_COHERENT_CACHE=y +CONFIG_440GP=y +CONFIG_IBM_OCP=y +CONFIG_GEN550=y +CONFIG_440=y +CONFIG_PTE_64BIT=y +CONFIG_PIN_TLB=y +CONFIG_BOOKE=y + +# +# General setup +# +CONFIG_HIGHMEM=y +# CONFIG_ISA is not set +# CONFIG_EISA is not set +# CONFIG_SBUS is not set +# CONFIG_MCA is not set +CONFIG_PCI=y +# CONFIG_PC_KEYBOARD is not set +CONFIG_NET=y +CONFIG_SYSCTL=y +CONFIG_SYSVIPC=y +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_KCORE_ELF=y +CONFIG_BINFMT_ELF=y +CONFIG_KERNEL_ELF=y +# CONFIG_BINFMT_MISC is not set +CONFIG_PCI_NAMES=y +# CONFIG_HOTPLUG is not set +# CONFIG_PCMCIA is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set +CONFIG_GEN_RTC=y +CONFIG_CMDLINE_BOOL=y +CONFIG_CMDLINE="ip=on" + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Plug and Play configuration +# +# CONFIG_PNP is not set +# CONFIG_ISAPNP is not set + +# +# Block devices +# +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_XD is not set +# CONFIG_PARIDE is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_CISS_SCSI_TAPE is not set +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_LOOP is not set +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_RAM is not set +# CONFIG_BLK_DEV_INITRD is not set +CONFIG_BLK_STATS=y + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set +# CONFIG_BLK_DEV_MD is not set +# CONFIG_MD_LINEAR is not set +# CONFIG_MD_RAID0 is not set +# CONFIG_MD_RAID1 is not set +# CONFIG_MD_RAID5 is not set +# CONFIG_MD_MULTIPATH is not set +# CONFIG_BLK_DEV_LVM is not set + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set +# CONFIG_NETLINK_DEV is not set +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +CONFIG_FILTER=y +CONFIG_UNIX=y +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_PNP=y +# CONFIG_IP_PNP_DHCP is not set +CONFIG_IP_PNP_BOOTP=y +# CONFIG_IP_PNP_RARP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_ARPD is not set +# CONFIG_INET_ECN is not set +# CONFIG_SYN_COOKIES is not set + +# +# IP: Netfilter Configuration +# +# CONFIG_IP_NF_CONNTRACK is not set +# CONFIG_IP_NF_QUEUE is not set +# CONFIG_IP_NF_IPTABLES is not set +# CONFIG_IP_NF_ARPTABLES is not set +# CONFIG_IP_NF_COMPAT_IPCHAINS is not set +# CONFIG_IP_NF_COMPAT_IPFWADM is not set +# CONFIG_IPV6 is not set +# CONFIG_KHTTPD is not set +# CONFIG_ATM is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set + +# +# Appletalk devices +# +# CONFIG_DEV_APPLETALK is not set +# CONFIG_DECNET is not set +# CONFIG_BRIDGE is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_LLC is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_FASTROUTE is not set +# CONFIG_NET_HW_FLOWCONTROL is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set + +# +# ATA/IDE/MFM/RLL support +# +# CONFIG_IDE is not set +# CONFIG_BLK_DEV_IDE_MODES is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI support +# +# CONFIG_SCSI is not set + +# +# IEEE 1394 (FireWire) support (EXPERIMENTAL) +# +# CONFIG_IEEE1394 is not set + +# +# Network device support +# +CONFIG_NETDEVICES=y + +# +# ARCnet devices +# +# CONFIG_ARCNET is not set +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set +# CONFIG_ETHERTAP is not set + +# +# Ethernet (10 or 100Mbit) +# +# CONFIG_NET_ETHERNET is not set + +# +# Ethernet (1000 Mbit) +# +# CONFIG_ACENIC is not set +# CONFIG_DL2K is not set +# CONFIG_E1000 is not set +# CONFIG_MYRI_SBUS is not set +# CONFIG_NS83820 is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set +# CONFIG_R8169 is not set +# CONFIG_SK98LIN is not set +# CONFIG_TIGON3 is not set + +# +# On-chip net devices +# +CONFIG_IBM_OCP_ENET=y +# CONFIG_IBM_OCP_ENET_ERROR_MSG is not set +CONFIG_IBM_OCP_ENET_RX_BUFF=64 +CONFIG_IBM_OCP_ENET_TX_BUFF=8 +CONFIG_IBM_OCP_ENET_GAP=8 +CONFIG_IBM_OCP_ENET_SKB_RES=0 +CONFIG_OCP_NET=y +CONFIG_IBM_OCP_MAL_CNT=1 +CONFIG_IBM_OCP_ZMII=y +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PLIP is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Token Ring devices +# +# CONFIG_TR is not set +# CONFIG_NET_FC is not set +# CONFIG_RCPCI is not set +# CONFIG_SHAPER is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set + +# +# Amateur Radio support +# +# CONFIG_HAMRADIO is not set + +# +# IrDA (infrared) support +# +# CONFIG_IRDA is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Old CD-ROM drivers (not SCSI, not IDE) +# +# CONFIG_CD_NO_IDESCSI is not set + +# +# Console drivers +# +# CONFIG_VGA_CONSOLE is not set + +# +# Frame-buffer support +# +# CONFIG_FB is not set + +# +# Input core support +# +# CONFIG_INPUT is not set +# CONFIG_INPUT_KEYBDEV is not set +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_EVDEV is not set + +# +# Macintosh device drivers +# + +# +# Character devices +# +# CONFIG_VT is not set +CONFIG_SERIAL=y +CONFIG_SERIAL_CONSOLE=y +# CONFIG_SERIAL_EXTENDED is not set +# CONFIG_SERIAL_NONSTANDARD is not set +CONFIG_UNIX98_PTYS=y +CONFIG_UNIX98_PTY_COUNT=256 + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Mice +# +# CONFIG_BUSMOUSE is not set +# CONFIG_MOUSE is not set + +# +# Joysticks +# +# CONFIG_INPUT_GAMEPORT is not set +# CONFIG_QIC02_TAPE is not set +# CONFIG_IPMI_HANDLER is not set +# CONFIG_IPMI_PANIC_EVENT is not set +# CONFIG_IPMI_DEVICE_INTERFACE is not set +# CONFIG_IPMI_KCS is not set +# CONFIG_IPMI_WATCHDOG is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_SCx200_GPIO is not set +# CONFIG_AMD_PM768 is not set +# CONFIG_NVRAM is not set +# CONFIG_RTC is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set +# CONFIG_IBM_GPIO is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_FTAPE is not set +# CONFIG_AGP is not set +# CONFIG_DRM is not set + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# File systems +# +# CONFIG_QUOTA is not set +# CONFIG_QFMT_V2 is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_ADFS_FS is not set +# CONFIG_ADFS_FS_RW is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BEFS_DEBUG is not set +# CONFIG_BFS_FS is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_JBD_DEBUG is not set +# CONFIG_FAT_FS is not set +# CONFIG_MSDOS_FS is not set +# CONFIG_UMSDOS_FS is not set +# CONFIG_VFAT_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +# CONFIG_JFFS2_FS is not set +# CONFIG_CRAMFS is not set +# CONFIG_TMPFS is not set +CONFIG_RAMFS=y +# CONFIG_ISO9660_FS is not set +# CONFIG_JOLIET is not set +# CONFIG_ZISOFS is not set +# CONFIG_JFS_FS is not set +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_NTFS_FS is not set +# CONFIG_NTFS_RW is not set +# CONFIG_HPFS_FS is not set +CONFIG_PROC_FS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVFS_MOUNT is not set +# CONFIG_DEVFS_DEBUG is not set +CONFIG_DEVPTS_FS=y +# CONFIG_QNX4FS_FS is not set +# CONFIG_QNX4FS_RW is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_EXT2_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UDF_FS is not set +# CONFIG_UDF_RW is not set +# CONFIG_UFS_FS is not set +# CONFIG_UFS_FS_WRITE is not set + +# +# Network File Systems +# +# CONFIG_CODA_FS is not set +# CONFIG_INTERMEZZO_FS is not set +CONFIG_NFS_FS=y +# CONFIG_NFS_V3 is not set +# CONFIG_NFS_DIRECTIO is not set +CONFIG_ROOT_NFS=y +# CONFIG_NFSD is not set +# CONFIG_NFSD_V3 is not set +# CONFIG_NFSD_TCP is not set +CONFIG_SUNRPC=y +CONFIG_LOCKD=y +# CONFIG_SMB_FS is not set +# CONFIG_NCP_FS is not set +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +# CONFIG_NCPFS_NFS_NS is not set +# CONFIG_NCPFS_OS2_NS is not set +# CONFIG_NCPFS_SMALLDOS is not set +# CONFIG_NCPFS_NLS is not set +# CONFIG_NCPFS_EXTRAS is not set +# CONFIG_ZISOFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_SMB_NLS is not set +# CONFIG_NLS is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +# CONFIG_USB is not set + +# +# Bluetooth support +# +# CONFIG_BLUEZ is not set + +# +# Cryptographic options +# +# CONFIG_CRYPTO is not set + +# +# Library routines +# +CONFIG_CRC32=y +# CONFIG_ZLIB_INFLATE is not set +# CONFIG_ZLIB_DEFLATE is not set + +# +# Kernel hacking +# +# CONFIG_DEBUG_KERNEL is not set +# CONFIG_SERIAL_TEXT_DEBUG is not set diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/configs/mbx_defconfig linux-2.4.23-pre8/arch/ppc/configs/mbx_defconfig --- linux-2.4.22/arch/ppc/configs/mbx_defconfig 2003-06-13 14:51:31.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/configs/mbx_defconfig 2003-10-22 22:47:28.000000000 +0000 @@ -465,6 +465,17 @@ # CONFIG_SOUND is not set # +# MPC8xx Options +# + +# +# Generic MPC8xx Options +# +CONFIG_8xx_COPYBACK=y +CONFIG_8xx_CPU6=y +# CONFIG_UCODE_PATCH is not set + +# # MPC8xx CPM Options # CONFIG_SCC_ENET=y @@ -473,17 +484,13 @@ # CONFIG_SCC3_ENET is not set # CONFIG_FEC_ENET is not set CONFIG_ENET_BIG_BUFFERS=y +CONFIG_8xx_SMC1=y CONFIG_SMC2_UART=y # CONFIG_ALTSMC2 is not set # CONFIG_CONS_SMC2 is not set -CONFIG_USE_SCC_IO=y - -# -# Generic MPC8xx Options -# -CONFIG_8xx_COPYBACK=y -CONFIG_8xx_CPU6=y -# CONFIG_UCODE_PATCH is not set +# CONFIG_8xx_SCC2 is not set +# CONFIG_8xx_SCC3 is not set +# CONFIG_8xx_SCC4 is not set # # USB support diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/configs/ocotea_defconfig linux-2.4.23-pre8/arch/ppc/configs/ocotea_defconfig --- linux-2.4.22/arch/ppc/configs/ocotea_defconfig 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/configs/ocotea_defconfig 2003-10-22 22:49:15.000000000 +0000 @@ -0,0 +1,490 @@ +# +# Automatically generated by make menuconfig: don't edit +# +# CONFIG_UID16 is not set +# CONFIG_RWSEM_GENERIC_SPINLOCK is not set +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_HAVE_DEC_LOCK=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y + +# +# Loadable module support +# +CONFIG_MODULES=y +# CONFIG_MODVERSIONS is not set +CONFIG_KMOD=y + +# +# Platform support +# +CONFIG_PPC=y +CONFIG_PPC32=y +# CONFIG_6xx is not set +# CONFIG_40x is not set +CONFIG_44x=y +# CONFIG_POWER3 is not set +# CONFIG_POWER4 is not set +# CONFIG_8xx is not set +CONFIG_4xx=y +# CONFIG_EBONY is not set +CONFIG_OCOTEA=y +# CONFIG_SMP is not set +# CONFIG_MATH_EMULATION is not set +# CONFIG_PPC4xx_DMA is not set +CONFIG_NOT_COHERENT_CACHE=y +CONFIG_440GX=y +CONFIG_IBM_OCP=y +CONFIG_GEN550=y +CONFIG_IBM_EMAC4=y +CONFIG_440A=y +CONFIG_PTE_64BIT=y +CONFIG_PIN_TLB=y +CONFIG_BOOKE=y + +# +# General setup +# +CONFIG_HIGHMEM=y +# CONFIG_ISA is not set +# CONFIG_EISA is not set +# CONFIG_SBUS is not set +# CONFIG_MCA is not set +CONFIG_PCI=y +# CONFIG_PC_KEYBOARD is not set +CONFIG_NET=y +CONFIG_SYSCTL=y +CONFIG_SYSVIPC=y +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_KCORE_ELF=y +CONFIG_BINFMT_ELF=y +CONFIG_KERNEL_ELF=y +# CONFIG_BINFMT_MISC is not set +CONFIG_PCI_NAMES=y +# CONFIG_HOTPLUG is not set +# CONFIG_PCMCIA is not set + +# +# Parallel port support +# +# CONFIG_PARPORT is not set +CONFIG_GEN_RTC=y +CONFIG_CMDLINE_BOOL=y +CONFIG_CMDLINE="ip=on console=ttyS0,115200" + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Plug and Play configuration +# +# CONFIG_PNP is not set +# CONFIG_ISAPNP is not set + +# +# Block devices +# +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_XD is not set +# CONFIG_PARIDE is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_CISS_SCSI_TAPE is not set +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_LOOP is not set +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_RAM is not set +# CONFIG_BLK_DEV_INITRD is not set +CONFIG_BLK_STATS=y + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set +# CONFIG_BLK_DEV_MD is not set +# CONFIG_MD_LINEAR is not set +# CONFIG_MD_RAID0 is not set +# CONFIG_MD_RAID1 is not set +# CONFIG_MD_RAID5 is not set +# CONFIG_MD_MULTIPATH is not set +# CONFIG_BLK_DEV_LVM is not set + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set +# CONFIG_NETLINK_DEV is not set +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +CONFIG_FILTER=y +CONFIG_UNIX=y +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_PNP=y +# CONFIG_IP_PNP_DHCP is not set +CONFIG_IP_PNP_BOOTP=y +# CONFIG_IP_PNP_RARP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_ARPD is not set +# CONFIG_INET_ECN is not set +# CONFIG_SYN_COOKIES is not set + +# +# IP: Netfilter Configuration +# +# CONFIG_IP_NF_CONNTRACK is not set +# CONFIG_IP_NF_QUEUE is not set +# CONFIG_IP_NF_IPTABLES is not set +# CONFIG_IP_NF_ARPTABLES is not set +# CONFIG_IP_NF_COMPAT_IPCHAINS is not set +# CONFIG_IP_NF_COMPAT_IPFWADM is not set +# CONFIG_IPV6 is not set +# CONFIG_KHTTPD is not set +# CONFIG_ATM is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set + +# +# Appletalk devices +# +# CONFIG_DEV_APPLETALK is not set +# CONFIG_DECNET is not set +# CONFIG_BRIDGE is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_LLC is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_FASTROUTE is not set +# CONFIG_NET_HW_FLOWCONTROL is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set + +# +# ATA/IDE/MFM/RLL support +# +# CONFIG_IDE is not set +# CONFIG_BLK_DEV_IDE_MODES is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI support +# +# CONFIG_SCSI is not set + +# +# IEEE 1394 (FireWire) support (EXPERIMENTAL) +# +# CONFIG_IEEE1394 is not set + +# +# Network device support +# +CONFIG_NETDEVICES=y + +# +# ARCnet devices +# +# CONFIG_ARCNET is not set +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set +# CONFIG_ETHERTAP is not set + +# +# Ethernet (10 or 100Mbit) +# +# CONFIG_NET_ETHERNET is not set + +# +# Ethernet (1000 Mbit) +# +# CONFIG_ACENIC is not set +# CONFIG_DL2K is not set +# CONFIG_E1000 is not set +# CONFIG_MYRI_SBUS is not set +# CONFIG_NS83820 is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set +# CONFIG_R8169 is not set +# CONFIG_SK98LIN is not set +# CONFIG_TIGON3 is not set + +# +# On-chip net devices +# +CONFIG_IBM_OCP_ENET=y +# CONFIG_IBM_OCP_ENET_ERROR_MSG is not set +CONFIG_IBM_OCP_ENET_RX_BUFF=64 +CONFIG_IBM_OCP_ENET_TX_BUFF=8 +CONFIG_IBM_OCP_ENET_GAP=8 +CONFIG_IBM_OCP_ENET_SKB_RES=0 +CONFIG_OCP_NET=y +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PLIP is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set + +# +# Token Ring devices +# +# CONFIG_TR is not set +# CONFIG_NET_FC is not set +# CONFIG_RCPCI is not set +# CONFIG_SHAPER is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set + +# +# Amateur Radio support +# +# CONFIG_HAMRADIO is not set + +# +# IrDA (infrared) support +# +# CONFIG_IRDA is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN is not set + +# +# Old CD-ROM drivers (not SCSI, not IDE) +# +# CONFIG_CD_NO_IDESCSI is not set + +# +# Console drivers +# +# CONFIG_VGA_CONSOLE is not set + +# +# Frame-buffer support +# +# CONFIG_FB is not set + +# +# Input core support +# +# CONFIG_INPUT is not set +# CONFIG_INPUT_KEYBDEV is not set +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_EVDEV is not set + +# +# Macintosh device drivers +# + +# +# Character devices +# +# CONFIG_VT is not set +CONFIG_SERIAL=y +CONFIG_SERIAL_CONSOLE=y +# CONFIG_SERIAL_EXTENDED is not set +# CONFIG_SERIAL_NONSTANDARD is not set +CONFIG_UNIX98_PTYS=y +CONFIG_UNIX98_PTY_COUNT=256 + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# Mice +# +# CONFIG_BUSMOUSE is not set +# CONFIG_MOUSE is not set + +# +# Joysticks +# +# CONFIG_INPUT_GAMEPORT is not set +# CONFIG_QIC02_TAPE is not set +# CONFIG_IPMI_HANDLER is not set +# CONFIG_IPMI_PANIC_EVENT is not set +# CONFIG_IPMI_DEVICE_INTERFACE is not set +# CONFIG_IPMI_KCS is not set +# CONFIG_IPMI_WATCHDOG is not set + +# +# Watchdog Cards +# +# CONFIG_WATCHDOG is not set +# CONFIG_SCx200_GPIO is not set +# CONFIG_AMD_PM768 is not set +# CONFIG_NVRAM is not set +# CONFIG_RTC is not set +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set +# CONFIG_IBM_GPIO is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_FTAPE is not set +# CONFIG_AGP is not set +# CONFIG_DRM is not set + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# File systems +# +# CONFIG_QUOTA is not set +# CONFIG_QFMT_V2 is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_ADFS_FS is not set +# CONFIG_ADFS_FS_RW is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BEFS_DEBUG is not set +# CONFIG_BFS_FS is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_JBD_DEBUG is not set +# CONFIG_FAT_FS is not set +# CONFIG_MSDOS_FS is not set +# CONFIG_UMSDOS_FS is not set +# CONFIG_VFAT_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_JFFS_FS is not set +# CONFIG_JFFS2_FS is not set +# CONFIG_CRAMFS is not set +# CONFIG_TMPFS is not set +CONFIG_RAMFS=y +# CONFIG_ISO9660_FS is not set +# CONFIG_JOLIET is not set +# CONFIG_ZISOFS is not set +# CONFIG_JFS_FS is not set +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_NTFS_FS is not set +# CONFIG_NTFS_RW is not set +# CONFIG_HPFS_FS is not set +CONFIG_PROC_FS=y +# CONFIG_DEVFS_FS is not set +# CONFIG_DEVFS_MOUNT is not set +# CONFIG_DEVFS_DEBUG is not set +CONFIG_DEVPTS_FS=y +# CONFIG_QNX4FS_FS is not set +# CONFIG_QNX4FS_RW is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_EXT2_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UDF_FS is not set +# CONFIG_UDF_RW is not set +# CONFIG_UFS_FS is not set +# CONFIG_UFS_FS_WRITE is not set + +# +# Network File Systems +# +# CONFIG_CODA_FS is not set +# CONFIG_INTERMEZZO_FS is not set +CONFIG_NFS_FS=y +# CONFIG_NFS_V3 is not set +# CONFIG_NFS_DIRECTIO is not set +CONFIG_ROOT_NFS=y +# CONFIG_NFSD is not set +# CONFIG_NFSD_V3 is not set +# CONFIG_NFSD_TCP is not set +CONFIG_SUNRPC=y +CONFIG_LOCKD=y +# CONFIG_SMB_FS is not set +# CONFIG_NCP_FS is not set +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +# CONFIG_NCPFS_NFS_NS is not set +# CONFIG_NCPFS_OS2_NS is not set +# CONFIG_NCPFS_SMALLDOS is not set +# CONFIG_NCPFS_NLS is not set +# CONFIG_NCPFS_EXTRAS is not set +# CONFIG_ZISOFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_SMB_NLS is not set +# CONFIG_NLS is not set + +# +# Sound +# +# CONFIG_SOUND is not set + +# +# USB support +# +# CONFIG_USB is not set + +# +# Bluetooth support +# +# CONFIG_BLUEZ is not set + +# +# Cryptographic options +# +# CONFIG_CRYPTO is not set + +# +# Library routines +# +CONFIG_CRC32=y +# CONFIG_ZLIB_INFLATE is not set +# CONFIG_ZLIB_DEFLATE is not set + +# +# Kernel hacking +# +# CONFIG_DEBUG_KERNEL is not set +# CONFIG_SERIAL_TEXT_DEBUG is not set diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/configs/rpxcllf_defconfig linux-2.4.23-pre8/arch/ppc/configs/rpxcllf_defconfig --- linux-2.4.22/arch/ppc/configs/rpxcllf_defconfig 2003-06-13 14:51:31.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/configs/rpxcllf_defconfig 2003-10-22 22:49:19.000000000 +0000 @@ -504,6 +504,17 @@ # CONFIG_SOUND is not set # +# MPC8xx Options +# + +# +# Generic MPC8xx Options +# +CONFIG_8xx_COPYBACK=y +# CONFIG_8xx_CPU6 is not set +# CONFIG_UCODE_PATCH is not set + +# # MPC8xx CPM Options # CONFIG_SCC_ENET=y @@ -513,17 +524,13 @@ CONFIG_FEC_ENET=y # CONFIG_USE_MDIO is not set CONFIG_ENET_BIG_BUFFERS=y +CONFIG_8xx_SMC1=y CONFIG_SMC2_UART=y # CONFIG_ALTSMC2 is not set # CONFIG_CONS_SMC2 is not set -CONFIG_USE_SCC_IO=y - -# -# Generic MPC8xx Options -# -CONFIG_8xx_COPYBACK=y -# CONFIG_8xx_CPU6 is not set -# CONFIG_UCODE_PATCH is not set +# CONFIG_8xx_SCC2 is not set +# CONFIG_8xx_SCC3 is not set +# CONFIG_8xx_SCC4 is not set # # USB support diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/configs/rpxlite_defconfig linux-2.4.23-pre8/arch/ppc/configs/rpxlite_defconfig --- linux-2.4.22/arch/ppc/configs/rpxlite_defconfig 2003-06-13 14:51:31.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/configs/rpxlite_defconfig 2003-10-22 22:48:00.000000000 +0000 @@ -504,6 +504,17 @@ # CONFIG_SOUND is not set # +# MPC8xx Options +# + +# +# Generic MPC8xx Options +# +CONFIG_8xx_COPYBACK=y +# CONFIG_8xx_CPU6 is not set +# CONFIG_UCODE_PATCH is not set + +# # MPC8xx CPM Options # CONFIG_SCC_ENET=y @@ -512,15 +523,11 @@ # CONFIG_SCC3_ENET is not set # CONFIG_FEC_ENET is not set # CONFIG_ENET_BIG_BUFFERS is not set +CONFIG_8xx_SMC1=y # CONFIG_SMC2_UART is not set -# CONFIG_USE_SCC_IO is not set - -# -# Generic MPC8xx Options -# -CONFIG_8xx_COPYBACK=y -# CONFIG_8xx_CPU6 is not set -# CONFIG_UCODE_PATCH is not set +# CONFIG_8xx_SCC1 is not set +# CONFIG_8xx_SCC3 is not set +# CONFIG_8xx_SCC4 is not set # # USB support diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/kernel/Makefile linux-2.4.23-pre8/arch/ppc/kernel/Makefile --- linux-2.4.22/arch/ppc/kernel/Makefile 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/kernel/Makefile 2003-10-22 22:49:34.000000000 +0000 @@ -24,13 +24,15 @@ HEAD-y := head.o HEAD-$(CONFIG_6xx) += idle_6xx.o HEAD-$(CONFIG_40x) := head_4xx.o +HEAD-$(CONFIG_44x) := head_44x.o HEAD-$(CONFIG_8xx) := head_8xx.o all: $(HEAD-y) kernel.o O_TARGET := kernel.o -export-objs := ppc_ksyms.o time.o ocp.o ppc4xx_setup.o +export-objs := ppc_ksyms.o time.o ocp.o ppc4xx_setup.o \ + ppc4xx_dma.o ppc4xx_sgdma.o obj-y := entry.o traps.o irq.o idle.o time.o misc.o \ process.o signal.o ptrace.o align.o \ @@ -51,12 +53,16 @@ obj-$(CONFIG_KGDB) += gen550_kgdb.o gen550_dbg.o obj-$(CONFIG_SERIAL_TEXT_DEBUG) += gen550_dbg.o endif -obj-$(CONFIG_4xx) += todc_time.o -obj-$(CONFIG_40x) += ppc4xx_setup.o ocp.o -obj-$(CONFIG_40x) += ppc4xx_pic.o +obj-$(CONFIG_40x) += ppc4xx_setup.o +obj-$(CONFIG_4xx) += ocp.o ppc4xx_pic.o todc_time.o ifeq ($(CONFIG_PCI),y) -obj-$(CONFIG_40x) += ppc405_pci.o indirect_pci.o pci_auto.o +obj-$(CONFIG_40x) += ppc405_pci.o +obj-$(CONFIG_4xx) += indirect_pci.o pci_auto.o endif +obj-$(CONFIG_44x) += ibm44x_common.o +obj-$(CONFIG_440GP) += ibm440gp_common.o +obj-$(CONFIG_PPC4xx_DMA) += ppc4xx_dma.o +obj-$(CONFIG_PPC4xx_EDMA) += ppc4xx_sgdma.o obj-$(CONFIG_8xx) += m8xx_setup.o ppc8xx_pic.o ifeq ($(CONFIG_8xx),y) obj-$(CONFIG_PCI) += qspan_pci.o @@ -84,6 +90,7 @@ l2cr.o: l2cr.S ppc_defs.h head.o: head.S ppc_defs.h head_4xx.o: head_4xx.S ppc_defs.h +head_44x.o: head_44x.S ppc_defs.h head_8xx.o: head_8xx.S ppc_defs.h idle_6xx.o: idle_6xx.S ppc_defs.h diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/kernel/cputable.c linux-2.4.23-pre8/arch/ppc/kernel/cputable.c --- linux-2.4.22/arch/ppc/kernel/cputable.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/kernel/cputable.c 2003-10-22 22:48:59.000000000 +0000 @@ -29,12 +29,12 @@ extern void __setup_cpu_745x(unsigned long offset, int cpu_nr, struct cpu_spec* spec); extern void __setup_cpu_power3(unsigned long offset, int cpu_nr, struct cpu_spec* spec); extern void __setup_cpu_power4(unsigned long offset, int cpu_nr, struct cpu_spec* spec); +extern void __setup_cpu_ppc970(unsigned long offset, int cpu_nr, struct cpu_spec* spec); extern void __setup_cpu_8xx(unsigned long offset, int cpu_nr, struct cpu_spec* spec); extern void __setup_cpu_generic(unsigned long offset, int cpu_nr, struct cpu_spec* spec); -#define CLASSIC_PPC (!defined(CONFIG_8xx) && \ - !defined(CONFIG_4xx) && !defined(CONFIG_POWER3) && \ - !defined(CONFIG_POWER4)) +#define CLASSIC_PPC (!defined(CONFIG_8xx) && !defined(CONFIG_4xx) && \ + !defined(CONFIG_POWER3) && !defined(CONFIG_POWER4)) /* This table only contains "desktop" CPUs, it need to be filled with embedded * ones as well... @@ -322,6 +322,14 @@ 128, 128, __setup_cpu_power4 }, + { /* PPC970 */ + 0xffff0000, 0x00390000, "PPC970", + CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE | + CPU_FTR_ALTIVEC_COMP | CPU_FTR_CAN_NAP, + COMMON_PPC | PPC_FEATURE_64 | PPC_FEATURE_HAS_ALTIVEC, + 128, 128, + __setup_cpu_ppc970 + }, #endif /* CONFIG_POWER4 */ #ifdef CONFIG_8xx { /* 8xx */ @@ -370,6 +378,29 @@ 0, /*__setup_cpu_405 */ }, #endif /* CONFIG_4xx */ +#ifdef CONFIG_44x + { /* 440GP Rev. B */ + 0xf0000fff, 0x40000440, "440GP Rev. B", + CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB, + PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, + 32, 32, + 0, /*__setup_cpu_440 */ + }, + { /* 440GP Rev. C */ + 0xf0000fff, 0x40000481, "440GP Rev. C", + CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB, + PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, + 32, 32, + 0, /*__setup_cpu_440 */ + }, + { /* 440GX Rev. A */ + 0xf0000fff, 0x50000850, "440GX Rev. A", + CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB, + PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, + 32, 32, + 0, /*__setup_cpu_440 */ + }, +#endif /* CONFIG_44x */ #if !CLASSIC_PPC { /* default match */ 0x00000000, 0x00000000, "(generic PPC)", diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/kernel/entry.S linux-2.4.23-pre8/arch/ppc/kernel/entry.S --- linux-2.4.22/arch/ppc/kernel/entry.S 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/kernel/entry.S 2003-10-22 22:48:26.000000000 +0000 @@ -258,6 +258,15 @@ addi r1,r1,INT_FRAME_SIZE blr + .globl syscall_direct_return +syscall_direct_return: + addi r1,r3,-STACK_FRAME_OVERHEAD + lwz r10,TASK_PTRACE(r2) + andi. r10,r10,PT_TRACESYS + beq+ ret_from_except + bl syscall_trace + b ret_from_except + .globl ret_from_fork ret_from_fork: bl schedule_tail diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/kernel/head.S linux-2.4.23-pre8/arch/ppc/kernel/head.S --- linux-2.4.22/arch/ppc/kernel/head.S 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/kernel/head.S 2003-10-22 22:47:29.000000000 +0000 @@ -137,6 +137,18 @@ mr r28,r6 mr r27,r7 li r24,0 /* cpu # */ + +#ifdef CONFIG_POWER4 +/* + * On the PPC970, we have to turn off real-mode cache inhibit + * early, before we first turn the MMU off. + */ + mfspr r0,SPRN_PVR + srwi r0,r0,16 + cmpwi r0,0x39 + beql ppc970_setup_hid +#endif + /* * early_init() does the early machine identification and does * the necessary low-level setup and clears the BSS @@ -157,11 +169,10 @@ */ bl mmu_off __after_mmu_off: - bl clear_bats - bl flush_tlbs #ifndef CONFIG_POWER4 - /* POWER4 doesn't have BATs */ + bl clear_bats + bl flush_tlbs bl initial_bats #if !defined(CONFIG_APUS) && defined(CONFIG_BOOTX_TEXT) bl setup_disp_bat @@ -170,15 +181,23 @@ /* * Load up the SDR1 and segment register values now * since we don't have the BATs. + * Also make sure we are running in 32-bit mode. */ bl reloc_offset - addis r4,r3,_SDR1@ha /* get the value from _SDR1 */ - lwz r4,_SDR1@l(r4) /* assume hash table below 4GB */ - mtspr SDR1,r4 + addis r14,r3,_SDR1@ha /* get the value from _SDR1 */ + lwz r14,_SDR1@l(r14) /* assume hash table below 4GB */ + mtspr SDR1,r14 slbia - lis r5,0x2000 /* set pseudo-segment reg 12 */ - ori r5,r5,0x0ccc + lis r4,0x2000 /* set pseudo-segment reg 12 */ + ori r5,r4,0x0ccc mtsr 12,r5 + ori r4,r4,0x0888 /* set pseudo-segment reg 8 */ + mtsr 8,r4 /* (for access to serial port) */ + mfmsr r0 + clrldi r0,r0,1 + sync + mtmsr r0 + isync #endif /* CONFIG_POWER4 */ /* @@ -707,12 +726,22 @@ mtcrf 0x80,r3 rfi +#ifndef CONFIG_ALTIVEC +#define AltivecAssistException UnknownException +#endif + STD_EXCEPTION(0x1300, Trap_13, InstructionBreakpoint) STD_EXCEPTION(0x1400, SMI, SMIException) STD_EXCEPTION(0x1500, Trap_15, UnknownException) +#ifdef CONFIG_POWER4 STD_EXCEPTION(0x1600, Trap_16, UnknownException) + STD_EXCEPTION(0x1700, Trap_17, AltivecAssistException) + STD_EXCEPTION(0x1800, Trap_18, TAUException) +#else /* !CONFIG_POWER4 */ + STD_EXCEPTION(0x1600, Trap_16, AltivecAssistException) STD_EXCEPTION(0x1700, Trap_17, TAUException) STD_EXCEPTION(0x1800, Trap_18, UnknownException) +#endif STD_EXCEPTION(0x1900, Trap_19, UnknownException) STD_EXCEPTION(0x1a00, Trap_1a, UnknownException) STD_EXCEPTION(0x1b00, Trap_1b, UnknownException) @@ -828,6 +857,7 @@ bt- 9,power_save_6xx_restore /* Check NAP */ END_FTR_SECTION_IFSET(CPU_FTR_CAN_NAP) b transfer_to_handler_cont + #endif /* CONFIG_6xx */ /* @@ -983,7 +1013,9 @@ /* enable use of AltiVec after return */ oris r23,r23,MSR_VEC@h mfspr r5,SPRG3 /* current task's THREAD (phys) */ + li r4,1 li r20,THREAD_VSCR + stw r4,THREAD_USED_VR(r5) LVX(vr0,r20,r5) MTVSCR(vr0) REST_32VR(0,r20,r5) @@ -1233,7 +1265,6 @@ andc r4,r4,r3 mtspr HID0,r4 sync - bl prom_init b __secondary_start #endif /* CONFIG_GEMINI */ .globl __secondary_start_psurge @@ -1305,6 +1336,7 @@ /* enable MMU and jump to start_secondary */ li r4,MSR_KERNEL + FIX_SRR1(r4,r5) lis r3,start_secondary@h ori r3,r3,start_secondary@l mtspr SRR0,r3 @@ -1319,6 +1351,10 @@ */ _GLOBAL(__setup_cpu_power3) blr +_GLOBAL(__setup_cpu_power4) + blr +_GLOBAL(__setup_cpu_ppc970) + blr _GLOBAL(__setup_cpu_generic) blr @@ -1326,7 +1362,14 @@ _GLOBAL(__save_cpu_setup) blr _GLOBAL(__restore_cpu_setup) +#ifdef CONFIG_POWER4 + /* turn off real-mode cache inhibit on the PPC970 */ + mfspr r0,SPRN_PVR + srwi r0,r0,16 + cmpwi r0,0x39 + beq ppc970_setup_hid blr +#endif #endif /* CONFIG_6xx */ /* @@ -1334,6 +1377,11 @@ * IR=0 and DR=0. */ load_up_mmu: + sync /* Force all PTE updates to finish */ + isync + tlbia /* Clear all TLB entries */ + sync /* wait for tlbia/tlbie to finish */ + TLBSYNC /* ... on all CPUs */ /* Load the SDR1 register (hash table base & size) */ lis r6,_SDR1@ha tophys(r6,r6) @@ -1428,14 +1476,7 @@ SYNC RFI /* Load up the kernel context */ -2: - sync /* Force all PTE updates to finish */ - isync - tlbia /* Clear all TLB entries */ - sync /* wait for tlbia/tlbie to finish */ - TLBSYNC /* ... on all CPUs */ - - bl load_up_mmu +2: bl load_up_mmu #ifdef CONFIG_BDI_SWITCH /* Add helper information for the Abatron bdiGDB debugger. @@ -1648,6 +1689,40 @@ blr #endif /* !defined(CONFIG_APUS) && defined(CONFIG_BOOTX_TEXT) */ + +#else /* CONFIG_POWER4 */ +ppc970_setup_hid: + li r0,0 + sync + mtspr 0x3f4,r0 + isync + sync + mtspr 0x3f6,r0 + isync + mfspr r0,SPRN_HID0 + li r11,5 /* clear DOZE and SLEEP */ + rldimi r0,r11,52,8 /* and set NAP and DPM */ + mtspr SPRN_HID0,r0 + mfspr r0,SPRN_HID0 + mfspr r0,SPRN_HID0 + mfspr r0,SPRN_HID0 + mfspr r0,SPRN_HID0 + mfspr r0,SPRN_HID0 + mfspr r0,SPRN_HID0 + sync + isync + mfspr r0,SPRN_HID1 + li r11,0x1200 /* enable i-fetch cacheability */ + sldi r11,r11,44 /* and prefetch */ + or r0,r0,r11 + mtspr SPRN_HID1,r0 + mtspr SPRN_HID1,r0 + isync + li r0,0 + sync + mtspr 0x137,0 + isync + blr #endif /* CONFIG_POWER4 */ #ifdef CONFIG_8260 diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/kernel/head_44x.S linux-2.4.23-pre8/arch/ppc/kernel/head_44x.S --- linux-2.4.22/arch/ppc/kernel/head_44x.S 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/kernel/head_44x.S 2003-10-22 22:47:29.000000000 +0000 @@ -0,0 +1,1070 @@ +/* + * arch/ppc/kernel/head_44x.S + * + * Kernel execution entry point code. + * + * Matt Porter + * + * Copyright 2002-2003 MontaVista Software, Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "ppc_defs.h" + +/* + * Preprocessor Defines + */ + +#define STND_EXC 0 +#define CRIT_EXC 1 + +/* + * Macros + */ + +#define SET_IVOR(vector_number, vector_label) \ + li r26,vector_label@l; \ + mtspr SPRN_IVOR##vector_number,r26; \ + sync + +/* As with the other PowerPC ports, it is expected that when code + * execution begins here, the following registers contain valid, yet + * optional, information: + * + * r3 - Board info structure pointer (DRAM, frequency, MAC address, etc.) + * r4 - Starting address of the init RAM disk + * r5 - Ending address of the init RAM disk + * r6 - Start of kernel command line string (e.g. "mem=128") + * r7 - End of kernel command line string + * + */ + .text +_GLOBAL(_stext) +_GLOBAL(_start) + /* + * Reserve a word at a fixed location to store the address + * of abatron_pteptrs + */ + nop + +/* + * Save parameters we are passed + */ + mr r31,r3 + mr r30,r4 + mr r29,r5 + mr r28,r6 + mr r27,r7 + li r24,0 /* CPU number */ + +/* + * Set up the initial MMU state + * + * We are still executing code at the virtual address + * mappings set by the firmware for the base of RAM. + * + * We first invalidate all TLB entries but the one + * we are running from. We then load the KERNELBASE + * mappings so we can begin to use kernel addresses + * natively and so the interrupt vector locations are + * permanently pinned (necessary since Book E + * implementations always have translation enabled). + * + * TODO: Use the known TLB entry we are running from to + * determine which physical region we are located + * in. This can be used to determine where in RAM + * (on a shared CPU system) or PCI memory space + * (on a DRAMless system) we are located. + * For now, we assume a perfect world which means + * we are located at the base of DRAM (physical 0). + */ + +/* + * Search TLB for entry that we are currently using. + * Invalidate all entries but the one we are using. + */ + /* Load our current PID->MMUCR TID and MSR IS->MMUCR STS */ + mfspr r3,SPRN_MMUCR /* Get MMUCR */ + lis r4,PPC44x_MMUCR_STS@h + ori r4,r4,PPC44x_MMUCR_TID@l /* Create mask */ + andc r3,r3,r4 /* Clear out TID/STS bits */ + mfspr r4,SPRN_PID /* Get PID */ + or r3,r3,r4 /* Set TID bits */ + mfmsr r5 /* Get MSR */ + andi. r5,r5,MSR_IS@l /* TS=1? */ + beq wmmucr /* If not, leave STS=0 */ + oris r3,r3,PPC44x_MMUCR_STS@h /* Set STS=1 */ +wmmucr: mtspr SPRN_MMUCR,r3 /* Put MMUCR */ + sync + + bl invstr /* Find our address */ +invstr: mflr r5 /* Make it accessible */ + tlbsx r23,0,r5 /* Find entry we are in */ + li r4,0 /* Start at TLB entry 0 */ + li r3,0 /* Set PAGEID inval value */ +1: cmpw r23,r4 /* Is this our entry? */ + beq skpinv /* If so, skip the inval */ + tlbwe r3,r4,PPC44x_TLB_PAGEID /* If not, inval the entry */ +skpinv: addi r4,r4,1 /* Increment */ + cmpwi r4,64 /* Are we done? */ + bne 1b /* If not, repeat */ + isync /* If so, context change */ + +/* + * Configure and load pinned entries into TLB slots 62 and 63. + */ + + lis r3,KERNELBASE@h /* Load the kernel virtual address */ + ori r3,r3,KERNELBASE@l + + /* Kernel is at the base of RAM */ + li r4, 0 /* Load the kernel physical address */ + + /* Load the kernel PID = 0 */ + li r0,0 + mtspr SPRN_PID,r0 + sync + + /* Load the kernel TID = 0 */ + mfspr r5,SPRN_MMUCR + lis r6, PPC44x_MMUCR_TID@h + ori r6,r6,PPC44x_MMUCR_TID@l + andc r5,r5,r6 + mtspr SPRN_MMUCR,r5 + sync + + /* pageid fields */ + clrrwi r3,r3,10 /* Mask off the effective page number */ + ori r3,r3,(PPC44x_TLB_VALID | PPC44x_TLB_PAGESZ(PPC44x_PAGESZ_256M)) + + /* xlat fields */ + clrrwi r4,r4,10 /* Mask off the real page number */ + /* ERPN is 0 for first 4GB page */ + + /* attrib fields */ + /* Added guarded bit to protect against speculative loads/stores */ + li r5,0 + ori r5,r5,(PPC44x_TLB_SW | PPC44x_TLB_SR | PPC44x_TLB_SX | PPC44x_TLB_G) + + li r0,62 /* TLB slot 62 */ + + tlbwe r3,r0,PPC44x_TLB_PAGEID /* Load the pageid fields */ + tlbwe r4,r0,PPC44x_TLB_XLAT /* Load the translation fields */ + tlbwe r5,r0,PPC44x_TLB_ATTRIB /* Load the attrib/access fields */ + + /* Force context change */ + mfmsr r0 + mtspr SRR1, r0 + lis r0,3f@h + ori r0,r0,3f@l + mtspr SRR0,r0 + sync + rfi + + /* If necessary, invalidate original entry we used */ +3: cmpwi r23,62 + beq 4f + li r6,0 + tlbwe r6,r23,PPC44x_TLB_PAGEID + sync + +4: ori r3,r3,PPC44x_TLB_TS /* TS = 1 */ + + li r0,63 /* TLB slot 63 */ + + tlbwe r3,r0,PPC44x_TLB_PAGEID /* Load the pageid fields */ + tlbwe r4,r0,PPC44x_TLB_XLAT /* Load the translation fields */ + tlbwe r5,r0,PPC44x_TLB_ATTRIB /* Load the attrib/access fields */ + +#ifdef CONFIG_SERIAL_TEXT_DEBUG + /* + * Add temporary UART mapping for early debug. This + * mapping must be identical to that used by the early + * bootloader code since the same asm/serial.h parameters + * are used for polled operation. + */ + /* pageid fields */ + lis r3,0xe000 + ori r3,r3,(PPC44x_TLB_VALID | PPC44x_TLB_PAGESZ(PPC44x_PAGESZ_256M)) + + /* xlat fields */ + lis r4,0x4000 /* RPN is 0x40000000 */ + ori r4,r4,0x0001 /* ERPN is 1 for second 4GB page */ + + /* attrib fields */ + li r5,0 + ori r5,r5,(PPC44x_TLB_SW | PPC44x_TLB_SR | PPC44x_TLB_I | PPC44x_TLB_G) + + li r0,60 /* TLB slot 60 */ + + tlbwe r3,r0,PPC44x_TLB_PAGEID /* Load the pageid fields */ + tlbwe r4,r0,PPC44x_TLB_XLAT /* Load the translation fields */ + tlbwe r5,r0,PPC44x_TLB_ATTRIB /* Load the attrib/access fields */ + + ori r3,r3,PPC44x_TLB_TS /* Translation state 1 */ + + li r0,61 /* TLB slot 61 */ + + tlbwe r3,r0,PPC44x_TLB_PAGEID /* Load the pageid fields */ + tlbwe r4,r0,PPC44x_TLB_XLAT /* Load the translation fields */ + tlbwe r5,r0,PPC44x_TLB_ATTRIB /* Load the attrib/access fields */ +#endif /* CONFIG_SERIAL_TEXT_DEBUG */ + + /* Force context change */ + isync + + /* Establish the interrupt vector offsets */ + SET_IVOR(0, CriticalInput); + SET_IVOR(1, MachineCheck); + SET_IVOR(2, DataStorage); + SET_IVOR(3, InstructionStorage); + SET_IVOR(4, ExternalInput); + SET_IVOR(5, Alignment); + SET_IVOR(6, Program); + SET_IVOR(7, FloatingPointUnavailable); + SET_IVOR(8, SystemCall); + SET_IVOR(9, AuxillaryProcessorUnavailable); + SET_IVOR(10, Decrementer); + SET_IVOR(11, FixedIntervalTimer); + SET_IVOR(12, WatchdogTimer); + SET_IVOR(13, DataTLBError); + SET_IVOR(14, InstructionTLBError); + SET_IVOR(15, Debug); + + /* Establish the interrupt vector base */ + lis r4,interrupt_base@h /* IVPR only uses the high 16-bits */ + mtspr SPRN_IVPR,r4 + + /* + * This is where the main kernel code starts. + */ + + /* ptr to current */ + lis r2,init_task_union@h + ori r2,r2,init_task_union@l + + /* ptr to current thread */ + addi r4,r2,THREAD /* init task's THREAD */ + mtspr SPRG3,r4 + li r3,0 + mtspr SPRG2,r3 /* 0 => r1 has kernel sp */ + + /* stack */ + addi r1,r2,TASK_UNION_SIZE + li r0,0 + stwu r0,-STACK_FRAME_OVERHEAD(r1) + + bl early_init + +/* + * Decide what sort of machine this is and initialize the MMU. + */ + mr r3,r31 + mr r4,r30 + mr r5,r29 + mr r6,r28 + mr r7,r27 + bl machine_init + bl MMU_init + + /* Setup PTE pointers for the Abatron bdiGDB */ + lis r6, swapper_pg_dir@h + ori r6, r6, swapper_pg_dir@l + lis r5, abatron_pteptrs@h + ori r5, r5, abatron_pteptrs@l + lis r4, KERNELBASE@h + ori r4, r4, KERNELBASE@l + stw r5, 0(r4) /* Save abatron_pteptrs at a fixed location */ + stw r6, 0(r5) + + /* Let's move on */ + lis r4,start_kernel@h + ori r4,r4,start_kernel@l + lis r3,MSR_KERNEL@h + ori r3,r3,MSR_KERNEL@l + mtspr SRR0,r4 + mtspr SRR1,r3 + rfi /* change context and jump to start_kernel */ + +/* + * Interrupt vector entry code + * + * The Book E MMUs are always on so we don't need to handle + * interrupts in real mode as with previous PPC processors. In + * this case we handle interrupts in the kernel virtual address + * space. + * + * Interrupt vectors are dynamically placed relative to the + * interrupt prefix as determined by the address of interrupt_base. + * The interrupt vectors offsets are programmed using the labels + * for each interrupt vector entry. + * + * Interrupt vectors must be aligned on a 16 byte boundary. + * We align on a 32 byte cache line boundary for good measure. + */ + +#define COMMON_PROLOG \ +0: mtspr SPRN_SPRG0,r20; /* We need r20, move it to SPRG0 */\ + mtspr SPRN_SPRG1,r21; /* We need r21, move it to SPRG1 */\ + mfcr r20; /* We need the CR, move it to r20 */\ + mfspr r21,SPRN_SPRG2; /* Exception stack to use */\ + cmpwi cr0,r21,0; /* From user mode or RTAS? */\ + bne 1f; /* Not RTAS, branch */\ + mr r21, r1; /* Move vka in r1 to r21 */\ + subi r21,r21,INT_FRAME_SIZE; /* Allocate an exception frame */\ +1: stw r20,_CCR(r21); /* Save CR on the stack */\ + stw r22,GPR22(r21); /* Save r22 on the stack */\ + stw r23,GPR23(r21); /* r23 Save on the stack */\ + mfspr r20,SPRN_SPRG0; /* Get r20 back out of SPRG0 */\ + stw r20,GPR20(r21); /* Save r20 on the stack */\ + mfspr r22,SPRN_SPRG1; /* Get r21 back out of SPRG0 */\ + stw r22,GPR21(r21); /* Save r21 on the stack */\ + mflr r20; \ + stw r20,_LINK(r21); /* Save LR on the stack */\ + mfctr r22; \ + stw r22,_CTR(r21); /* Save CTR on the stack */\ + mfspr r20,XER; \ + stw r20,_XER(r21); /* Save XER on the stack */ + +#define COMMON_EPILOG \ + stw r0,GPR0(r21); /* Save r0 on the stack */\ + stw r1,GPR1(r21); /* Save r1 on the stack */\ + stw r2,GPR2(r21); /* Save r2 on the stack */\ + stw r1,0(r21); \ + mr r1,r21; /* Set-up new kernel stack pointer */\ + SAVE_4GPRS(3, r21); /* Save r3 through r6 on the stack */\ + SAVE_GPR(7, r21); /* Save r7 on the stack */ + +#define STND_EXCEPTION_PROLOG \ + COMMON_PROLOG; \ + mfspr r22,SPRN_SRR0; /* Faulting instruction address */\ + lis r20,MSR_WE@h; \ + mfspr r23,SPRN_SRR1; /* MSR at the time of fault */\ + andc r23,r23,r20; /* disable processor wait state */\ + COMMON_EPILOG; + +#define CRIT_EXCEPTION_PROLOG \ + COMMON_PROLOG; \ + mfspr r22,SPRN_CSRR0; /* Faulting instruction address */\ + lis r20,MSR_WE@h; \ + mfspr r23,SPRN_CSRR1; /* MSR at the time of fault */\ + andc r23,r23,r20; /* disable processor wait state */\ + COMMON_EPILOG; + +#define START_EXCEPTION(label) \ + .align 5; \ +label: + +#define FINISH_EXCEPTION(n, func) \ + bl transfer_to_handler; \ + .long func; \ + .long ret_from_except; \ + .long n + +#define STND_EXCEPTION(n, label, func) \ + START_EXCEPTION(label) \ + STND_EXCEPTION_PROLOG; \ + addi r3,r1,STACK_FRAME_OVERHEAD; \ + li r7,STND_EXC; \ + li r20,MSR_KERNEL; \ + FINISH_EXCEPTION(n, func) + +#define CRIT_EXCEPTION(n, label, func) \ + START_EXCEPTION(label) \ + CRIT_EXCEPTION_PROLOG; \ + addi r3,r1,STACK_FRAME_OVERHEAD; \ + li r7,CRIT_EXC; \ + li r20,MSR_KERNEL; \ + FINISH_EXCEPTION(n, func) + +interrupt_base: + + /* Critical Input Interrupt */ + CRIT_EXCEPTION(0x100, CriticalInput,UnknownException); + + /* Machine Check Interrupt */ + /* TODO: provide bus error register status */ + CRIT_EXCEPTION(0x200, MachineCheck,MachineCheckException); + + /* Data Storage Interrupt */ + START_EXCEPTION(DataStorage) + mtspr SPRG0, r20 /* Save some working registers */ + mtspr SPRG1, r21 + mtspr SPRG4W, r22 + mtspr SPRG5W, r23 + mtspr SPRG6W, r24 + mfcr r21 + mtspr SPRG7W, r21 + + /* + * Check if it was a store fault, if not then bail + * because a user tried to access a kernel or + * read-protected page. Otherwise, get the + * offending address and handle it. + */ + mfspr r20, SPRN_ESR + andis. r20, r20, ESR_ST@h + beq 2f + + mfspr r20, SPRN_DEAR /* Get faulting address */ + + /* If we are faulting a kernel address, we have to use the + * kernel page tables. + */ + andis. r21, r20, 0x8000 + beq 3f + lis r21, swapper_pg_dir@h + ori r21, r21, swapper_pg_dir@l + + mfspr r22,SPRN_MMUCR /* Set TID to 0 */ + li r23,PPC44x_MMUCR_TID@l + andc r22,r22,r23 + mtspr SPRN_MMUCR,r22 + + b 4f + + /* Get the PGD for the current thread */ +3: + mfspr r21,SPRG3 + lwz r21,PGDIR(r21) + + /* Load MMUCR with our PID and STS= */ + mfspr r22,SPRN_MMUCR /* Get MMUCR */ + lis r23,PPC44x_MMUCR_STS@h + ori r23,r23,PPC44x_MMUCR_TID@l /* Create mask */ + andc r22,r22,r23 /* Clear out TID/STS bits */ + mfspr r23,SPRN_PID /* Get PID */ + or r22,r22,r23 /* Set TID bits */ + mfspr r24,SPRN_SRR1 /* Get SRR1 */ + andi. r24,r24,MSR_IS@l /* TS=1? */ + beq 4f /* If not, leave STS=0 */ + oris r22,r22,PPC44x_MMUCR_STS@h /* Set STS=1 */ + mtspr SPRN_MMUCR,r22 +4: + rlwinm r22, r20, 13, 19, 29 /* Compute pgdir/pmd offset */ + lwzx r21, r22, r21 /* Get pgd/pmd entry */ + rlwinm. r22, r21, 0, 0, 20 /* Extract pt base address */ + beq 2f /* Bail if no table */ + + rlwimi r22, r20, 23, 20, 28 /* Compute pte address */ + lwz r21, 4(r22) /* Get pte entry */ + + andi. r23, r21, _PAGE_RW /* Is it writeable? */ + beq 2f /* Bail if not */ + + /* Update 'changed'. + */ + ori r21, r21, _PAGE_DIRTY|_PAGE_ACCESSED|_PAGE_HWWRITE + stw r21, 4(r22) /* Update Linux page table */ + + /* FIXME: Staticly setting some permissions */ + li r23, 0x003f /* Set UX,UW,UR,SX,SW,SR */ + andi. r21,r21,0xffff /* Clear MS 16 bits */ + /* FIXME: Force attributes */ + ori r21,r21, 0x0100 /* Set G */ + /* FIXME: Already set in PTE */ + rlwimi r21,r23,0,26,31 /* Insert static perms */ + + lis r23,0xffff + ori r23,r23,0x0fff /* Set U0-U3 mask */ + and r21,r21,r23 /* Clear U0-U3 */ + + /* find the TLB index that caused the fault. It has to be here. */ + tlbsx r24, 0, r20 + + tlbwe r21, r24, PPC44x_TLB_ATTRIB /* Write ATTRIB */ + + /* Done...restore registers and get out of here. + */ + mfspr r21, SPRG7R + mtcr r21 + mfspr r24, SPRG6R + mfspr r23, SPRG5R + mfspr r22, SPRG4R + + mfspr r21, SPRG1 + mfspr r20, SPRG0 + rfi /* Force context change */ + +2: + /* + * The bailout. Restore registers to pre-exception conditions + * and call the heavyweights to help us out. + */ + mfspr r21, SPRG7R + mtcr r21 + mfspr r24, SPRG6R + mfspr r23, SPRG5R + mfspr r22, SPRG4R + + mfspr r21, SPRG1 + mfspr r20, SPRG0 + b data_access + + /* Instruction Storage Interrupt */ + START_EXCEPTION(InstructionStorage) + STND_EXCEPTION_PROLOG + mfspr r5,SPRN_ESR /* Grab the ESR, save it */ + stw r5,_ESR(r21) + mr r4,r22 /* Pass SRR0 as arg2 */ + li r5,0 /* Pass zero as arg3 */ + addi r3,r1,STACK_FRAME_OVERHEAD + li r7,STND_EXC + li r20,MSR_KERNEL + rlwimi r20,r23,0,16,16 /* Copy EE bit from the saved MSR */ + FINISH_EXCEPTION(0x400, do_page_fault)/* do_page_fault(regs, SRR0, SRR1) */ + + /* External Input Interrupt */ + START_EXCEPTION(ExternalInput) + STND_EXCEPTION_PROLOG + addi r3,r1,STACK_FRAME_OVERHEAD + li r7,STND_EXC + li r20,MSR_KERNEL + li r4,0 + bl transfer_to_handler +_GLOBAL(do_IRQ_intercept) + .long do_IRQ + .long ret_from_intercept + .long 0x500 + + /* Alignment Interrupt */ + START_EXCEPTION(Alignment) + STND_EXCEPTION_PROLOG + mfspr r4,SPRN_DEAR /* Grab the DEAR and save it */ + stw r4,_DEAR(r21) + addi r3,r1,STACK_FRAME_OVERHEAD + li r7,STND_EXC + li r20,MSR_KERNEL + rlwimi r20,r23,0,16,16 /* Copy EE bit from the saved MSR */ + FINISH_EXCEPTION(0x600, AlignmentException) + + /* Program Interrupt */ + START_EXCEPTION(Program) + STND_EXCEPTION_PROLOG + mfspr r4,SPRN_ESR /* Grab the ESR, save it */ + stw r4,_ESR(r21) + addi r3,r1,STACK_FRAME_OVERHEAD + li r7,STND_EXC + li r20,MSR_KERNEL + rlwimi r20,r23,0,16,16 /* Copy EE bit from the saved MSR */ + FINISH_EXCEPTION(0x700, ProgramCheckException) + + /* Floating Point Unavailable Interrupt */ + STND_EXCEPTION(0x2010, FloatingPointUnavailable,UnknownException); + + /* System Call Interrupt */ + START_EXCEPTION(SystemCall) + STND_EXCEPTION_PROLOG + stw r3,ORIG_GPR3(r21) + li r7,STND_EXC + li r20,MSR_KERNEL + rlwimi r20,r23,0,16,16 /* Copy EE bit from the saved MSR */ + FINISH_EXCEPTION(0xc00, DoSyscall) + + /* Auxillary Processor Unavailable */ + STND_EXCEPTION(0x2020, AuxillaryProcessorUnavailable,UnknownException); + + /* Decrementer Interrupt */ + START_EXCEPTION(Decrementer) + STND_EXCEPTION_PROLOG + lis r0,TSR_DIS@h /* Setup the DEC interrupt mask */ + mtspr SPRN_TSR,r0 /* Clear the DEC interrupt */ + addi r3,r1,STACK_FRAME_OVERHEAD + li r7,STND_EXC + li r20,MSR_KERNEL + bl transfer_to_handler +_GLOBAL(timer_interrupt_intercept) + .long timer_interrupt + .long ret_from_intercept + .long 0x1000 + + /* Fixed Internal Timer Interrupt */ + /* TODO: Add FIT support */ + STND_EXCEPTION(0x1010, FixedIntervalTimer,UnknownException); + + /* Watchdog Timer Interrupt */ + /* TODO: Add watchdog support */ + CRIT_EXCEPTION(0x1020, WatchdogTimer,UnknownException); + + /* Data TLB Error Interrupt */ + START_EXCEPTION(DataTLBError) + mtspr SPRG0, r20 /* Save some working registers */ + mtspr SPRG1, r21 + mtspr SPRG4W, r22 + mtspr SPRG5W, r23 + mtspr SPRG6W, r24 + mfcr r21 + mtspr SPRG7W, r21 + mfspr r20, SPRN_DEAR /* Get faulting address */ + + /* If we are faulting a kernel address, we have to use the + * kernel page tables. + */ + andis. r21, r20, 0x8000 + beq 3f + lis r21, swapper_pg_dir@h + ori r21, r21, swapper_pg_dir@l + + mfspr r22,SPRN_MMUCR /* Set TID to 0 */ + li r23,PPC44x_MMUCR_TID@l + andc r22,r22,r23 + mtspr SPRN_MMUCR,r22 + + b 4f + + /* Get the PGD for the current thread */ +3: + mfspr r21,SPRG3 + lwz r21,PGDIR(r21) + + /* Load PID into MMUCR TID */ + li r23,PPC44x_MMUCR_TID@l /* Create mask */ + andc r22,r22,r23 /* Clear out TID/STS bits */ + mfspr r23,SPRN_PID /* Get PID */ + or r22,r22,r23 + mtspr SPRN_MMUCR,r22 +4: + rlwinm r22, r20, 13, 19, 29 /* Compute pgdir/pmd offset */ + lwzx r21, r22, r21 /* Get pgd/pmd entry */ + rlwinm. r22, r21, 0, 0, 20 /* Extract pt base address */ + beq 2f /* Bail if no table */ + + rlwimi r22, r20, 23, 20, 28 /* Compute pte address */ + lwz r21, 4(r22) /* Get pte entry */ + andi. r23, r21, _PAGE_PRESENT /* Is the page present? */ + beq 2f /* Bail if not present */ + + ori r21, r21, _PAGE_ACCESSED + stw r21, 4(r22) + + /* Jump to common tlb load */ + b finish_tlb_load + +2: + /* The bailout. Restore registers to pre-exception conditions + * and call the heavyweights to help us out. + */ + mfspr r21, SPRG7R + mtcr r21 + mfspr r24, SPRG6R + mfspr r23, SPRG5R + mfspr r22, SPRG4R + mfspr r21, SPRG1 + mfspr r20, SPRG0 + b data_access + + /* Instruction TLB Error Interrupt */ + /* + * Nearly the same as above, except we get our + * information from different registers and bailout + * to a different point. + */ + START_EXCEPTION(InstructionTLBError) + mtspr SPRG0, r20 /* Save some working registers */ + mtspr SPRG1, r21 + mtspr SPRG4W, r22 + mtspr SPRG5W, r23 + mtspr SPRG6W, r24 + mfcr r21 + mtspr SPRG7W, r21 + mfspr r20, SRR0 /* Get faulting address */ + + /* If we are faulting a kernel address, we have to use the + * kernel page tables. + */ + andis. r21, r20, 0x8000 + beq 3f + lis r21, swapper_pg_dir@h + ori r21, r21, swapper_pg_dir@l + + mfspr r22,SPRN_MMUCR /* Set TID to 0 */ + li r23,PPC44x_MMUCR_TID@l + andc r22,r22,r23 + mtspr SPRN_MMUCR,r22 + + b 4f + + /* Get the PGD for the current thread */ +3: + mfspr r21,SPRG3 + lwz r21,PGDIR(r21) + + /* Load PID into MMUCR TID */ + li r23,PPC44x_MMUCR_TID@l /* Create mask */ + andc r22,r23,r23 /* Clear out TID/STS bits */ + mfspr r23,SPRN_PID /* Get PID */ + or r22,r22,r23 + mtspr SPRN_MMUCR,r22 + +4: + rlwinm r22, r20, 13, 19, 29 /* Compute pgdir/pmd offset */ + lwzx r21, r22, r21 /* Get pgd/pmd entry */ + rlwinm. r22, r21, 0, 0, 20 /* Extract pt base address */ + beq 2f /* Bail if no table */ + + rlwimi r22, r20, 23, 20, 28 /* Compute pte address */ + lwz r21, 4(r22) /* Get pte entry */ + andi. r23, r21, _PAGE_PRESENT /* Is the page present? */ + beq 2f /* Bail if not present */ + + ori r21, r21, _PAGE_ACCESSED + stw r21, 4(r22) + + /* Jump to common TLB load point */ + b finish_tlb_load + +2: + /* The bailout. Restore registers to pre-exception conditions + * and call the heavyweights to help us out. + */ + mfspr r21, SPRG7R + mtcr r21 + mfspr r24, SPRG6R + mfspr r23, SPRG5R + mfspr r22, SPRG4R + mfspr r21, SPRG1 + mfspr r20, SPRG0 + b InstructionStorage + +/* Check for a single step debug exception while in an exception + * handler before state has been saved. This is to catch the case + * where an instruction that we are trying to single step causes + * an exception (eg ITLB/DTLB miss) and thus the first instruction of + * the exception handler generates a single step debug exception. + * + * If we get a debug trap on the first instruction of an exception handler, + * we reset the MSR_DE in the _exception handlers_ MSR (the debug trap is + * a critical exception, so we are using SPRN_CSRR1 to manipulate the MSR). + * The exception handler was handling a non-critical interrupt, so it will + * save (and later restore) the MSR via SPRN_SRR1, which will still have + * the MSR_DE bit set. + */ + /* Debug Interrupt */ + START_EXCEPTION(Debug) + /* This first instruction was already executed by the exception + * handler and must be the first instruction of every exception + * handler. + */ + mtspr SPRN_SPRG0,r20 /* Save some working registers... */ + mtspr SPRN_SPRG1,r21 + mtspr SPRN_SPRG4W,r22 + mfcr r20 /* ..and the cr because we change it */ + + mfspr r21,SPRN_CSRR1 /* MSR at the time of fault */ + andi. r21,r21,MSR_PR + bne+ 2f /* trapped from problem state */ + + mfspr r21,SPRN_CSRR0 /* Faulting instruction address */ + lis r22, KERNELBASE@h + ori r22, r22, KERNELBASE@l + cmplw r21,r22 + blt+ 2f /* addr below exception vectors */ + + lis r22, Debug@h + ori r22, r22, Debug@l + cmplw r21,r22 + bgt+ 2f /* addr above TLB exception vectors */ + + lis r21,DBSR_IC@h /* Remove the trap status */ + mtspr SPRN_DBSR,r21 + + mfspr r21,SPRN_CSRR1 + rlwinm r21,r21,0,23,21 /* clear MSR_DE */ + mtspr SPRN_CSRR1, r21 /* restore MSR at rcfi without DE */ + + mtcrf 0xff,r20 /* restore registers */ + mfspr r22,SPRN_SPRG4R + mfspr r21,SPRN_SPRG1 + mfspr r20,SPRN_SPRG0 + + sync + rfci /* return to the exception handler */ + b . /* prevent prefetch past rfci */ + +2: + mtcrf 0xff,r20 /* restore registers */ + mfspr r22,SPRN_SPRG4R + mfspr r21,SPRN_SPRG1 + mfspr r20,SPRN_SPRG0 + + CRIT_EXCEPTION_PROLOG + addi r3,r1,STACK_FRAME_OVERHEAD + li r7,CRIT_EXC; + li r20,MSR_KERNEL + FINISH_EXCEPTION(0x2000, DebugException) + +/* + * Local functions + */ + + /* + * Data TLB exceptions will bail out to this point + * if they can't resolve the lightweight TLB fault. + */ +data_access: + STND_EXCEPTION_PROLOG + mfspr r5,SPRN_ESR /* Grab the ESR, save it, pass arg3 */ + stw r5,_ESR(r21) + mfspr r4,SPRN_DEAR /* Grab the DEAR, save it, pass arg2 */ + stw r4,_DEAR(r21) + addi r3,r1,STACK_FRAME_OVERHEAD + li r7,STND_EXC + li r20,MSR_KERNEL + rlwimi r20,r23,0,16,16 /* Copy EE bit from the saved MSR */ + FINISH_EXCEPTION(0x800, do_page_fault) /* do_page_fault(regs, ESR, DEAR) */ + +/* + * Both the instruction and data TLB miss get to this + * point to load the TLB. + * r20 - EA of fault + * r21 - available to use + * r22 - Pointer to the 64-bit PTE + * r23 - available to use + * r24 - available to use + * MMUCR - loaded with proper value when we get here + * Upon exit, we reload everything and RFI. + */ +finish_tlb_load: + /* + * We set execute, because we don't have the granularity to + * properly set this at the page level (Linux problem). + * If shared is set, we cause a zero PID->TID load. + * Many of these bits are software only. Bits we don't set + * here we (properly should) assume have the appropriate value. + */ + + /* Load the next available TLB index */ + lis r23, tlb_44x_index@h + ori r23, r23, tlb_44x_index@l + lwz r24, 0(r23) + /* Load the TLB high watermark */ + lis r23, tlb_44x_hwater@h + ori r23, r23, tlb_44x_hwater@l + lwz r21, 0(r23) + + + /* Increment, rollover, and store TLB index */ + addi r24, r24, 1 + cmpw 0, r24, r21 /* reserve entries 62-63 for kernel */ + ble 7f + li r24, 0 +7: + /* Load the next available TLB index */ + lis r23, tlb_44x_index@h + ori r23, r23, tlb_44x_index@l + stw r24, 0(r23) + +6: + lwz r23, 0(r22) /* Get MS word of PTE */ + lwz r21, 4(r22) /* Get LS word of PTE */ + rlwimi r23, r21, 0, 0 , 19 /* Insert RPN */ + tlbwe r23, r24, PPC44x_TLB_XLAT /* Write XLAT */ + + /* + * Create PAGEID. This is the faulting address plus + * a set of static bits. The static bits are page + * size and valid. Bits 20 and 21 should be zero + * for a page size of 4KB. + */ + li r22, 0x0210 /* Set size and valid */ + mfspr r23, SPRN_SRR1 /* Get SRR1 */ + andi. r23, r23, MSR_IS@l + beq 7f + ori r22, r22, PPC44x_TLB_TS@l /* Set TS=1 */ +7: rlwimi r20, r22, 0, 20, 31 /* Insert statics */ + tlbwe r20, r24, PPC44x_TLB_PAGEID /* Write PAGEID */ + + /* FIXME: Staticly setting some permissions */ + li r23, 0x002d /* Set UX,UR,SX,SR */ + andi. r21, r21, 0xffff /* Clear MS 16 bits */ + andi. r22, r21, 0x0002 /* _PAGE_HWWRITE? */ + beq 8f + ori r23, r23, 0x0002 /* Set SW */ + /* FIXME: Force attributes */ +8: ori r21, r21, 0x0100 /* Set G */ + /* FIXME: Already set in PTE */ + rlwimi r21, r23, 0, 26, 31 /* Insert static perms */ + + lis r23,0xffff + ori r23,r23,0x0fff /* Set U0-U3 mask */ + and r21,r21,r23 /* Clear U0-U3 */ + tlbwe r21, r24, PPC44x_TLB_ATTRIB /* Write ATTRIB */ + + /* Done...restore registers and get out of here. + */ + mfspr r21, SPRG7R + mtcr r21 + mfspr r24, SPRG6R + mfspr r23, SPRG5R + mfspr r22, SPRG4R + mfspr r21, SPRG1 + mfspr r20, SPRG0 + rfi /* Force context change */ + +/* + * Global functions + */ + +/* + * extern void giveup_altivec(struct task_struct *prev) + * + * The 44x core does not have an AltiVec unit. + */ +_GLOBAL(giveup_altivec) + blr + +/* + * extern void giveup_fpu(struct task_struct *prev) + * + * The 44x core does not have an FPU. + */ +_GLOBAL(giveup_fpu) + blr + +/* + * extern void abort(void) + * + * At present, this routine just applies a system reset. + */ +_GLOBAL(abort) + mfspr r13,SPRN_DBCR0 + oris r13,r13,DBCR_RST(DBCR_RST_SYSTEM)@h + mtspr SPRN_DBCR0,r13 + +_GLOBAL(set_context) + +#ifdef CONFIG_BDI_SWITCH + /* Context switch the PTE pointer for the Abatron BDI2000. + * The PGDIR is the second parameter. + */ + lis r5, abatron_pteptrs@h + ori r5, r5, abatron_pteptrs@l + stw r4, 0x4(r5) +#endif + mtspr SPRN_PID,r3 + isync /* Force context change */ + blr + +/* + * This code finishes saving the registers to the exception frame + * and jumps to the appropriate handler for the exception, turning + * on address translation. + */ +_GLOBAL(transfer_to_handler) + stw r22,_NIP(r21) /* Save the faulting IP on the stack */ + stw r23,_MSR(r21) /* Save the exception MSR on stack */ + SAVE_4GPRS(8, r21) /* Save r8 through r11 on the stack */ + SAVE_8GPRS(12, r21) /* Save r12 through r19 on the stack */ + SAVE_8GPRS(24, r21) /* Save r24 through r31 on the stack */ + andi. r23,r23,MSR_PR /* Is this from user space? */ + mfspr r23,SPRN_SPRG3 /* If from user, fix up THREAD.regs */ + beq 2f /* No, it is from the kernel; branch. */ + mfspr r24,SPRN_DBCR0 + stw r24,THREAD_DBCR0(r23) /* Save Debug Control in thread_struct */ + addi r24,r1,STACK_FRAME_OVERHEAD + stw r24,PT_REGS(r23) +2: addi r2,r23,-THREAD /* Set r2 to current thread */ + mflr r23 + lwz r24,8(r23) /* Emulate classic PPC vectors */ + stw r24,TRAP(r21) + li r22,RESULT + /* No need to put an erratum #77 workaround here + because interrupts are currently disabled */ + stwcx. r22,r22,r21 /* Clear the reservation */ + li r22,0 + stw r22,RESULT(r21) + mtspr SPRN_SPRG2,r22 /* r1 is now the kernel stack pointer */ + addi r24,r2,TASK_STRUCT_SIZE /* Check for kernel stack overflow */ + cmplw cr0,r1,r2 + cmplw cr1,r1,r24 + crand cr1,cr1,cr4 + bgt- stack_ovf /* If r2 < r1 < r2 + TASK_STRUCT_SIZE */ + lwz r24,0(r23) /* Virtual address of the handler */ + lwz r23,4(r23) /* Handler return pointer */ + cmpwi cr0,r7,STND_EXC /* What type of exception is this? */ + bne 3f /* It is a critical exception... */ + + /* Standard exception jump path + */ + + /* We have to recover r7 from the register save stack. + * It was used to indicate standard/critical exception. In + * the case of a standard exception that is the system call + * trap, it may have originally contained one of the syscall + * parameters and we have to get it back now. + */ + lwz r7,GPR7(r21) + mtspr SPRN_SRR0,r24 /* Set up the instruction pointer */ + mtspr SPRN_SRR1,r20 /* Set up the machine state register */ + mtlr r23 /* Set up the return pointer */ + SYNC + /* We shouldn't need a 405 erratum #77 workaround here, because we're not + * actually returning to the interrupted instruction yet. */ + rfi + + /* Critical exception jump path + */ + +3: mtspr SPRN_CSRR0,r24 /* Set up the instruction pointer */ + mtspr SPRN_CSRR1,r20 /* Set up the machine state register */ + mtlr r23 /* Set up the return pointer */ + SYNC + rfci + +/* On kernel stack overlow, load up an initial stack pointer and call + * StackOverflow(regs), which should NOT return. + */ + +stack_ovf: + addi r3,r1,STACK_FRAME_OVERHEAD + lis r1,init_task_union@ha + addi r1,r1,init_task_union@l + addi r1,r1,TASK_UNION_SIZE - STACK_FRAME_OVERHEAD + lis r24,StackOverflow@ha + addi r24,r24,StackOverflow@l + li r20,MSR_KERNEL + mtspr SPRN_SRR0,r24 + mtspr SPRN_SRR1,r20 + SYNC + rfi + +/* + * We put a few things here that have to be page-aligned. This stuff + * goes at the beginning of the data segment, which is page-aligned. + */ + .data +_GLOBAL(sdata) +_GLOBAL(empty_zero_page) + .space 4096 + +/* + * To support >32-bit physical addresses, we use an 8KB pgdir. + */ +_GLOBAL(swapper_pg_dir) + .space 8192 + +/* + * This space gets a copy of optional info passed to us by the bootstrap + * which is used to pass parameters into the kernel like root=/dev/sda1, etc. + */ +_GLOBAL(cmd_line) + .space 512 + +/* + * Room for two PTE pointers, usually the kernel and current user pointers + * to their respective root page table. + */ +abatron_pteptrs: + .space 8 diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/kernel/head_4xx.S linux-2.4.23-pre8/arch/ppc/kernel/head_4xx.S --- linux-2.4.22/arch/ppc/kernel/head_4xx.S 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/kernel/head_4xx.S 2003-10-22 22:48:42.000000000 +0000 @@ -304,6 +304,7 @@ */ li r22, 0x0ce2 andc r21, r21, r22 /* Make sure 20, 21 are zero */ + ori r21, r21, _PAGE_HWEXEC /* make it executable */ /* find the TLB index that caused the fault. It has to be here. */ @@ -782,6 +783,7 @@ stw r23, tlb_4xx_index@l(0) 6: + ori r21, r21, _PAGE_HWEXEC /* make it executable */ tlbwe r21, r23, TLB_DATA /* Load TLB LO */ /* Create EPN. This is the faulting address plus a static diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/kernel/head_8xx.S linux-2.4.23-pre8/arch/ppc/kernel/head_8xx.S --- linux-2.4.22/arch/ppc/kernel/head_8xx.S 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/kernel/head_8xx.S 2003-10-22 22:48:53.000000000 +0000 @@ -21,9 +21,9 @@ * */ +#include #include #include -#include #include #include #include @@ -817,16 +817,31 @@ * kernel initialization. This maps the first 8 MBytes of memory 1:1 * virtual to physical. Also, set the cache mode since that is defined * by TLB entries and perform any additional mapping (like of the IMMR). + * If configured to pin some TLBs, we pin the first 8 Mbytes of kernel, + * 24 Mbytes of data, and the 8M IMMR space. Anything not covered by + * these mappings is mapped by page tables. */ initial_mmu: tlbia /* Invalidate all TLB entries */ +#ifdef CONFIG_PIN_TLB + lis r8, MI_RSV4I@h + ori r8, r8, 0x1c00 +#else li r8, 0 - mtspr MI_CTR, r8 /* Set instruction control to zero */ - lis r8, MD_RESETVAL@h +#endif + mtspr MI_CTR, r8 /* Set instruction MMU control */ + +#ifdef CONFIG_PIN_TLB + lis r10, (MD_RSV4I | MD_RESETVAL)@h + ori r10, r10, 0x1c00 + mr r8, r10 +#else + lis r10, MD_RESETVAL@h +#endif #ifndef CONFIG_8xx_COPYBACK - oris r8, r8, MD_WTDEF@h + oris r10, r10, MD_WTDEF@h #endif - mtspr MD_CTR, r8 /* Set data TLB control */ + mtspr MD_CTR, r10 /* Set data TLB control */ /* Now map the lower 8 Meg into the TLBs. For this quick hack, * we can load the instruction and data TLB registers with the @@ -850,6 +865,10 @@ /* Map another 8 MByte at the IMMR to get the processor * internal registers (among other things). */ +#ifdef CONFIG_PIN_TLB + addi r10, r10, 0x0100 + mtspr MD_CTR, r10 +#endif mfspr r9, 638 /* Get current IMMR */ andis. r9, r9, 0xff80 /* Get 8Mbyte boundary */ @@ -863,6 +882,30 @@ ori r8, r8, MI_BOOTINIT|0x2 /* Inhibit cache -- Cort */ mtspr MD_RPN, r8 +#ifdef CONFIG_PIN_TLB + /* Map two more 8M kernel data pages. + */ + addi r10, r10, 0x0100 + mtspr MD_CTR, r10 + + lis r8, KERNELBASE@h /* Create vaddr for TLB */ + addis r8, r8, 0x0080 /* Add 8M */ + ori r8, r8, MI_EVALID /* Mark it valid */ + mtspr MD_EPN, r8 + li r9, MI_PS8MEG /* Set 8M byte page */ + ori r9, r9, MI_SVALID /* Make it valid */ + mtspr MD_TWC, r9 + li r11, MI_BOOTINIT /* Create RPN for address 0 */ + addis r11, r11, 0x0080 /* Add 8M */ + mtspr MD_RPN, r8 + + addis r8, r8, 0x0080 /* Add 8M */ + mtspr MD_EPN, r8 + mtspr MD_TWC, r9 + addis r11, r11, 0x0080 /* Add 8M */ + mtspr MD_RPN, r8 +#endif + /* Since the cache is enabled according to the information we * just loaded into the TLB, invalidate and enable the caches here. * We should probably check/set other modes....later. diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/kernel/ibm440gp_common.c linux-2.4.23-pre8/arch/ppc/kernel/ibm440gp_common.c --- linux-2.4.22/arch/ppc/kernel/ibm440gp_common.c 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/kernel/ibm440gp_common.c 2003-10-22 22:48:40.000000000 +0000 @@ -0,0 +1,78 @@ +/* + * arch/ppc/syslib/ibm440gp_common.c + * + * PPC440GP system library + * + * Matt Porter + * Copyright 2002-2003 MontaVista Software Inc. + * + * Eugene Surovegin or + * Copyright (c) 2003 Zultys Technologies + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + */ +#include +#include +#include +#include +#include +#include + +/* + * Calculate 440GP clocks + */ +void __init ibm440gp_get_clocks(struct ibm440gp_clocks* p, unsigned int sys_clk, + unsigned int ser_clk) +{ + u32 cpc0_sys0 = mfdcr(DCRN_CPC0_SYS0); + u32 cpc0_cr0 = mfdcr(DCRN_CPC0_CR0); + u32 opdv, epdv; + + if (cpc0_sys0 & 0x2){ + /* Bypass system PLL */ + p->cpu = p->plb = sys_clk; + } + else { + u32 fbdv, fwdva, fwdvb, m, vco; + + fbdv = (cpc0_sys0 >> 18) & 0x0f; + if (!fbdv) + fbdv = 16; + + fwdva = 8 - ((cpc0_sys0 >> 15) & 0x7); + fwdvb = 8 - ((cpc0_sys0 >> 12) & 0x7); + + /* Feedback path */ + if (cpc0_sys0 & 0x00000080){ + /* PerClk */ + m = fwdvb * opdv * epdv; + } + else { + /* CPU clock */ + m = fbdv * fwdva; + } + vco = sys_clk * m; + p->cpu = vco / fwdva; + p->plb = vco / fwdvb; + } + + opdv = ((cpc0_sys0 >> 10) & 0x3) + 1; + epdv = ((cpc0_sys0 >> 8) & 0x3) + 1; + + p->opb = p->plb / opdv; + p->ebc = p->opb / epdv; + + if (cpc0_cr0 & 0x00400000){ + /* External UART clock */ + p->uart = ser_clk; + } + else { + /* Internal UART clock */ + u32 uart_div = ((cpc0_cr0 >> 16) & 0x1f) + 1; + p->uart = p->plb / uart_div; + } +} diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/kernel/ibm440gp_common.h linux-2.4.23-pre8/arch/ppc/kernel/ibm440gp_common.h --- linux-2.4.22/arch/ppc/kernel/ibm440gp_common.h 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/kernel/ibm440gp_common.h 2003-10-22 22:48:12.000000000 +0000 @@ -0,0 +1,45 @@ +/* + * arch/ppc/kernel/ibm440gp_common.h + * + * PPC440GP system library + * + * Eugene Surovegin or + * Copyright (c) 2003 Zultys Technologies + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + */ +#ifdef __KERNEL__ +#ifndef __PPC_SYSLIB_IBM440GP_COMMON_H +#define __PPC_SYSLIB_IBM440GP_COMMON_H + +#ifndef __ASSEMBLY__ + +#include +#include + +/* + * All clocks are in Hz + */ +struct ibm440gp_clocks { + unsigned int cpu; /* CPUCoreClk */ + unsigned int plb; /* PLBClk */ + unsigned int opb; /* OPBClk */ + unsigned int ebc; /* PerClk */ + unsigned int uart; +}; + +/* + * Please, refer to the Figure 13.1 in 440GP user manual + * + * if internal UART clock is used, ser_clk is ignored + */ +void ibm440gp_get_clocks(struct ibm440gp_clocks*, unsigned int sys_clk, + unsigned int ser_clk) __init; + +#endif /* __ASSEMBLY__ */ +#endif /* __PPC_SYSLIB_IBM440GP_COMMON_H */ +#endif /* __KERNEL__ */ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/kernel/ibm44x_common.c linux-2.4.23-pre8/arch/ppc/kernel/ibm44x_common.c --- linux-2.4.22/arch/ppc/kernel/ibm44x_common.c 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/kernel/ibm44x_common.c 2003-10-22 22:48:36.000000000 +0000 @@ -0,0 +1,37 @@ +/* + * arch/ppc/kernel/ibm44x_common.c + * + * PPC44x system library + * + * Matt Porter + * Copyright 2002-2003 MontaVista Software Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + */ +#include +#include +#include +#include + +phys_addr_t fixup_bigphys_addr(phys_addr_t addr, phys_addr_t size) +{ + phys_addr_t page_4gb = 0; + + /* + * Trap the least significant 32-bit portions of an + * address in the 440's 36-bit address space. Fix + * them up with the appropriate ERPN + */ + if ((addr >= PPC44x_IO_LO) && (addr < PPC44x_IO_HI)) + page_4gb = PPC44x_IO_PAGE; + else if ((addr >= PPC44x_PCICFG_LO) && (addr < PPC44x_PCICFG_HI)) + page_4gb = PPC44x_PCICFG_PAGE; + else if ((addr >= PPC44x_PCIMEM_LO) && (addr < PPC44x_PCIMEM_HI)) + page_4gb = PPC44x_PCIMEM_PAGE; + + return (page_4gb | addr); +}; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/kernel/idle_gen.c linux-2.4.23-pre8/arch/ppc/kernel/idle_gen.c --- linux-2.4.22/arch/ppc/kernel/idle_gen.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/kernel/idle_gen.c 2003-10-22 22:47:31.000000000 +0000 @@ -15,10 +15,15 @@ void power_save(void) { - /* Make sure the CPU has the DOZE feature set. */ + /* + * Make sure the CPU has the DOZE or NAP feature set. + * We assume that chip-specific initialization code + * has set any other registers necessary (e.g. HID0). + */ if (!(cur_cpu_spec[smp_processor_id()]->cpu_features - & CPU_FTR_CAN_DOZE)) + & (CPU_FTR_CAN_DOZE | CPU_FTR_CAN_NAP))) return; + /* * Disable interrupts to prevent a lost wakeup * when going to sleep. This is necessary even with diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/kernel/indirect_pci.c linux-2.4.23-pre8/arch/ppc/kernel/indirect_pci.c --- linux-2.4.22/arch/ppc/kernel/indirect_pci.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/kernel/indirect_pci.c 2003-10-22 22:47:43.000000000 +0000 @@ -24,6 +24,12 @@ #define cfg_read(val, addr, type, op) *val = op((type)(addr)) #define cfg_write(val, addr, type, op) op((type *)(addr), (val)) +#ifdef CONFIG_PPC_INDIRECT_PCI_BE +#define PCI_CFG_OUT out_be32 +#else +#define PCI_CFG_OUT out_le32 +#endif + #define INDIRECT_PCI_OP(rw, size, type, op, mask) \ static int \ indirect_##rw##_config_##size(struct pci_dev *dev, int offset, type val) \ @@ -39,9 +45,9 @@ if (dev->bus->number != hose->first_busno) \ cfg_type = 1; \ \ - out_be32(hose->cfg_addr, \ - (((offset & 0xfc) | cfg_type) << 24) | (dev->devfn << 16) \ - | ((dev->bus->number - hose->bus_offset) << 8) | 0x80); \ + PCI_CFG_OUT(hose->cfg_addr, \ + (0x80000000 | ((dev->bus->number - hose->bus_offset) << 16) \ + | (dev->devfn << 8) | ((offset & 0xfc) | cfg_type))); \ cfg_##rw(val, hose->cfg_data + (offset & mask), type, op); \ return PCIBIOS_SUCCESSFUL; \ } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/kernel/irq.c linux-2.4.23-pre8/arch/ppc/kernel/irq.c --- linux-2.4.22/arch/ppc/kernel/irq.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/kernel/irq.c 2003-10-22 22:49:19.000000000 +0000 @@ -429,7 +429,7 @@ int status; struct irqaction *action; int cpu = smp_processor_id(); - irq_desc_t *desc = irq_desc + irq; + irq_desc_t *desc = &irq_desc[irq]; kstat.irqs[cpu][irq]++; spin_lock(&desc->lock); @@ -501,12 +501,25 @@ * The ->end() handler has to deal with interrupts which got * disabled while the handler was running. */ - if (irq_desc[irq].handler) { - if (irq_desc[irq].handler->end) - irq_desc[irq].handler->end(irq); - else if (irq_desc[irq].handler->enable) - irq_desc[irq].handler->enable(irq); + if (desc->handler) { + if (desc->handler->end) + desc->handler->end(irq); + else if (desc->handler->enable) + desc->handler->enable(irq); } + +#ifdef CONFIG_DBOX2 + /* + * Interrupts marked as oneshot are level + * triggered. We disable them here for onboard + * hardware which can not be configured to + * generate edge triggered interrupts due to + * lack of documentation. + */ + if ((action) && (action->flags & SA_ONESHOT)) + disable_irq_nosync(irq); +#endif + spin_unlock(&desc->lock); } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/kernel/misc.S linux-2.4.23-pre8/arch/ppc/kernel/misc.S --- linux-2.4.22/arch/ppc/kernel/misc.S 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/kernel/misc.S 2003-10-22 22:49:36.000000000 +0000 @@ -361,7 +361,20 @@ cmpwi 0, r3, 61 /* reserve last two entries */ ble 1b isync -#else +#elif defined(CONFIG_44x) + lis r3,0 + sync +1: + tlbwe r3,r3,PPC44x_TLB_PAGEID + addi r3,r3,1 + /* Load high watermark */ + lis r4,tlb_44x_hwater@h + ori r4,r4,tlb_44x_hwater@l + lwz r5,0(r4) + cmpw 0,r3,r5 + ble 1b + isync +#else /* !(CONFIG_40x || CONFIG_44x) */ #if defined(CONFIG_SMP) mfmsr r10 SYNC @@ -406,7 +419,31 @@ tlbwe r3, r3, TLB_TAG isync 10: -#else +#elif defined(CONFIG_44x) + mfspr r4,SPRN_MMUCR /* Get MMUCR */ + lis r5,PPC44x_MMUCR_STS@h + ori r5,r5,PPC44x_MMUCR_TID@l /* Create mask */ + andc r4,r4,r5 /* Clear out TID/STS bits */ + mfspr r5,SPRN_PID /* Get PID */ + or r4,r4,r5 /* Set TID bits */ + mfmsr r6 /* Get MSR */ + andi. r6,r6,MSR_IS@l /* TS=1? */ + beq 11f /* If not, leave STS=0 */ + oris r4,r4,PPC44x_MMUCR_STS@h /* Set STS=1 */ +11: mtspr SPRN_MMUCR, r4 /* Put MMUCR */ + + tlbsx. r3, 0, r3 + bne 10f + sync + /* There are only 64 TLB entries, so r3 < 64, + * which means bit 22, is clear. Since 22 is + * the V bit in the TLB_PAGEID, loading this + * value will invalidate the TLB entry. + */ + tlbwe r3, r3, PPC44x_TLB_PAGEID + isync +10: +#else /* !(CONFIG_40x || CONFIG_44x) */ #if defined(CONFIG_SMP) mfmsr r10 SYNC @@ -570,7 +607,7 @@ #ifdef CONFIG_NOT_COHERENT_CACHE /* * 40x cores have 8K or 16K dcache and 32 byte line size. - * 440 has a 32K dcache and 32 byte line size. + * 44x has a 32K dcache and 32 byte line size. * 8xx has 1, 2, 4, 8K variants. * For now, cover the worst case of the 440. * Must be called with external interrupts disabled. @@ -1243,6 +1280,24 @@ .long sys_ni_syscall /* reserved for sys_io_getevents */ .long sys_ni_syscall /* 230 reserved for sys_io_submit */ .long sys_ni_syscall /* reserved for sys_io_cancel */ + .long sys_ni_syscall /* reserved for sys_set_tid_address */ + .long sys_ni_syscall /* reserved for sys_fadvise64 */ + .long sys_ni_syscall /* reserved for sys_exit_group */ + .long sys_ni_syscall /* 235 reserved for sys_lookup_dcookie */ + .long sys_ni_syscall /* reserved for sys_epoll_create */ + .long sys_ni_syscall /* reserved for sys_epoll_ctl */ + .long sys_ni_syscall /* reserved for sys_epoll_wait */ + .long sys_ni_syscall /* reserved for sys_remap_file_pages */ + .long sys_ni_syscall /* 240 reserved for sys_timer_create */ + .long sys_ni_syscall /* reserved for sys_timer_settime */ + .long sys_ni_syscall /* reserved for sys_timer_gettime */ + .long sys_ni_syscall /* reserved for sys_timer_getoverrun */ + .long sys_ni_syscall /* reserved for sys_timer_delete */ + .long sys_ni_syscall /* 245 reserved for sys_clock_settime */ + .long sys_ni_syscall /* reserved for sys_clock_gettime */ + .long sys_ni_syscall /* reserved for sys_clock_getres */ + .long sys_ni_syscall /* reserved for sys_clock_nanosleep */ + .long sys_swapcontext .rept NR_syscalls-(.-sys_call_table)/4 .long sys_ni_syscall diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/kernel/mk_defs.c linux-2.4.23-pre8/arch/ppc/kernel/mk_defs.c --- linux-2.4.22/arch/ppc/kernel/mk_defs.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/kernel/mk_defs.c 2003-10-22 22:49:02.000000000 +0000 @@ -56,6 +56,7 @@ DEFINE(THREAD_VR0, offsetof(struct thread_struct, vr[0])); DEFINE(THREAD_VRSAVE, offsetof(struct thread_struct, vrsave)); DEFINE(THREAD_VSCR, offsetof(struct thread_struct, vscr)); + DEFINE(THREAD_USED_VR, offsetof(struct thread_struct, used_vr)); #endif /* CONFIG_ALTIVEC */ #ifdef CONFIG_4xx DEFINE(THREAD_DBCR0, offsetof(struct thread_struct, dbcr0)); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/kernel/pci-dma.c linux-2.4.23-pre8/arch/ppc/kernel/pci-dma.c --- linux-2.4.22/arch/ppc/kernel/pci-dma.c 2003-06-13 14:51:31.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/kernel/pci-dma.c 2003-10-22 22:47:56.000000000 +0000 @@ -20,13 +20,20 @@ void *ret; int gfp = GFP_ATOMIC; - if (hwdev == NULL || hwdev->dma_mask != 0xffffffff) + if (hwdev == NULL || hwdev->dma_mask < 0xffffffff) gfp |= GFP_DMA; + +#ifdef CONFIG_NOT_COHERENT_CACHE + ret = consistent_alloc(gfp, size, dma_handle); +#else ret = (void *)__get_free_pages(gfp, get_order(size)); +#endif if (ret != NULL) { memset(ret, 0, size); +#ifndef CONFIG_NOT_COHERENT_CACHE *dma_handle = virt_to_bus(ret); +#endif } return ret; } @@ -34,5 +41,9 @@ void pci_free_consistent(struct pci_dev *hwdev, size_t size, void *vaddr, dma_addr_t dma_handle) { +#ifdef CONFIG_NOT_COHERENT_CACHE + consistent_free(vaddr); +#else free_pages((unsigned long)vaddr, get_order(size)); +#endif } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/kernel/ppc-stub.c linux-2.4.23-pre8/arch/ppc/kernel/ppc-stub.c --- linux-2.4.22/arch/ppc/kernel/ppc-stub.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/kernel/ppc-stub.c 2003-10-22 22:49:34.000000000 +0000 @@ -135,7 +135,7 @@ /* typedef void (*trapfunc_t)(void); */ static void kgdb_fault_handler(struct pt_regs *regs); -static void handle_exception (struct pt_regs *regs); +static int handle_exception (struct pt_regs *regs); #if 0 /* Install an exception handler for kgdb */ @@ -387,14 +387,12 @@ int kgdb_bpt(struct pt_regs *regs) { - handle_exception(regs); - return 1; + return handle_exception(regs); } int kgdb_sstep(struct pt_regs *regs) { - handle_exception(regs); - return 1; + return handle_exception(regs); } void kgdb(struct pt_regs *regs) @@ -404,16 +402,14 @@ int kgdb_iabr_match(struct pt_regs *regs) { - printk("kgdb doesn't support iabr, what?!?\n"); - handle_exception(regs); - return 1; + printk(KERN_ERR "kgdb doesn't support iabr, what?!?\n"); + return handle_exception(regs); } int kgdb_dabr_match(struct pt_regs *regs) { - printk("kgdb doesn't support dabr, what?!?\n"); - handle_exception(regs); - return 1; + printk(KERN_ERR "kgdb doesn't support dabr, what?!?\n"); + return handle_exception(regs); } /* Convert the SPARC hardware trap type code to a unix signal number. */ @@ -459,7 +455,7 @@ /* * This function does all command processing for interfacing to gdb. */ -static void +static int handle_exception (struct pt_regs *regs) { int sigval; @@ -468,14 +464,19 @@ char *ptr; unsigned int msr; + /* We don't handle user-mode breakpoints. */ + if (user_mode(regs)) + return 0; + if (debugger_fault_handler) { debugger_fault_handler(regs); panic("kgdb longjump failed!\n"); } if (kgdb_active) { - printk("interrupt while in kgdb, returning\n"); - return; + printk(KERN_ERR "interrupt while in kgdb, returning\n"); + return 0; } + kgdb_active = 1; kgdb_started = 1; @@ -677,14 +678,14 @@ kgdb_interruptible(1); unlock_kernel(); kgdb_active = 0; - return; + return 1; case 's': kgdb_flush_cache_all(); regs->msr |= MSR_SE; unlock_kernel(); kgdb_active = 0; - return; + return 1; case 'r': /* Reset (if user process..exit ???)*/ panic("kgdb reset."); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/kernel/ppc4xx_dma.c linux-2.4.23-pre8/arch/ppc/kernel/ppc4xx_dma.c --- linux-2.4.22/arch/ppc/kernel/ppc4xx_dma.c 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/kernel/ppc4xx_dma.c 2003-10-22 22:48:19.000000000 +0000 @@ -0,0 +1,852 @@ +/* + * arch/ppc/kernel/ppc4xx_dma.c + * + * IBM PPC4xx DMA engine core library + * + * Copyright 2000-2003 MontaVista Software Inc. + * + * Cleaned by Matt Porter + * + * Original code by Armin Kuster + * and Pete Popov + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +ppc_dma_ch_t dma_channels[MAX_PPC4xx_DMA_CHANNELS]; + +int +ppc4xx_get_dma_status(void) +{ + return (mfdcr(DCRN_DMASR)); +} + +void +ppc4xx_set_src_addr(int dmanr, phys_addr_t src_addr) +{ + switch (dmanr) { + case 0: +#ifdef PPC4xx_DMA_64BIT + mtdcr(DCRN_DMASAH0, (u32)(src_addr >> 32)); +#endif + mtdcr(DCRN_DMASA0, (u32)src_addr); + break; + case 1: +#ifdef PPC4xx_DMA_64BIT + mtdcr(DCRN_DMASAH1, (u32)(src_addr >> 32)); +#endif + mtdcr(DCRN_DMASA1, (u32)src_addr); + break; + case 2: +#ifdef PPC4xx_DMA_64BIT + mtdcr(DCRN_DMASAH2, (u32)(src_addr >> 32)); +#endif + mtdcr(DCRN_DMASA2, (u32)src_addr); + break; + case 3: +#ifdef PPC4xx_DMA_64BIT + mtdcr(DCRN_DMASAH3, (u32)(src_addr >> 32)); +#endif + mtdcr(DCRN_DMASA3, (u32)src_addr); + break; + default: + if (dmanr >= MAX_PPC4xx_DMA_CHANNELS) + printk("set_src_addr: bad channel: %d\n", dmanr); + } +} + +void +ppc4xx_set_dst_addr(int dmanr, phys_addr_t dst_addr) +{ + switch (dmanr) { + case 0: +#ifdef PPC4xx_DMA_64BIT + mtdcr(DCRN_DMADAH0, (u32)(dst_addr >> 32)); +#endif + mtdcr(DCRN_DMADA0, (u32)dst_addr); + break; + case 1: +#ifdef PPC4xx_DMA_64BIT + mtdcr(DCRN_DMADAH1, (u32)(dst_addr >> 32)); +#endif + mtdcr(DCRN_DMADA1, (u32)dst_addr); + break; + case 2: +#ifdef PPC4xx_DMA_64BIT + mtdcr(DCRN_DMADAH2, (u32)(dst_addr >> 32)); +#endif + mtdcr(DCRN_DMADA2, (u32)dst_addr); + break; + case 3: +#ifdef PPC4xx_DMA_64BIT + mtdcr(DCRN_DMADAH3, (u32)(dst_addr >> 32)); +#endif + mtdcr(DCRN_DMADA3, (u32)dst_addr); + break; + default: + if (dmanr >= MAX_PPC4xx_DMA_CHANNELS) + printk("set_dst_addr: bad channel: %d\n", dmanr); + } +} + + +void +ppc4xx_enable_dma(unsigned int dmanr) +{ + unsigned int control; + ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr]; + unsigned int status_bits[] = { DMA_CS0 | DMA_TS0 | DMA_CH0_ERR, + DMA_CS1 | DMA_TS1 | DMA_CH1_ERR, + DMA_CS2 | DMA_TS2 | DMA_CH2_ERR, + DMA_CS3 | DMA_TS3 | DMA_CH3_ERR}; + + if (p_dma_ch->in_use) { + printk("enable_dma: channel %d in use\n", dmanr); + return; + } + + if (dmanr >= MAX_PPC4xx_DMA_CHANNELS) { + printk("enable_dma: bad channel: %d\n", dmanr); + return; + } + + if (p_dma_ch->mode == DMA_MODE_READ) { + /* peripheral to memory */ + ppc4xx_set_src_addr(dmanr, 0); + ppc4xx_set_dst_addr(dmanr, p_dma_ch->addr); + } else if (p_dma_ch->mode == DMA_MODE_WRITE) { + /* memory to peripheral */ + ppc4xx_set_src_addr(dmanr, p_dma_ch->addr); + ppc4xx_set_dst_addr(dmanr, 0); + } + + /* for other xfer modes, the addresses are already set */ + switch (dmanr) { + case 0: + control = mfdcr(DCRN_DMACR0); + break; + case 1: + control = mfdcr(DCRN_DMACR1); + break; + case 2: + control = mfdcr(DCRN_DMACR2); + break; + case 3: + control = mfdcr(DCRN_DMACR3); + break; + default: + printk("enable_dma: bad channel: %d\n", dmanr); + } + + control &= ~(DMA_TM_MASK | DMA_TD); /* clear all mode bits */ + if (p_dma_ch->mode == DMA_MODE_MM) { + /* software initiated memory to memory */ + control |= DMA_ETD_OUTPUT | DMA_TCE_ENABLE; + } + + switch (dmanr) { + case 0: + mtdcr(DCRN_DMACR0, control); + break; + case 1: + mtdcr(DCRN_DMACR1, control); + break; + case 2: + mtdcr(DCRN_DMACR2, control); + break; + case 3: + mtdcr(DCRN_DMACR3, control); + break; + default: + printk("enable_dma: bad channel: %d\n", dmanr); + } + + /* + * Clear the CS, TS, RI bits for the channel from DMASR. This + * has been observed to happen correctly only after the mode and + * ETD/DCE bits in DMACRx are set above. Must do this before + * enabling the channel. + */ + + mtdcr(DCRN_DMASR, status_bits[dmanr]); + + /* + * For device-paced transfers, Terminal Count Enable apparently + * must be on, and this must be turned on after the mode, etc. + * bits are cleared above (at least on Redwood-6). + */ + + if ((p_dma_ch->mode == DMA_MODE_MM_DEVATDST) || + (p_dma_ch->mode == DMA_MODE_MM_DEVATSRC)) + control |= DMA_TCE_ENABLE; + + /* + * Now enable the channel. + */ + + control |= (p_dma_ch->mode | DMA_CE_ENABLE); + + switch (dmanr) { + case 0: + mtdcr(DCRN_DMACR0, control); + break; + case 1: + mtdcr(DCRN_DMACR1, control); + break; + case 2: + mtdcr(DCRN_DMACR2, control); + break; + case 3: + mtdcr(DCRN_DMACR3, control); + break; + default: + printk("enable_dma: bad channel: %d\n", dmanr); + } + + p_dma_ch->in_use = 1; +} + +void +ppc4xx_disable_dma(unsigned int dmanr) +{ + unsigned int control; + ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr]; + + if (!p_dma_ch->in_use) { + printk("disable_dma: channel %d not in use\n", dmanr); + return; + } + + if (dmanr >= MAX_PPC4xx_DMA_CHANNELS) { + printk("disable_dma: bad channel: %d\n", dmanr); + return; + } + + switch (dmanr) { + case 0: + control = mfdcr(DCRN_DMACR0); + control &= ~DMA_CE_ENABLE; + mtdcr(DCRN_DMACR0, control); + break; + case 1: + control = mfdcr(DCRN_DMACR1); + control &= ~DMA_CE_ENABLE; + mtdcr(DCRN_DMACR1, control); + break; + case 2: + control = mfdcr(DCRN_DMACR2); + control &= ~DMA_CE_ENABLE; + mtdcr(DCRN_DMACR2, control); + break; + case 3: + control = mfdcr(DCRN_DMACR3); + control &= ~DMA_CE_ENABLE; + mtdcr(DCRN_DMACR3, control); + break; + default: + printk("disable_dma: bad channel: %d\n", dmanr); + } + + p_dma_ch->in_use = 0; +} + +/* + * Sets the dma mode for single DMA transfers only. + * For scatter/gather transfers, the mode is passed to the + * alloc_dma_handle() function as one of the parameters. + * + * The mode is simply saved and used later. This allows + * the driver to call set_dma_mode() and set_dma_addr() in + * any order. + * + * Valid mode values are: + * + * DMA_MODE_READ peripheral to memory + * DMA_MODE_WRITE memory to peripheral + * DMA_MODE_MM memory to memory + * DMA_MODE_MM_DEVATSRC device-paced memory to memory, device at src + * DMA_MODE_MM_DEVATDST device-paced memory to memory, device at dst + */ +int +ppc4xx_set_dma_mode(unsigned int dmanr, unsigned int mode) +{ + ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr]; + + if (dmanr >= MAX_PPC4xx_DMA_CHANNELS) { + printk("set_dma_mode: bad channel 0x%x\n", dmanr); + return DMA_STATUS_BAD_CHANNEL; + } + + p_dma_ch->mode = mode; + + return DMA_STATUS_GOOD; +} + +/* + * Sets the DMA Count register. Note that 'count' is in bytes. + * However, the DMA Count register counts the number of "transfers", + * where each transfer is equal to the bus width. Thus, count + * MUST be a multiple of the bus width. + */ +void +ppc4xx_set_dma_count(unsigned int dmanr, unsigned int count) +{ + ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr]; + +#ifdef DEBUG_4xxDMA + { + int error = 0; + switch (p_dma_ch->pwidth) { + case PW_8: + break; + case PW_16: + if (count & 0x1) + error = 1; + break; + case PW_32: + if (count & 0x3) + error = 1; + break; + case PW_64: + if (count & 0x7) + error = 1; + break; + default: + printk("set_dma_count: invalid bus width: 0x%x\n", + p_dma_ch->pwidth); + return; + } + if (error) + printk + ("Warning: set_dma_count count 0x%x bus width %d\n", + count, p_dma_ch->pwidth); + } +#endif + + count = count >> p_dma_ch->shift; + switch (dmanr) { + case 0: + mtdcr(DCRN_DMACT0, count); + break; + case 1: + mtdcr(DCRN_DMACT1, count); + break; + case 2: + mtdcr(DCRN_DMACT2, count); + break; + case 3: + mtdcr(DCRN_DMACT3, count); + break; + default: + printk("ppc4xx_set_dma_count: bad channel: %d\n", dmanr); + } +} + +/* + * Returns the number of bytes left to be transfered. + * After a DMA transfer, this should return zero. + * Reading this while a DMA transfer is still in progress will return + * unpredictable results. + */ +int +ppc4xx_get_dma_residue(unsigned int dmanr) +{ + unsigned int count; + ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr]; + + switch (dmanr) { + case 0: + count = mfdcr(DCRN_DMACT0); + break; + case 1: + count = mfdcr(DCRN_DMACT1); + break; + case 2: + count = mfdcr(DCRN_DMACT2); + break; + case 3: + count = mfdcr(DCRN_DMACT3); + break; + default: + printk("ppc4xx_get_dma_residue: bad channel: %d\n", dmanr); + return 0; + } + + return (count << p_dma_ch->shift); +} + +/* + * Sets the DMA address for a memory to peripheral or peripheral + * to memory transfer. The address is just saved in the channel + * structure for now and used later in enable_dma(). + */ +void +ppc4xx_set_dma_addr(unsigned int dmanr, phys_addr_t addr) +{ + ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr]; + + if (dmanr >= MAX_PPC4xx_DMA_CHANNELS) { + printk("ppc4xx_set_dma_addr: bad channel: %d\n", dmanr); + return; + } + +#ifdef DEBUG_4xxDMA + { + int error = 0; + switch (p_dma_ch->pwidth) { + case PW_8: + break; + case PW_16: + if ((unsigned) addr & 0x1) + error = 1; + break; + case PW_32: + if ((unsigned) addr & 0x3) + error = 1; + break; + case PW_64: + if ((unsigned) addr & 0x7) + error = 1; + break; + default: + printk("ppc4xx_set_dma_addr: invalid bus width: 0x%x\n", + p_dma_ch->pwidth); + return; + } + if (error) + printk("Warning: ppc4xx_set_dma_addr addr 0x%x bus width %d\n", + addr, p_dma_ch->pwidth); + } +#endif + + /* save dma address and program it later after we know the xfer mode */ + p_dma_ch->addr = addr; +} + +/* + * Sets both DMA addresses for a memory to memory transfer. + * For memory to peripheral or peripheral to memory transfers + * the function set_dma_addr() should be used instead. + */ +void +ppc4xx_set_dma_addr2(unsigned int dmanr, phys_addr_t src_dma_addr, + phys_addr_t dst_dma_addr) +{ +#ifdef DEBUG_4xxDMA + { + ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr]; + int error = 0; + switch (p_dma_ch->pwidth) { + case PW_8: + break; + case PW_16: + if (((unsigned) src_dma_addr & 0x1) || + ((unsigned) dst_dma_addr & 0x1) + ) + error = 1; + break; + case PW_32: + if (((unsigned) src_dma_addr & 0x3) || + ((unsigned) dst_dma_addr & 0x3) + ) + error = 1; + break; + case PW_64: + if (((unsigned) src_dma_addr & 0x7) || + ((unsigned) dst_dma_addr & 0x7) + ) + error = 1; + break; + default: + printk("ppc4xx_set_dma_addr2: invalid bus width: 0x%x\n", + p_dma_ch->pwidth); + return; + } + if (error) + printk + ("Warning: ppc4xx_set_dma_addr2 src 0x%x dst 0x%x bus width %d\n", + src_dma_addr, dst_dma_addr, p_dma_ch->pwidth); + } +#endif + + if (dmanr >= MAX_PPC4xx_DMA_CHANNELS) { + printk("ppc4xx_set_dma_addr2: bad channel: %d\n", dmanr); + } + else { + ppc4xx_set_src_addr(dmanr, src_dma_addr); + ppc4xx_set_dst_addr(dmanr, dst_dma_addr); + } +} + +/* + * Enables the channel interrupt. + * + * If performing a scatter/gatter transfer, this function + * MUST be called before calling alloc_dma_handle() and building + * the sgl list. Otherwise, interrupts will not be enabled, if + * they were previously disabled. + */ +int +ppc4xx_enable_dma_interrupt(unsigned int dmanr) +{ + unsigned int control; + ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr]; + + p_dma_ch->int_enable = 1; + switch (dmanr) { + case 0: + control = mfdcr(DCRN_DMACR0); + control |= DMA_CIE_ENABLE; /* Channel Interrupt Enable */ + mtdcr(DCRN_DMACR0, control); + break; + case 1: + control = mfdcr(DCRN_DMACR1); + control |= DMA_CIE_ENABLE; + mtdcr(DCRN_DMACR1, control); + break; + case 2: + control = mfdcr(DCRN_DMACR2); + control |= DMA_CIE_ENABLE; + mtdcr(DCRN_DMACR2, control); + break; + case 3: + control = mfdcr(DCRN_DMACR3); + control |= DMA_CIE_ENABLE; + mtdcr(DCRN_DMACR3, control); + break; + default: + printk("ppc4xx_enable_dma_interrupt: bad channel: %d\n", dmanr); + return DMA_STATUS_BAD_CHANNEL; + } + return DMA_STATUS_GOOD; +} + +/* + * Disables the channel interrupt. + * + * If performing a scatter/gatter transfer, this function + * MUST be called before calling alloc_dma_handle() and building + * the sgl list. Otherwise, interrupts will not be disabled, if + * they were previously enabled. + */ +int +ppc4xx_disable_dma_interrupt(unsigned int dmanr) +{ + unsigned int control; + ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr]; + + p_dma_ch->int_enable = 0; + switch (dmanr) { + case 0: + control = mfdcr(DCRN_DMACR0); + control &= ~DMA_CIE_ENABLE; /* Channel Interrupt Enable */ + mtdcr(DCRN_DMACR0, control); + break; + case 1: + control = mfdcr(DCRN_DMACR1); + control &= ~DMA_CIE_ENABLE; + mtdcr(DCRN_DMACR1, control); + break; + case 2: + control = mfdcr(DCRN_DMACR2); + control &= ~DMA_CIE_ENABLE; + mtdcr(DCRN_DMACR2, control); + break; + case 3: + control = mfdcr(DCRN_DMACR3); + control &= ~DMA_CIE_ENABLE; + mtdcr(DCRN_DMACR3, control); + break; + default: + printk("ppc4xx_disable_dma_interrupt: bad channel: %d\n", dmanr); + return DMA_STATUS_BAD_CHANNEL; + } + return DMA_STATUS_GOOD; +} + +/* + * Configures a DMA channel, including the peripheral bus width, if a + * peripheral is attached to the channel, the polarity of the DMAReq and + * DMAAck signals, etc. This information should really be setup by the boot + * code, since most likely the configuration won't change dynamically. + * If the kernel has to call this function, it's recommended that it's + * called from platform specific init code. The driver should not need to + * call this function. + */ +int +ppc4xx_init_dma_channel(unsigned int dmanr, ppc_dma_ch_t * p_init) +{ + unsigned int polarity; + uint32_t control = 0; + ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr]; + + DMA_MODE_READ = (unsigned long) DMA_TD; /* Peripheral to Memory */ + DMA_MODE_WRITE = 0; /* Memory to Peripheral */ + + if (!p_init) { + printk("ppc4xx_init_dma_channel: NULL p_init\n"); + return DMA_STATUS_NULL_POINTER; + } + + if (dmanr >= MAX_PPC4xx_DMA_CHANNELS) { + printk("ppc4xx_init_dma_channel: bad channel %d\n", dmanr); + return DMA_STATUS_BAD_CHANNEL; + } + +#if DCRN_POL > 0 + polarity = mfdcr(DCRN_POL); +#else + polarity = 0; +#endif + + /* Setup the control register based on the values passed to + * us in p_init. Then, over-write the control register with this + * new value. + */ + control |= SET_DMA_CONTROL; + + switch (dmanr) { + case 0: + /* clear all polarity signals and then "or" in new signal levels */ + polarity &= ~GET_DMA_POLARITY(0); + polarity |= p_dma_ch->polarity; +#if DCRN_POL > 0 + mtdcr(DCRN_POL, polarity); +#endif + mtdcr(DCRN_DMACR0, control); + break; + case 1: + polarity &= ~GET_DMA_POLARITY(1); + polarity |= p_dma_ch->polarity; +#if DCRN_POL > 0 + mtdcr(DCRN_POL, polarity); +#endif + mtdcr(DCRN_DMACR1, control); + break; + case 2: + polarity &= ~GET_DMA_POLARITY(2); + polarity |= p_dma_ch->polarity; +#if DCRN_POL > 0 + mtdcr(DCRN_POL, polarity); +#endif + mtdcr(DCRN_DMACR2, control); + break; + case 3: + polarity &= ~GET_DMA_POLARITY(3); + polarity |= p_dma_ch->polarity; +#if DCRN_POL > 0 + mtdcr(DCRN_POL, polarity); +#endif + mtdcr(DCRN_DMACR3, control); + break; + default: + return DMA_STATUS_BAD_CHANNEL; + } + + /* save these values in our dma channel structure */ + memcpy(p_dma_ch, p_init, sizeof (ppc_dma_ch_t)); + + /* + * The peripheral width values written in the control register are: + * PW_8 0 + * PW_16 1 + * PW_32 2 + * PW_64 3 + * + * Since the DMA count register takes the number of "transfers", + * we need to divide the count sent to us in certain + * functions by the appropriate number. It so happens that our + * right shift value is equal to the peripheral width value. + */ + p_dma_ch->shift = p_init->pwidth; + + /* + * Save the control word for easy access. + */ + p_dma_ch->control = control; + + mtdcr(DCRN_DMASR, 0xffffffff); /* clear status register */ + return DMA_STATUS_GOOD; +} + +/* + * This function returns the channel configuration. + */ +int +ppc4xx_get_channel_config(unsigned int dmanr, ppc_dma_ch_t * p_dma_ch) +{ + unsigned int polarity; + unsigned int control; + +#if DCRN_POL > 0 + polarity = mfdcr(DCRN_POL); +#else + polarity = 0; +#endif + + switch (dmanr) { + case 0: + p_dma_ch->polarity = polarity & GET_DMA_POLARITY(0); + control = mfdcr(DCRN_DMACR0); + break; + case 1: + p_dma_ch->polarity = polarity & GET_DMA_POLARITY(1); + control = mfdcr(DCRN_DMACR1); + break; + case 2: + p_dma_ch->polarity = polarity & GET_DMA_POLARITY(2); + control = mfdcr(DCRN_DMACR2); + break; + case 3: + p_dma_ch->polarity = polarity & GET_DMA_POLARITY(3); + control = mfdcr(DCRN_DMACR3); + break; + default: + return DMA_STATUS_BAD_CHANNEL; + } + + p_dma_ch->cp = GET_DMA_PRIORITY(control); + p_dma_ch->pwidth = GET_DMA_PW(control); + p_dma_ch->psc = GET_DMA_PSC(control); + p_dma_ch->pwc = GET_DMA_PWC(control); + p_dma_ch->phc = GET_DMA_PHC(control); + p_dma_ch->ce = GET_DMA_CE_ENABLE(control); + p_dma_ch->int_enable = GET_DMA_CIE_ENABLE(control); + p_dma_ch->shift = GET_DMA_PW(control); + +#ifdef CONFIG_PPC4xx_EDMA + p_dma_ch->pf = GET_DMA_PREFETCH(control); +#else + p_dma_ch->ch_enable = GET_DMA_CH(control); + p_dma_ch->ece_enable = GET_DMA_ECE(control); + p_dma_ch->tcd_disable = GET_DMA_TCD(control); +#endif + return DMA_STATUS_GOOD; +} + +/* + * Sets the priority for the DMA channel dmanr. + * Since this is setup by the hardware init function, this function + * can be used to dynamically change the priority of a channel. + * + * Acceptable priorities: + * + * PRIORITY_LOW + * PRIORITY_MID_LOW + * PRIORITY_MID_HIGH + * PRIORITY_HIGH + * + */ +int +ppc4xx_set_channel_priority(unsigned int dmanr, unsigned int priority) +{ + unsigned int control; + + if ((priority != PRIORITY_LOW) && + (priority != PRIORITY_MID_LOW) && + (priority != PRIORITY_MID_HIGH) && (priority != PRIORITY_HIGH)) { + printk("ppc4xx_set_channel_priority: bad priority: 0x%x\n", priority); + } + + switch (dmanr) { + case 0: + control = mfdcr(DCRN_DMACR0); + control |= SET_DMA_PRIORITY(priority); + mtdcr(DCRN_DMACR0, control); + break; + case 1: + control = mfdcr(DCRN_DMACR1); + control |= SET_DMA_PRIORITY(priority); + mtdcr(DCRN_DMACR1, control); + break; + case 2: + control = mfdcr(DCRN_DMACR2); + control |= SET_DMA_PRIORITY(priority); + mtdcr(DCRN_DMACR2, control); + break; + case 3: + control = mfdcr(DCRN_DMACR3); + control |= SET_DMA_PRIORITY(priority); + mtdcr(DCRN_DMACR3, control); + break; + default: + printk("ppc4xx_set_channel_priority: bad channel: %d\n", dmanr); + return DMA_STATUS_BAD_CHANNEL; + } + return DMA_STATUS_GOOD; +} + +/* + * Returns the width of the peripheral attached to this channel. This assumes + * that someone who knows the hardware configuration, boot code or some other + * init code, already set the width. + * + * The return value is one of: + * PW_8 + * PW_16 + * PW_32 + * PW_64 + * + * The function returns 0 on error. + */ +unsigned int +ppc4xx_get_peripheral_width(unsigned int dmanr) +{ + unsigned int control; + + switch (dmanr) { + case 0: + control = mfdcr(DCRN_DMACR0); + break; + case 1: + control = mfdcr(DCRN_DMACR1); + break; + case 2: + control = mfdcr(DCRN_DMACR2); + break; + case 3: + control = mfdcr(DCRN_DMACR3); + break; + default: + printk("ppc4xx_get_peripheral_width: bad channel: %d\n", dmanr); + return 0; + } + return (GET_DMA_PW(control)); +} + + +EXPORT_SYMBOL(ppc4xx_init_dma_channel); +EXPORT_SYMBOL(ppc4xx_get_channel_config); +EXPORT_SYMBOL(ppc4xx_set_channel_priority); +EXPORT_SYMBOL(ppc4xx_get_peripheral_width); +EXPORT_SYMBOL(dma_channels); +EXPORT_SYMBOL(ppc4xx_set_src_addr); +EXPORT_SYMBOL(ppc4xx_set_dst_addr); +EXPORT_SYMBOL(ppc4xx_set_dma_addr); +EXPORT_SYMBOL(ppc4xx_set_dma_addr2); +EXPORT_SYMBOL(ppc4xx_enable_dma); +EXPORT_SYMBOL(ppc4xx_disable_dma); +EXPORT_SYMBOL(ppc4xx_set_dma_mode); +EXPORT_SYMBOL(ppc4xx_set_dma_count); +EXPORT_SYMBOL(ppc4xx_get_dma_residue); +EXPORT_SYMBOL(ppc4xx_enable_dma_interrupt); +EXPORT_SYMBOL(ppc4xx_disable_dma_interrupt); +EXPORT_SYMBOL(ppc4xx_get_dma_status); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/kernel/ppc4xx_sgdma.c linux-2.4.23-pre8/arch/ppc/kernel/ppc4xx_sgdma.c --- linux-2.4.22/arch/ppc/kernel/ppc4xx_sgdma.c 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/kernel/ppc4xx_sgdma.c 2003-10-22 22:49:38.000000000 +0000 @@ -0,0 +1,536 @@ +/* + * arch/ppc/kernel/ppc4xx_sgdma.c + * + * IBM PPC4xx DMA engine scatter/gather library + * + * Copyright 2002-2003 MontaVista Software Inc. + * + * Cleaned by Matt Porter + * + * Original code by Armin Kuster + * and Pete Popov + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +static __inline__ void +ppc4xx_set_sg_addr(int dmanr, phys_addr_t sg_addr) +{ + switch (dmanr) { + case 0: +#ifdef PPC4xx_DMA_64BIT + mtdcr(DCRN_ASGH0, (u32)(sg_addr >> 32)); +#endif + mtdcr(DCRN_ASG0, (u32)sg_addr); + break; + case 1: +#ifdef PPC4xx_DMA_64BIT + mtdcr(DCRN_ASGH1, (u32)(sg_addr >> 32)); +#endif + mtdcr(DCRN_ASG1, (u32)sg_addr); + break; + case 2: +#ifdef PPC4xx_DMA_64BIT + mtdcr(DCRN_ASGH2, (u32)(sg_addr >> 32)); +#endif + mtdcr(DCRN_ASG2, sg_addr); + break; + case 3: +#ifdef PPC4xx_DMA_64BIT + mtdcr(DCRN_ASGH3, (u32)(sg_addr >> 32)); +#endif + mtdcr(DCRN_ASG3, (u32)sg_addr); + break; + } +} + + +/* + * Add a new sgl descriptor to the end of a scatter/gather list + * which was created by alloc_dma_handle(). + * + * For a memory to memory transfer, both dma addresses must be + * valid. For a peripheral to memory transfer, one of the addresses + * must be set to NULL, depending on the direction of the transfer: + * memory to peripheral: set dst_addr to NULL, + * peripheral to memory: set src_addr to NULL. + */ +static __inline__ int +ppc4xx_add_dma_sgl(sgl_handle_t handle, phys_addr_t src_addr, phys_addr_t dst_addr, + unsigned int count) +{ + sgl_list_info_t *psgl = (sgl_list_info_t *) handle; + ppc_dma_ch_t *p_dma_ch; + + if (!handle) { + printk("ppc4xx_add_dma_sgl: null handle\n"); + return DMA_STATUS_BAD_HANDLE; + } + + if (psgl->dmanr >= MAX_PPC4xx_DMA_CHANNELS) { + printk("ppc4xx_add_dma_sgl: bad channel: %d\n", psgl->dmanr); + return DMA_STATUS_BAD_CHANNEL; + } + + p_dma_ch = &dma_channels[psgl->dmanr]; + +#ifdef DEBUG_4xxDMA + { + int error = 0; + unsigned int aligned = + (unsigned) src_addr | (unsigned) dst_addr | count; + switch (p_dma_ch->pwidth) { + case PW_8: + break; + case PW_16: + if (aligned & 0x1) + error = 1; + break; + case PW_32: + if (aligned & 0x3) + error = 1; + break; + case PW_64: + if (aligned & 0x7) + error = 1; + break; + default: + printk("ppc4xx_add_dma_sgl: invalid bus width: 0x%x\n", + p_dma_ch->pwidth); + return DMA_STATUS_GENERAL_ERROR; + } + if (error) + printk + ("Alignment warning: ppc4xx_add_dma_sgl src 0x%x dst 0x%x count 0x%x bus width var %d\n", + src_addr, dst_addr, count, p_dma_ch->pwidth); + + } +#endif + + if ((unsigned) (psgl->ptail + 1) >= ((unsigned) psgl + SGL_LIST_SIZE)) { + printk("sgl handle out of memory \n"); + return DMA_STATUS_OUT_OF_MEMORY; + } + + if (!psgl->ptail) { + psgl->phead = (ppc_sgl_t *) + ((unsigned) psgl + sizeof (sgl_list_info_t)); + psgl->ptail = psgl->phead; + } else { + psgl->ptail->next = iopa((unsigned long)(psgl->ptail + 1)); + psgl->ptail++; + } + + psgl->ptail->control = psgl->control; + psgl->ptail->src_addr = src_addr; + psgl->ptail->dst_addr = dst_addr; + psgl->ptail->control_count = (count >> p_dma_ch->shift) | + psgl->sgl_control; + psgl->ptail->next = (uint32_t) NULL; + + return DMA_STATUS_GOOD; +} + +/* + * Enable (start) the DMA described by the sgl handle. + */ +static __inline__ void +ppc4xx_enable_dma_sgl(sgl_handle_t handle) +{ + sgl_list_info_t *psgl = (sgl_list_info_t *) handle; + ppc_dma_ch_t *p_dma_ch; + uint32_t sg_command; + + if (!handle) { + printk("ppc4xx_enable_dma_sgl: null handle\n"); + return; + } else if (psgl->dmanr > (MAX_PPC4xx_DMA_CHANNELS - 1)) { + printk("ppc4xx_enable_dma_sgl: bad channel in handle %d\n", + psgl->dmanr); + return; + } else if (!psgl->phead) { + printk("ppc4xx_enable_dma_sgl: sg list empty\n"); + return; + } + + p_dma_ch = &dma_channels[psgl->dmanr]; + psgl->ptail->control_count &= ~SG_LINK; /* make this the last dscrptr */ + sg_command = mfdcr(DCRN_ASGC); + + ppc4xx_set_sg_addr(psgl->dmanr, iopa((unsigned long)psgl->phead)); + + switch (psgl->dmanr) { + case 0: + sg_command |= SSG0_ENABLE; + break; + case 1: + sg_command |= SSG1_ENABLE; + break; + case 2: + sg_command |= SSG2_ENABLE; + break; + case 3: + sg_command |= SSG3_ENABLE; + break; + default: + printk("ppc4xx_enable_dma_sgl: bad channel: %d\n", psgl->dmanr); + } + + mtdcr(DCRN_ASGC, sg_command); /* start transfer */ +} + +/* + * Halt an active scatter/gather DMA operation. + */ +static __inline__ void +ppc4xx_disable_dma_sgl(sgl_handle_t handle) +{ + sgl_list_info_t *psgl = (sgl_list_info_t *) handle; + uint32_t sg_command; + + if (!handle) { + printk("ppc4xx_enable_dma_sgl: null handle\n"); + return; + } else if (psgl->dmanr > (MAX_PPC4xx_DMA_CHANNELS - 1)) { + printk("ppc4xx_enable_dma_sgl: bad channel in handle %d\n", + psgl->dmanr); + return; + } + + sg_command = mfdcr(DCRN_ASGC); + switch (psgl->dmanr) { + case 0: + sg_command &= ~SSG0_ENABLE; + break; + case 1: + sg_command &= ~SSG1_ENABLE; + break; + case 2: + sg_command &= ~SSG2_ENABLE; + break; + case 3: + sg_command &= ~SSG3_ENABLE; + break; + default: + printk("ppc4xx_enable_dma_sgl: bad channel: %d\n", psgl->dmanr); + } + + mtdcr(DCRN_ASGC, sg_command); /* stop transfer */ +} + +/* + * Returns number of bytes left to be transferred from the entire sgl list. + * *src_addr and *dst_addr get set to the source/destination address of + * the sgl descriptor where the DMA stopped. + * + * An sgl transfer must NOT be active when this function is called. + */ +static __inline__ int +ppc4xx_get_dma_sgl_residue(sgl_handle_t handle, phys_addr_t * src_addr, + phys_addr_t * dst_addr) +{ + sgl_list_info_t *psgl = (sgl_list_info_t *) handle; + ppc_dma_ch_t *p_dma_ch; + ppc_sgl_t *pnext, *sgl_addr; + uint32_t count_left; + + if (!handle) { + printk("ppc4xx_get_dma_sgl_residue: null handle\n"); + return DMA_STATUS_BAD_HANDLE; + } else if (psgl->dmanr > (MAX_PPC4xx_DMA_CHANNELS - 1)) { + printk("ppc4xx_get_dma_sgl_residue: bad channel in handle %d\n", + psgl->dmanr); + return DMA_STATUS_BAD_CHANNEL; + } + + switch (psgl->dmanr) { + case 0: + sgl_addr = (ppc_sgl_t *) bus_to_virt(mfdcr(DCRN_ASG0)); + count_left = mfdcr(DCRN_DMACT0); + break; + case 1: + sgl_addr = (ppc_sgl_t *) bus_to_virt(mfdcr(DCRN_ASG1)); + count_left = mfdcr(DCRN_DMACT1); + break; + case 2: + sgl_addr = (ppc_sgl_t *) bus_to_virt(mfdcr(DCRN_ASG2)); + count_left = mfdcr(DCRN_DMACT2); + break; + case 3: + sgl_addr = (ppc_sgl_t *) bus_to_virt(mfdcr(DCRN_ASG3)); + count_left = mfdcr(DCRN_DMACT3); + break; + default: + printk("ppc4xx_get_dma_sgl_residue: bad channel %d\n", psgl->dmanr); + goto error; + } + + if (!sgl_addr) { + printk("ppc4xx_get_dma_sgl_residue: sgl addr register is null\n"); + goto error; + } + + pnext = psgl->phead; + while (pnext && + ((unsigned) pnext < ((unsigned) psgl + SGL_LIST_SIZE) && + (pnext != sgl_addr)) + ) { + pnext++; + } + + if (pnext == sgl_addr) { /* found the sgl descriptor */ + + *src_addr = pnext->src_addr; + *dst_addr = pnext->dst_addr; + + /* + * Now search the remaining descriptors and add their count. + * We already have the remaining count from this descriptor in + * count_left. + */ + pnext++; + + while ((pnext != psgl->ptail) && + ((unsigned) pnext < ((unsigned) psgl + SGL_LIST_SIZE)) + ) { + count_left += pnext->control_count & SG_COUNT_MASK; + } + + if (pnext != psgl->ptail) { /* should never happen */ + printk + ("ppc4xx_get_dma_sgl_residue error (1) psgl->ptail 0x%x handle 0x%x\n", + (unsigned int) psgl->ptail, (unsigned int) handle); + goto error; + } + + /* success */ + p_dma_ch = &dma_channels[psgl->dmanr]; + return (count_left << p_dma_ch->shift); /* count in bytes */ + + } else { + /* this shouldn't happen */ + printk + ("get_dma_sgl_residue, unable to match current address 0x%x, handle 0x%x\n", + (unsigned int) sgl_addr, (unsigned int) handle); + + } + + error: + *src_addr = (phys_addr_t) NULL; + *dst_addr = (phys_addr_t) NULL; + return 0; +} + +/* + * Returns the address(es) of the buffer(s) contained in the head element of + * the scatter/gather list. The element is removed from the scatter/gather + * list and the next element becomes the head. + * + * This function should only be called when the DMA is not active. + */ +static __inline__ int +ppc4xx_delete_dma_sgl_element(sgl_handle_t handle, phys_addr_t * src_dma_addr, + phys_addr_t * dst_dma_addr) +{ + sgl_list_info_t *psgl = (sgl_list_info_t *) handle; + + if (!handle) { + printk("ppc4xx_delete_sgl_element: null handle\n"); + return DMA_STATUS_BAD_HANDLE; + } else if (psgl->dmanr > (MAX_PPC4xx_DMA_CHANNELS - 1)) { + printk("ppc4xx_delete_sgl_element: bad channel in handle %d\n", + psgl->dmanr); + return DMA_STATUS_BAD_CHANNEL; + } + + if (!psgl->phead) { + printk("ppc4xx_delete_sgl_element: sgl list empty\n"); + *src_dma_addr = (phys_addr_t) NULL; + *dst_dma_addr = (phys_addr_t) NULL; + return DMA_STATUS_SGL_LIST_EMPTY; + } + + *src_dma_addr = (phys_addr_t) psgl->phead->src_addr; + *dst_dma_addr = (phys_addr_t) psgl->phead->dst_addr; + + if (psgl->phead == psgl->ptail) { + /* last descriptor on the list */ + psgl->phead = NULL; + psgl->ptail = NULL; + } else { + psgl->phead++; + } + + return DMA_STATUS_GOOD; +} + + +/* + * Create a scatter/gather list handle. This is simply a structure which + * describes a scatter/gather list. + * + * A handle is returned in "handle" which the driver should save in order to + * be able to access this list later. A chunk of memory will be allocated + * to be used by the API for internal management purposes, including managing + * the sg list and allocating memory for the sgl descriptors. One page should + * be more than enough for that purpose. Perhaps it's a bit wasteful to use + * a whole page for a single sg list, but most likely there will be only one + * sg list per channel. + * + * Interrupt notes: + * Each sgl descriptor has a copy of the DMA control word which the DMA engine + * loads in the control register. The control word has a "global" interrupt + * enable bit for that channel. Interrupts are further qualified by a few bits + * in the sgl descriptor count register. In order to setup an sgl, we have to + * know ahead of time whether or not interrupts will be enabled at the completion + * of the transfers. Thus, enable_dma_interrupt()/disable_dma_interrupt() MUST + * be called before calling alloc_dma_handle(). If the interrupt mode will never + * change after powerup, then enable_dma_interrupt()/disable_dma_interrupt() + * do not have to be called -- interrupts will be enabled or disabled based + * on how the channel was configured after powerup by the hw_init_dma_channel() + * function. Each sgl descriptor will be setup to interrupt if an error occurs; + * however, only the last descriptor will be setup to interrupt. Thus, an + * interrupt will occur (if interrupts are enabled) only after the complete + * sgl transfer is done. + */ +int +ppc4xx_alloc_dma_handle(sgl_handle_t * phandle, unsigned int mode, unsigned int dmanr) +{ + sgl_list_info_t *psgl; + dma_addr_t dma_addr; + ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr]; + uint32_t sg_command; + void *ret; + + if (dmanr >= MAX_PPC4xx_DMA_CHANNELS) { + printk("ppc4xx_alloc_dma_handle: invalid channel 0x%x\n", dmanr); + return DMA_STATUS_BAD_CHANNEL; + } + + if (!phandle) { + printk("ppc4xx_alloc_dma_handle: null handle pointer\n"); + return DMA_STATUS_NULL_POINTER; + } + + /* Get a page of memory, which is zeroed out by consistent_alloc() */ + ret = consistent_alloc(GFP_KERNEL, DMA_PPC4xx_SIZE, &dma_addr); + if (ret != NULL) { + memset(ret, 0, DMA_PPC4xx_SIZE); + psgl = (sgl_list_info_t *) ret; + } + + if (psgl == NULL) { + *phandle = (sgl_handle_t) NULL; + return DMA_STATUS_OUT_OF_MEMORY; + } + + psgl->dma_addr = dma_addr; + psgl->dmanr = dmanr; + + /* + * Modify and save the control word. These words will be + * written to each sgl descriptor. The DMA engine then + * loads this control word into the control register + * every time it reads a new descriptor. + */ + psgl->control = p_dma_ch->control; + /* Clear all mode bits */ + psgl->control &= ~(DMA_TM_MASK | DMA_TD); + /* Save control word and mode */ + psgl->control |= (mode | DMA_CE_ENABLE); + + /* In MM mode, we must set ETD/TCE */ + if (mode == DMA_MODE_MM) + psgl->control |= DMA_ETD_OUTPUT | DMA_TCE_ENABLE; + + if (p_dma_ch->int_enable) { + /* Enable channel interrupt */ + psgl->control |= DMA_CIE_ENABLE; + } else { + psgl->control &= ~DMA_CIE_ENABLE; + } + + sg_command = mfdcr(DCRN_ASGC); + switch (dmanr) { + case 0: + sg_command |= SSG0_MASK_ENABLE; + break; + case 1: + sg_command |= SSG1_MASK_ENABLE; + break; + case 2: + sg_command |= SSG2_MASK_ENABLE; + break; + case 3: + sg_command |= SSG3_MASK_ENABLE; + break; + default: + printk("ppc4xx_alloc_dma_handle: bad channel: %d\n", dmanr); + ppc4xx_free_dma_handle((sgl_handle_t) psgl); + *phandle = (sgl_handle_t) NULL; + return DMA_STATUS_BAD_CHANNEL; + } + + /* Enable SGL control access */ + mtdcr(DCRN_ASGC, sg_command); + psgl->sgl_control = SG_ERI_ENABLE | SG_LINK; + + if (p_dma_ch->int_enable) { + if (p_dma_ch->tce_enable) + psgl->sgl_control |= SG_TCI_ENABLE; + else + psgl->sgl_control |= SG_ETI_ENABLE; + } + + *phandle = (sgl_handle_t) psgl; + return DMA_STATUS_GOOD; +} + +/* + * Destroy a scatter/gather list handle that was created by alloc_dma_handle(). + * The list must be empty (contain no elements). + */ +void +ppc4xx_free_dma_handle(sgl_handle_t handle) +{ + sgl_list_info_t *psgl = (sgl_list_info_t *) handle; + + if (!handle) { + printk("ppc4xx_free_dma_handle: got NULL\n"); + return; + } else if (psgl->phead) { + printk("ppc4xx_free_dma_handle: list not empty\n"); + return; + } else if (!psgl->dma_addr) { /* should never happen */ + printk("ppc4xx_free_dma_handle: no dma address\n"); + return; + } + + consistent_free((void *) psgl); +} + +EXPORT_SYMBOL(ppc4xx_alloc_dma_handle); +EXPORT_SYMBOL(ppc4xx_free_dma_handle); +EXPORT_SYMBOL(ppc4xx_add_dma_sgl); +EXPORT_SYMBOL(ppc4xx_delete_dma_sgl_element); +EXPORT_SYMBOL(ppc4xx_enable_dma_sgl); +EXPORT_SYMBOL(ppc4xx_disable_dma_sgl); +EXPORT_SYMBOL(ppc4xx_get_dma_sgl_residue); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/kernel/ppc_htab.c linux-2.4.23-pre8/arch/ppc/kernel/ppc_htab.c --- linux-2.4.22/arch/ppc/kernel/ppc_htab.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/kernel/ppc_htab.c 2003-10-22 22:47:38.000000000 +0000 @@ -113,7 +113,7 @@ { unsigned long mmcr0 = 0, pmc1 = 0, pmc2 = 0; int n = 0; -#ifdef CONFIG_PPC_STD_MMU +#if defined(CONFIG_PPC_STD_MMU) && !defined(CONFIG_PPC64BRIDGE) int valid; unsigned int kptes = 0, uptes = 0, zombie_ptes = 0; PTE *ptr; @@ -150,6 +150,7 @@ goto return_string; } +#ifndef CONFIG_PPC64BRIDGE for ( ptr = Hash ; ptr < Hash_end ; ptr++) { unsigned int ctx, mctx, vsid; @@ -177,6 +178,7 @@ if (!valid) zombie_ptes++; } +#endif n += sprintf( buffer + n, "PTE Hash Table Information\n" @@ -184,18 +186,22 @@ "Buckets\t\t: %lu\n" "Address\t\t: %08lx\n" "Entries\t\t: %lu\n" +#ifndef CONFIG_PPC64BRIDGE "User ptes\t: %u\n" "Kernel ptes\t: %u\n" "Zombies\t\t: %u\n" - "Percent full\t: %lu%%\n", - (unsigned long)(Hash_size>>10), + "Percent full\t: %lu%%\n" +#endif + , (unsigned long)(Hash_size>>10), (Hash_size/(sizeof(PTE)*8)), (unsigned long)Hash, - Hash_size/sizeof(PTE), - uptes, + Hash_size/sizeof(PTE) +#ifndef CONFIG_PPC64BRIDGE + , uptes, kptes, zombie_ptes, ((kptes+uptes)*100) / (Hash_size/sizeof(PTE)) +#endif ); n += sprintf( buffer + n, diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/kernel/ppc_ksyms.c linux-2.4.23-pre8/arch/ppc/kernel/ppc_ksyms.c --- linux-2.4.22/arch/ppc/kernel/ppc_ksyms.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/kernel/ppc_ksyms.c 2003-10-22 22:49:35.000000000 +0000 @@ -159,11 +159,14 @@ EXPORT_SYMBOL(_outsw_ns); EXPORT_SYMBOL(_insl_ns); EXPORT_SYMBOL(_outsl_ns); +EXPORT_SYMBOL(iopa); +EXPORT_SYMBOL(mm_ptov); EXPORT_SYMBOL(ioremap); +#ifdef CONFIG_PTE_64BIT +EXPORT_SYMBOL(ioremap64); +#endif EXPORT_SYMBOL(__ioremap); EXPORT_SYMBOL(iounmap); -EXPORT_SYMBOL(iopa); -EXPORT_SYMBOL(mm_ptov); #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) \ || defined(CONFIG_USB_STORAGE) || defined(CONFIG_USB_STORAGE_MODULE) @@ -176,8 +179,23 @@ EXPORT_SYMBOL_NOVERS(pci_dram_offset); EXPORT_SYMBOL(pci_alloc_consistent); EXPORT_SYMBOL(pci_free_consistent); +EXPORT_SYMBOL(pci_bus_io_base); +EXPORT_SYMBOL(pci_bus_io_base_phys); +EXPORT_SYMBOL(pci_bus_mem_base_phys); +EXPORT_SYMBOL(pci_bus_to_hose); +EXPORT_SYMBOL(pci_resource_to_bus); +EXPORT_SYMBOL(pci_phys_to_bus); +EXPORT_SYMBOL(pci_bus_to_phys); #endif /* CONFIG_PCI */ +#ifdef CONFIG_NOT_COHERENT_CACHE +EXPORT_SYMBOL(consistent_alloc); +EXPORT_SYMBOL(consistent_free); +EXPORT_SYMBOL(consistent_sync); +EXPORT_SYMBOL(consistent_sync_page); +EXPORT_SYMBOL(flush_dcache_all); +#endif + EXPORT_SYMBOL(start_thread); EXPORT_SYMBOL(kernel_thread); @@ -253,15 +271,8 @@ EXPORT_SYMBOL(get_property); EXPORT_SYMBOL(request_OF_resource); EXPORT_SYMBOL(release_OF_resource); -EXPORT_SYMBOL(pci_bus_io_base); -EXPORT_SYMBOL(pci_bus_io_base_phys); -EXPORT_SYMBOL(pci_bus_mem_base_phys); EXPORT_SYMBOL(pci_device_to_OF_node); EXPORT_SYMBOL(pci_device_from_OF_node); -EXPORT_SYMBOL(pci_bus_to_hose); -EXPORT_SYMBOL(pci_resource_to_bus); -EXPORT_SYMBOL(pci_phys_to_bus); -EXPORT_SYMBOL(pci_bus_to_phys); EXPORT_SYMBOL(pmac_newworld); EXPORT_SYMBOL(nvram_read_byte); EXPORT_SYMBOL(nvram_write_byte); @@ -291,7 +302,7 @@ EXPORT_SYMBOL(abs); -#ifdef CONFIG_VGA_CONSOLE +#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_FB) EXPORT_SYMBOL(screen_info); #endif @@ -338,11 +349,14 @@ EXPORT_SYMBOL(debugger_fault_handler); #endif -#ifdef CONFIG_8xx +#if defined(CONFIG_8xx) || defined(CONFIG_4xx) EXPORT_SYMBOL(__res); +#endif +#ifdef CONFIG_8xx EXPORT_SYMBOL(cpm_install_handler); EXPORT_SYMBOL(cpm_free_handler); EXPORT_SYMBOL(m8xx_cpm_hostalloc); +EXPORT_SYMBOL(m8xx_cpm_dpalloc); #endif /* CONFIG_8xx */ /* Those should really be inline */ @@ -370,4 +384,3 @@ extern unsigned long agp_special_page; EXPORT_SYMBOL_NOVERS(agp_special_page); #endif /* defined(CONFIG_ALL_PPC) */ - diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/kernel/process.c linux-2.4.23-pre8/arch/ppc/kernel/process.c --- linux-2.4.22/arch/ppc/kernel/process.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/kernel/process.c 2003-10-22 22:48:54.000000000 +0000 @@ -417,6 +417,7 @@ memset(current->thread.vr, 0, sizeof(current->thread.vr)); memset(¤t->thread.vscr, 0, sizeof(current->thread.vscr)); current->thread.vrsave = 0; + current->thread.used_vr = 0; #endif /* CONFIG_ALTIVEC */ } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/kernel/prom_init.c linux-2.4.23-pre8/arch/ppc/kernel/prom_init.c --- linux-2.4.22/arch/ppc/kernel/prom_init.c 2003-06-13 14:51:31.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/kernel/prom_init.c 2003-10-22 22:49:35.000000000 +0000 @@ -638,6 +638,72 @@ } } +#ifdef CONFIG_POWER4 +/* + * Set up a hash table with a set of entries in it to map the + * first 64MB of RAM. This is used on 64-bit machines since + * some of them don't have BATs. + * We assume the PTE will fit in the primary PTEG. + */ + +static inline void make_pte(unsigned long htab, unsigned int hsize, + unsigned int va, unsigned int pa, int mode) +{ + unsigned int *pteg; + unsigned int hash, i, vsid; + + vsid = ((va >> 28) * 0x111) << 12; + hash = ((va ^ vsid) >> 5) & 0x7fff80; + pteg = (unsigned int *)(htab + (hash & (hsize - 1))); + for (i = 0; i < 8; ++i, pteg += 4) { + if ((pteg[1] & 1) == 0) { + pteg[1] = vsid | ((va >> 16) & 0xf80) | 1; + pteg[3] = pa | mode; + break; + } + } +} + +extern unsigned long _SDR1; +extern PTE *Hash; +extern unsigned long Hash_size; + +static void __init +prom_alloc_htab(void) +{ + unsigned int hsize; + unsigned long htab; + unsigned int addr; + + /* + * Because of OF bugs we can't use the "claim" client + * interface to allocate memory for the hash table. + * This code is only used on 64-bit PPCs, and the only + * 64-bit PPCs at the moment are RS/6000s, and their + * OF is based at 0xc00000 (the 12M point), so we just + * arbitrarily use the 0x800000 - 0xc00000 region for the + * hash table. + * -- paulus. + */ + hsize = 4 << 20; /* POWER4 has no BATs */ + htab = (8 << 20); + call_prom("claim", 3, 1, htab, hsize, 0); + Hash = (void *)(htab + KERNELBASE); + Hash_size = hsize; + _SDR1 = htab + __ilog2(hsize) - 18; + + /* + * Put in PTEs for the first 64MB of RAM + */ + cacheable_memzero((void *)htab, hsize); + for (addr = 0; addr < 0x4000000; addr += 0x1000) + make_pte(htab, hsize, addr + KERNELBASE, addr, + _PAGE_ACCESSED | _PAGE_COHERENT | PP_RWXX); + make_pte(htab, hsize, 0x80013000, 0x80013000, + _PAGE_ACCESSED | _PAGE_NO_CACHE | _PAGE_GUARDED | PP_RWXX); +} +#endif /* CONFIG_POWER4 */ + static void __init prom_instantiate_rtas(void) { @@ -705,8 +771,7 @@ /* First get a handle for the stdout device */ prom = pp; - prom_chosen = call_prom("finddevice", 1, 1, - "/chosen"); + prom_chosen = call_prom("finddevice", 1, 1, "/chosen"); if (prom_chosen == (void *)-1) prom_exit(); if ((int) call_prom("getprop", 4, 1, prom_chosen, @@ -739,6 +804,14 @@ prom_instantiate_rtas(); +#ifdef CONFIG_POWER4 + /* + * Find out how much memory we have and allocate a + * suitably-sized hash table. + */ + prom_alloc_htab(); +#endif + mem = check_display(mem); prom_print("copying OF device tree..."); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/kernel/setup.c linux-2.4.23-pre8/arch/ppc/kernel/setup.c --- linux-2.4.22/arch/ppc/kernel/setup.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/kernel/setup.c 2003-10-22 22:49:41.000000000 +0000 @@ -152,12 +152,12 @@ return 0; pvr = cpu_data[i].pvr; lpj = cpu_data[i].loops_per_jiffy; - seq_printf(m, "processor\t: %lu\n", i); #else pvr = mfspr(PVR); lpj = loops_per_jiffy; #endif + seq_printf(m, "processor\t: %lu\n", i); seq_printf(m, "cpu\t\t: "); if (cur_cpu_spec[i]->pvr_mask) @@ -566,12 +566,10 @@ #if defined(CONFIG_KGDB) kgdb_map_scc(); set_debug_traps(); - if (strstr(cmd_line, "nokgdb")) - printk("kgdb default breakpoint deactivated on command line\n"); - else { + if (strstr(cmd_line, "gdb")) { if (ppc_md.progress) ppc_md.progress("setup_arch: kgdb breakpoint", 0x4000); - printk("kgdb default breakpoint activated\n"); + printk("kgdb breakpoint activated\n"); breakpoint(); } #endif diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/kernel/signal.c linux-2.4.23-pre8/arch/ppc/kernel/signal.c --- linux-2.4.22/arch/ppc/kernel/signal.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/kernel/signal.c 2003-10-22 22:48:42.000000000 +0000 @@ -40,17 +40,7 @@ #define GP_REGS_SIZE MIN(sizeof(elf_gregset_t), sizeof(struct pt_regs)) -/* - * These are the flags in the MSR that the user is allowed to change - * by modifying the saved value of the MSR on the stack. SE and BE - * should not be in this list since gdb may want to change these. I.e, - * you should be able to step out of a signal handler to see what - * instruction executes next after the signal handler completes. - * Alternately, if you stepped into a signal handler, you should be - * able to continue 'til the next breakpoint from within the signal - * handler, even if the handler returns. - */ -#define MSR_USERCHANGE (MSR_FE0 | MSR_FE1) +extern void syscall_direct_return(struct pt_regs *regs); int do_signal(sigset_t *oldset, struct pt_regs *regs); @@ -157,9 +147,9 @@ int -sys_sigaltstack(const stack_t *uss, stack_t *uoss) +sys_sigaltstack(const stack_t *uss, stack_t *uoss, int r5, int r6, + int r7, int r8, struct pt_regs *regs) { - struct pt_regs *regs = (struct pt_regs *) &uss; return do_sigaltstack(uss, uoss, regs->gpr[1]); } @@ -199,378 +189,403 @@ * When we have signals to deliver, we set up on the * user stack, going down from the original stack pointer: * a sigregs struct - * one or more sigcontext structs with + * a sigcontext struct * a gap of __SIGNAL_FRAMESIZE bytes * * Each of these things must be a multiple of 16 bytes in size. * */ struct sigregs { - elf_gregset_t gp_regs; - double fp_regs[ELF_NFPREG]; - unsigned long tramp[2]; + struct mcontext mctx; /* all the register values */ /* Programs using the rs6000/xcoff abi can save up to 19 gp regs and 18 fp regs below sp before decrementing it. */ int abigap[56]; }; -struct rt_sigframe -{ - unsigned long _unused[2]; - struct siginfo *pinfo; - void *puc; - struct siginfo info; - struct ucontext uc; -}; - +/* We use the mc_pad field for the signal return trampoline. */ +#define tramp mc_pad /* * When we have rt signals to deliver, we set up on the * user stack, going down from the original stack pointer: - * a sigregs struct - * one rt_sigframe struct (siginfo + ucontext) - * a gap of __SIGNAL_FRAMESIZE bytes + * one rt_sigframe struct (siginfo + ucontext + ABI gap) + * a gap of __SIGNAL_FRAMESIZE+16 bytes + * (the +16 is to get the siginfo and ucontext in the same + * positions as in older kernels). * * Each of these things must be a multiple of 16 bytes in size. * */ -int sys_rt_sigreturn(struct pt_regs *regs) +struct rt_sigframe { - struct rt_sigframe *rt_sf; - struct sigcontext_struct sigctx; - struct sigregs *sr; - int ret; - elf_gregset_t saved_regs; /* an array of ELF_NGREG unsigned longs */ - sigset_t set; - stack_t st; - unsigned long prevsp; + struct siginfo info; + struct ucontext uc; + /* Programs using the rs6000/xcoff abi can save up to 19 gp regs + and 18 fp regs below sp before decrementing it. */ + int abigap[56]; +}; - rt_sf = (struct rt_sigframe *)(regs->gpr[1] + __SIGNAL_FRAMESIZE); - if (copy_from_user(&sigctx, &rt_sf->uc.uc_mcontext, sizeof(sigctx)) - || copy_from_user(&set, &rt_sf->uc.uc_sigmask, sizeof(set)) - || copy_from_user(&st, &rt_sf->uc.uc_stack, sizeof(st))) - goto badframe; - sigdelsetmask(&set, ~_BLOCKABLE); - spin_lock_irq(¤t->sigmask_lock); - current->blocked = set; - recalc_sigpending(current); - spin_unlock_irq(¤t->sigmask_lock); +/* + * Save the current user registers on the user stack. + * We only save the altivec registers if the process has used + * altivec instructions at some point. + */ +static int +save_user_regs(struct pt_regs *regs, struct mcontext *frame, int sigret) +{ + /* save general and floating-point registers */ if (regs->msr & MSR_FP) giveup_fpu(current); + if (__copy_to_user(&frame->mc_gregs, regs, GP_REGS_SIZE) + || __copy_to_user(&frame->mc_fregs, current->thread.fpr, + ELF_NFPREG * sizeof(double))) + return 1; + + current->thread.fpscr = 0; /* turn off all fp exceptions */ - rt_sf++; /* Look at next rt_sigframe */ - if (rt_sf == (struct rt_sigframe *)(sigctx.regs)) { - /* Last stacked signal - restore registers - - * sigctx is initialized to point to the - * preamble frame (where registers are stored) - * see handle_signal() - */ - sr = (struct sigregs *) sigctx.regs; - if (copy_from_user(saved_regs, &sr->gp_regs, - sizeof(sr->gp_regs))) - goto badframe; - saved_regs[PT_MSR] = (regs->msr & ~MSR_USERCHANGE) - | (saved_regs[PT_MSR] & MSR_USERCHANGE); - memcpy(regs, saved_regs, GP_REGS_SIZE); - if (copy_from_user(current->thread.fpr, &sr->fp_regs, - sizeof(sr->fp_regs))) - goto badframe; - /* This function sets back the stack flags into - the current task structure. */ - sys_sigaltstack(&st, NULL); - - ret = regs->result; - } else { - /* More signals to go */ - /* Set up registers for next signal handler */ - regs->gpr[1] = (unsigned long)rt_sf - __SIGNAL_FRAMESIZE; - if (copy_from_user(&sigctx, &rt_sf->uc.uc_mcontext, sizeof(sigctx))) - goto badframe; - sr = (struct sigregs *) sigctx.regs; - regs->gpr[3] = ret = sigctx.signal; - /* Get the siginfo */ - get_user(regs->gpr[4], (unsigned long *)&rt_sf->pinfo); - /* Get the ucontext */ - get_user(regs->gpr[5], (unsigned long *)&rt_sf->puc); - regs->gpr[6] = (unsigned long) rt_sf; - - regs->link = (unsigned long) &sr->tramp; - regs->nip = sigctx.handler; - if (get_user(prevsp, &sr->gp_regs[PT_R1]) - || put_user(prevsp, (unsigned long *) regs->gpr[1])) - goto badframe; - current->thread.fpscr = 0; +#ifdef CONFIG_ALTIVEC + /* save altivec registers */ + if (current->thread.used_vr) { + if (regs->msr & MSR_VEC) + giveup_altivec(current); + if (__copy_to_user(&frame->mc_vregs, current->thread.vr, + ELF_NVRREG * sizeof(vector128))) + return 1; + /* set MSR_VEC in the saved MSR value to indicate that + frame->mc_vregs contains valid data */ + if (__put_user(regs->msr | MSR_VEC, &frame->mc_gregs[PT_MSR])) + return 1; + } + /* else assert((regs->msr & MSR_VEC) == 0) */ + + /* We always copy to/from vrsave, it's 0 if we don't have or don't + * use altivec. Since VSCR only contains 32 bits saved in the least + * significant bits of a vector, we "cheat" and stuff VRSAVE in the + * most significant bits of that same vector. --BenH + */ + if (__put_user(current->thread.vrsave, (u32 *)&frame->mc_vregs[32])) + return 1; +#endif /* CONFIG_ALTIVEC */ + + if (sigret) { + /* Set up the sigreturn trampoline: li r0,sigret; sc */ + if (__put_user(0x38000000UL + sigret, &frame->tramp[0]) + || __put_user(0x44000002UL, &frame->tramp[1])) + return 1; + flush_icache_range((unsigned long) &frame->tramp[0], + (unsigned long) &frame->tramp[2]); } - return ret; -badframe: - do_exit(SIGSEGV); + return 0; +} + +/* + * Restore the current user register values from the user stack, + * (except for MSR). + */ +static int +restore_user_regs(struct pt_regs *regs, struct mcontext *sr) +{ +#ifdef CONFIG_ALTIVEC + unsigned long msr; +#endif + + /* copy up to but not including MSR */ + if (__copy_from_user(regs, &sr->mc_gregs, PT_MSR * sizeof(elf_greg_t))) + return 1; + /* copy from orig_r3 (the word after the MSR) up to the end */ + if (__copy_from_user(®s->orig_gpr3, &sr->mc_gregs[PT_ORIG_R3], + GP_REGS_SIZE - PT_ORIG_R3 * sizeof(elf_greg_t))) + return 1; + + /* force the process to reload the FP registers from + current->thread when it next does FP instructions */ + regs->msr &= ~MSR_FP; + if (__copy_from_user(current->thread.fpr, &sr->mc_fregs, + sizeof(sr->mc_fregs))) + return 1; + +#ifdef CONFIG_ALTIVEC + /* force the process to reload the altivec registers from + current->thread when it next does altivec instructions */ + regs->msr &= ~MSR_VEC; + if (!__get_user(msr, &sr->mc_gregs[PT_MSR]) && (msr & MSR_VEC) != 0) { + /* restore altivec registers from the stack */ + if (__copy_from_user(current->thread.vr, &sr->mc_vregs, + sizeof(sr->mc_vregs))) + return 1; + } else if (current->thread.used_vr) + memset(¤t->thread.vr, 0, ELF_NVRREG * sizeof(vector128)); + + /* Always get VRSAVE back */ + if (__get_user(current->thread.vrsave, (u32 *)&sr->mc_vregs[32])) + return 1; +#endif /* CONFIG_ALTIVEC */ + + return 0; +} + +/* + * Restore the user process's signal mask + */ +static void +restore_sigmask(sigset_t *set) +{ + sigdelsetmask(set, ~_BLOCKABLE); + spin_lock_irq(¤t->sigmask_lock); + current->blocked = *set; + recalc_sigpending(current); + spin_unlock_irq(¤t->sigmask_lock); } +/* + * Set up a signal frame for a "real-time" signal handler + * (one which gets siginfo). + */ static void -setup_rt_frame(struct pt_regs *regs, struct sigregs *frame, - signed long newsp) +handle_rt_signal(unsigned long sig, struct k_sigaction *ka, + siginfo_t *info, sigset_t *oldset, struct pt_regs * regs, + unsigned long newsp) { - struct rt_sigframe *rt_sf = (struct rt_sigframe *) newsp; + struct rt_sigframe *rt_sf; + struct mcontext *frame; + unsigned long origsp = newsp; + + /* Set up Signal Frame */ + /* Put a Real Time Context onto stack */ + newsp -= sizeof(*rt_sf); + rt_sf = (struct rt_sigframe *) newsp; - /* Set up preamble frame */ - if (verify_area(VERIFY_WRITE, frame, sizeof(*frame))) + /* create a stack frame for the caller of the handler */ + newsp -= __SIGNAL_FRAMESIZE + 16; + + if (verify_area(VERIFY_WRITE, (void *) newsp, origsp - newsp)) goto badframe; - if (regs->msr & MSR_FP) - giveup_fpu(current); - if (__copy_to_user(&frame->gp_regs, regs, GP_REGS_SIZE) - || __copy_to_user(&frame->fp_regs, current->thread.fpr, - ELF_NFPREG * sizeof(double)) - /* Set up to return from user space. - It calls the sc exception at offset 0x9999 - for sys_rt_sigreturn(). - */ - || __put_user(0x38006666UL, &frame->tramp[0]) /* li r0,0x6666 */ - || __put_user(0x44000002UL, &frame->tramp[1])) /* sc */ + + /* Put the siginfo & fill in most of the ucontext */ + if (__copy_to_user(&rt_sf->info, info, sizeof(*info)) + || __put_user(0, &rt_sf->uc.uc_flags) + || __put_user(0, &rt_sf->uc.uc_link) + || __put_user(current->sas_ss_sp, &rt_sf->uc.uc_stack.ss_sp) + || __put_user(sas_ss_flags(regs->gpr[1]), + &rt_sf->uc.uc_stack.ss_flags) + || __put_user(current->sas_ss_size, &rt_sf->uc.uc_stack.ss_size) + || __put_user(&rt_sf->uc.uc_mcontext, &rt_sf->uc.uc_regs) + || __copy_to_user(&rt_sf->uc.uc_sigmask, oldset, sizeof(*oldset))) goto badframe; - flush_icache_range((unsigned long) &frame->tramp[0], - (unsigned long) &frame->tramp[2]); - current->thread.fpscr = 0; /* turn off all fp exceptions */ - /* Retrieve rt_sigframe from stack and - set up registers for signal handler - */ - newsp -= __SIGNAL_FRAMESIZE; - if (put_user(regs->gpr[1], (unsigned long *)newsp) - || get_user(regs->nip, &rt_sf->uc.uc_mcontext.handler) - || get_user(regs->gpr[3], &rt_sf->uc.uc_mcontext.signal) - || get_user(regs->gpr[4], (unsigned long *)&rt_sf->pinfo) - || get_user(regs->gpr[5], (unsigned long *)&rt_sf->puc)) + /* Save user registers on the stack */ + frame = &rt_sf->uc.uc_mcontext; + if (save_user_regs(regs, frame, 0x6666)) goto badframe; + if (put_user(regs->gpr[1], (unsigned long *)newsp)) + goto badframe; regs->gpr[1] = newsp; + regs->gpr[3] = sig; + regs->gpr[4] = (unsigned long) &rt_sf->info; + regs->gpr[5] = (unsigned long) &rt_sf->uc; regs->gpr[6] = (unsigned long) rt_sf; + regs->nip = (unsigned long) ka->sa.sa_handler; regs->link = (unsigned long) frame->tramp; return; badframe: #if DEBUG_SIG - printk("badframe in setup_rt_frame, regs=%p frame=%p newsp=%lx\n", + printk("badframe in handle_rt_signal, regs=%p frame=%p newsp=%lx\n", regs, frame, newsp); #endif - do_exit(SIGSEGV); + if (sig == SIGSEGV) + ka->sa.sa_handler = SIG_DFL; + force_sig(SIGSEGV, current); } -/* - * Do a signal return; undo the signal stack. - */ -int sys_sigreturn(struct pt_regs *regs) +static int do_setcontext(struct ucontext *ucp, struct pt_regs *regs) { - struct sigcontext_struct *sc, sigctx; - struct sigregs *sr; - int ret; - elf_gregset_t saved_regs; /* an array of ELF_NGREG unsigned longs */ sigset_t set; - unsigned long prevsp; + struct mcontext *mcp; - sc = (struct sigcontext_struct *)(regs->gpr[1] + __SIGNAL_FRAMESIZE); - if (copy_from_user(&sigctx, sc, sizeof(sigctx))) - goto badframe; + if (__copy_from_user(&set, &ucp->uc_sigmask, sizeof(set)) + || __get_user(mcp, &ucp->uc_regs)) + return -EFAULT; + restore_sigmask(&set); + if (restore_user_regs(regs, mcp)) + return -EFAULT; - set.sig[0] = sigctx.oldmask; -#if _NSIG_WORDS > 1 - set.sig[1] = sigctx._unused[3]; -#endif - sigdelsetmask(&set, ~_BLOCKABLE); - spin_lock_irq(¤t->sigmask_lock); - current->blocked = set; - recalc_sigpending(current); - spin_unlock_irq(¤t->sigmask_lock); - if (regs->msr & MSR_FP ) - giveup_fpu(current); + return 0; +} + +int sys_swapcontext(struct ucontext *old_ctx, struct ucontext *new_ctx, + int r5, int r6, int r7, int r8, struct pt_regs *regs) +{ + unsigned char tmp; - sc++; /* Look at next sigcontext */ - if (sc == (struct sigcontext_struct *)(sigctx.regs)) { - /* Last stacked signal - restore registers */ - sr = (struct sigregs *) sigctx.regs; - if (copy_from_user(saved_regs, &sr->gp_regs, - sizeof(sr->gp_regs))) - goto badframe; - saved_regs[PT_MSR] = (regs->msr & ~MSR_USERCHANGE) - | (saved_regs[PT_MSR] & MSR_USERCHANGE); - memcpy(regs, saved_regs, GP_REGS_SIZE); - - if (copy_from_user(current->thread.fpr, &sr->fp_regs, - sizeof(sr->fp_regs))) - goto badframe; - - ret = regs->result; - - } else { - /* More signals to go */ - regs->gpr[1] = (unsigned long)sc - __SIGNAL_FRAMESIZE; - if (copy_from_user(&sigctx, sc, sizeof(sigctx))) - goto badframe; - sr = (struct sigregs *) sigctx.regs; - regs->gpr[3] = ret = sigctx.signal; - regs->gpr[4] = (unsigned long) sc; - regs->link = (unsigned long) &sr->tramp; - regs->nip = sigctx.handler; - - if (get_user(prevsp, &sr->gp_regs[PT_R1]) - || put_user(prevsp, (unsigned long *) regs->gpr[1])) - goto badframe; - current->thread.fpscr = 0; + if (old_ctx != NULL) { + if (verify_area(VERIFY_WRITE, old_ctx, sizeof(*old_ctx)) + || save_user_regs(regs, &old_ctx->uc_mcontext, 0) + || __copy_to_user(&old_ctx->uc_sigmask, + ¤t->blocked, sizeof(sigset_t)) + || __put_user(&old_ctx->uc_mcontext, &old_ctx->uc_regs)) + return -EFAULT; } - return ret; + if (new_ctx == NULL) + return 0; + if (verify_area(VERIFY_READ, new_ctx, sizeof(*new_ctx)) + || __get_user(tmp, (u8 *) new_ctx) + || __get_user(tmp, (u8 *) (new_ctx + 1) - 1)) + return -EFAULT; -badframe: - do_exit(SIGSEGV); + /* + * If we get a fault copying the context into the kernel's + * image of the user's registers, we can't just return -EFAULT + * because the user's registers will be corrupted. For instance + * the NIP value may have been updated but not some of the + * other registers. Given that we have done the verify_area + * and successfully read the first and last bytes of the region + * above, this should only happen in an out-of-memory situation + * or if another thread unmaps the region containing the context. + * We kill the task with a SIGSEGV in this situation. + */ + if (do_setcontext(new_ctx, regs)) + do_exit(SIGSEGV); + syscall_direct_return(regs); + /* doesn't actually return back to here */ + return 0; +} + +int sys_rt_sigreturn(struct pt_regs *regs) +{ + struct rt_sigframe *rt_sf; + stack_t st; + + rt_sf = (struct rt_sigframe *)(regs->gpr[1] + __SIGNAL_FRAMESIZE + 16); + if (verify_area(VERIFY_READ, rt_sf, sizeof(struct rt_sigframe))) + goto bad; + if (do_setcontext(&rt_sf->uc, regs)) + goto bad; + + /* + * It's not clear whether or why it is desirable to save the + * sigaltstack setting on signal delivery and restore it on + * signal return. But other architectures do this and we have + * always done it up until now so it is probably better not to + * change it. -- paulus + */ + if (__copy_from_user(&st, &rt_sf->uc.uc_stack, sizeof(st))) + goto bad; + do_sigaltstack(&st, NULL, regs->gpr[1]); + + return regs->result; + + bad: + force_sig(SIGSEGV, current); + return 0; } /* - * Set up a signal frame. + * OK, we're invoking a handler */ static void -setup_frame(struct pt_regs *regs, struct sigregs *frame, - unsigned long newsp) +handle_signal(unsigned long sig, struct k_sigaction *ka, + siginfo_t *info, sigset_t *oldset, struct pt_regs * regs, + unsigned long newsp) { - struct sigcontext_struct *sc = (struct sigcontext_struct *) newsp; + struct sigcontext *sc; + struct sigregs *frame; + unsigned long origsp = newsp; + + /* Set up Signal Frame */ + newsp -= sizeof(struct sigregs); + frame = (struct sigregs *) newsp; + + /* Put a sigcontext on the stack */ + newsp -= sizeof(*sc); + sc = (struct sigcontext *) newsp; + + /* create a stack frame for the caller of the handler */ + newsp -= __SIGNAL_FRAMESIZE; - if (verify_area(VERIFY_WRITE, frame, sizeof(*frame))) + if (verify_area(VERIFY_WRITE, (void *) newsp, origsp - newsp)) goto badframe; - if (regs->msr & MSR_FP) - giveup_fpu(current); - if (__copy_to_user(&frame->gp_regs, regs, GP_REGS_SIZE) - || __copy_to_user(&frame->fp_regs, current->thread.fpr, - ELF_NFPREG * sizeof(double)) - || __put_user(0x38007777UL, &frame->tramp[0]) /* li r0,0x7777 */ - || __put_user(0x44000002UL, &frame->tramp[1])) /* sc */ + +#if _NSIG != 64 +#error "Please adjust handle_signal()" +#endif + if (__put_user((unsigned long) ka->sa.sa_handler, &sc->handler) + || __put_user(oldset->sig[0], &sc->oldmask) + || __put_user(oldset->sig[1], &sc->_unused[3]) + || __put_user((struct pt_regs *)frame, &sc->regs) + || __put_user(sig, &sc->signal)) goto badframe; - flush_icache_range((unsigned long) &frame->tramp[0], - (unsigned long) &frame->tramp[2]); - current->thread.fpscr = 0; /* turn off all fp exceptions */ - newsp -= __SIGNAL_FRAMESIZE; - if (put_user(regs->gpr[1], (unsigned long *)newsp) - || get_user(regs->nip, &sc->handler) - || get_user(regs->gpr[3], &sc->signal)) + if (save_user_regs(regs, &frame->mctx, 0x7777)) + goto badframe; + + if (put_user(regs->gpr[1], (unsigned long *)newsp)) goto badframe; regs->gpr[1] = newsp; + regs->gpr[3] = sig; regs->gpr[4] = (unsigned long) sc; - regs->link = (unsigned long) frame->tramp; + regs->nip = (unsigned long) ka->sa.sa_handler; + regs->link = (unsigned long) frame->mctx.tramp; return; badframe: #if DEBUG_SIG - printk("badframe in setup_frame, regs=%p frame=%p newsp=%lx\n", - regs, frame, newsp); + printk("badframe in handle_signal, regs=%p frame=%lx newsp=%lx\n", + regs, frame, *newspp); #endif - do_exit(SIGSEGV); + if (sig == SIGSEGV) + ka->sa.sa_handler = SIG_DFL; + force_sig(SIGSEGV, current); } /* - * OK, we're invoking a handler + * Do a signal return; undo the signal stack. */ -static void -handle_signal(unsigned long sig, struct k_sigaction *ka, - siginfo_t *info, sigset_t *oldset, struct pt_regs * regs, - unsigned long *newspp, unsigned long frame) +int sys_sigreturn(struct pt_regs *regs) { - struct sigcontext_struct *sc; - struct rt_sigframe *rt_sf; + struct sigcontext *sc, sigctx; + struct mcontext *sr; + int ret; + sigset_t set; - if (regs->trap == 0x0C00 /* System Call! */ - && ((int)regs->result == -ERESTARTNOHAND || - ((int)regs->result == -ERESTARTSYS && - !(ka->sa.sa_flags & SA_RESTART)))) - regs->result = -EINTR; + sc = (struct sigcontext *)(regs->gpr[1] + __SIGNAL_FRAMESIZE); + if (copy_from_user(&sigctx, sc, sizeof(sigctx))) + goto badframe; - /* Set up Signal Frame */ - if (ka->sa.sa_flags & SA_SIGINFO) { - /* Put a Real Time Context onto stack */ - *newspp -= sizeof(*rt_sf); - rt_sf = (struct rt_sigframe *) *newspp; - if (verify_area(VERIFY_WRITE, rt_sf, sizeof(*rt_sf))) - goto badframe; - - if (__put_user((unsigned long) ka->sa.sa_handler, &rt_sf->uc.uc_mcontext.handler) - || __put_user(&rt_sf->info, &rt_sf->pinfo) - || __put_user(&rt_sf->uc, &rt_sf->puc) - /* Put the siginfo */ - || __copy_to_user(&rt_sf->info, info, sizeof(*info)) - /* Create the ucontext */ - || __put_user(0, &rt_sf->uc.uc_flags) - || __put_user(0, &rt_sf->uc.uc_link) - || __put_user(current->sas_ss_sp, &rt_sf->uc.uc_stack.ss_sp) - || __put_user(sas_ss_flags(regs->gpr[1]), - &rt_sf->uc.uc_stack.ss_flags) - || __put_user(current->sas_ss_size, &rt_sf->uc.uc_stack.ss_size) - || __copy_to_user(&rt_sf->uc.uc_sigmask, oldset, sizeof(*oldset)) - /* mcontext.regs points to preamble register frame */ - || __put_user((struct pt_regs *)frame, &rt_sf->uc.uc_mcontext.regs) - || __put_user(sig, &rt_sf->uc.uc_mcontext.signal)) - goto badframe; - } else { - /* Put another sigcontext on the stack */ - *newspp -= sizeof(*sc); - sc = (struct sigcontext_struct *) *newspp; - if (verify_area(VERIFY_WRITE, sc, sizeof(*sc))) - goto badframe; - - if (__put_user((unsigned long) ka->sa.sa_handler, &sc->handler) - || __put_user(oldset->sig[0], &sc->oldmask) -#if _NSIG_WORDS > 1 - || __put_user(oldset->sig[1], &sc->_unused[3]) -#endif - || __put_user((struct pt_regs *)frame, &sc->regs) - || __put_user(sig, &sc->signal)) - goto badframe; - } + set.sig[0] = sigctx.oldmask; + set.sig[1] = sigctx._unused[3]; + restore_sigmask(&set); - if (ka->sa.sa_flags & SA_ONESHOT) - ka->sa.sa_handler = SIG_DFL; + sr = (struct mcontext *) sigctx.regs; + if (verify_area(VERIFY_READ, sr, sizeof(*sr)) + || restore_user_regs(regs, sr)) + goto badframe; - if (!(ka->sa.sa_flags & SA_NODEFER)) { - spin_lock_irq(¤t->sigmask_lock); - sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask); - sigaddset(¤t->blocked,sig); - recalc_sigpending(current); - spin_unlock_irq(¤t->sigmask_lock); - } - return; + ret = regs->result; + + return ret; badframe: -#if DEBUG_SIG - printk("badframe in handle_signal, regs=%p frame=%lx newsp=%lx\n", - regs, frame, *newspp); - printk("sc=%p sig=%d ka=%p info=%p oldset=%p\n", sc, sig, ka, info, oldset); -#endif - do_exit(SIGSEGV); -} + force_sig(SIGSEGV, current); + return 0; +} -/* - * Note that 'init' is a special process: it doesn't get signals it doesn't - * want to handle. Thus you cannot kill init even with a SIGKILL even by - * mistake. - */ -int do_signal(sigset_t *oldset, struct pt_regs *regs) +static int get_signal_to_deliver(struct siginfo *infop, struct pt_regs *regs) { - siginfo_t info; struct k_sigaction *ka; - unsigned long frame, newsp; - - if (!oldset) - oldset = ¤t->blocked; - - newsp = frame = 0; + int signr; for (;;) { - unsigned long signr; - spin_lock_irq(¤t->sigmask_lock); - signr = dequeue_signal(¤t->blocked, &info); + signr = dequeue_signal(¤t->blocked, infop); spin_unlock_irq(¤t->sigmask_lock); if (!signr) - break; + return 0; if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) { /* Let the debugger run. */ @@ -589,17 +604,17 @@ continue; /* Update the siginfo structure. Is this good? */ - if (signr != info.si_signo) { - info.si_signo = signr; - info.si_errno = 0; - info.si_code = SI_USER; - info.si_pid = current->p_pptr->pid; - info.si_uid = current->p_pptr->uid; + if (signr != infop->si_signo) { + infop->si_signo = signr; + infop->si_errno = 0; + infop->si_code = SI_USER; + infop->si_pid = current->p_pptr->pid; + infop->si_uid = current->p_pptr->uid; } /* If the (new) signal is now blocked, requeue it. */ if (sigismember(¤t->blocked, signr)) { - send_sig_info(signr, &info, current); + send_sig_info(signr, infop, current); continue; } } @@ -646,39 +661,85 @@ /* FALLTHRU */ default: - sig_exit(signr, exit_code, &info); + sig_exit(signr, exit_code, infop); /* NOTREACHED */ } } + return signr; + } +} - if ( (ka->sa.sa_flags & SA_ONSTACK) - && (! on_sig_stack(regs->gpr[1]))) - newsp = (current->sas_ss_sp + current->sas_ss_size); - else - newsp = regs->gpr[1]; - newsp = frame = newsp - sizeof(struct sigregs); - - /* Whee! Actually deliver the signal. */ - handle_signal(signr, ka, &info, oldset, regs, &newsp, frame); - break; - } - - if (regs->trap == 0x0C00 /* System Call! */ && - ((int)regs->result == -ERESTARTNOHAND || - (int)regs->result == -ERESTARTSYS || - (int)regs->result == -ERESTARTNOINTR)) { - regs->gpr[3] = regs->orig_gpr3; - regs->nip -= 4; /* Back up & retry system call */ - regs->result = 0; +/* + * Note that 'init' is a special process: it doesn't get signals it doesn't + * want to handle. Thus you cannot kill init even with a SIGKILL even by + * mistake. + */ +int do_signal(sigset_t *oldset, struct pt_regs *regs) +{ + siginfo_t info; + struct k_sigaction *ka; + unsigned long frame, newsp; + int signr; + + if (!oldset) + oldset = ¤t->blocked; + + newsp = frame = 0; + + signr = get_signal_to_deliver(&info, regs); + + ka = (signr == 0)? NULL: ¤t->sig->action[signr-1]; + + if (regs->trap == 0xc00) { /* system call */ + switch ((int) regs->result) { + case -ERESTARTSYS: + if (signr == 0 || (ka->sa.sa_flags & SA_RESTART)) + goto retry; + /* fall through */ + case -ERESTARTNOHAND: + if (signr > 0) { + /* make the system call return an EINTR */ + regs->result = -EINTR; + break; + } + /* fall through */ + case -ERESTARTNOINTR: + retry: + /* Back up & retry system call */ + regs->gpr[3] = regs->orig_gpr3; + regs->nip -= 4; + regs->result = 0; + break; + } } - if (newsp == frame) + if (signr == 0) return 0; /* no signals delivered */ + if ((ka->sa.sa_flags & SA_ONSTACK) && current->sas_ss_size + && !on_sig_stack(regs->gpr[1])) + newsp = current->sas_ss_sp + current->sas_ss_size; + else + newsp = regs->gpr[1]; + newsp &= ~0xfUL; + + /* Whee! Actually deliver the signal. */ if (ka->sa.sa_flags & SA_SIGINFO) - setup_rt_frame(regs, (struct sigregs *) frame, newsp); + handle_rt_signal(signr, ka, &info, oldset, regs, newsp); else - setup_frame(regs, (struct sigregs *) frame, newsp); + handle_signal(signr, ka, &info, oldset, regs, newsp); + + if (ka->sa.sa_flags & SA_ONESHOT) + ka->sa.sa_handler = SIG_DFL; + + if (!(ka->sa.sa_flags & SA_NODEFER)) { + spin_lock_irq(¤t->sigmask_lock); + sigorsets(¤t->blocked,¤t->blocked,&ka->sa.sa_mask); + sigaddset(¤t->blocked, signr); + recalc_sigpending(current); + spin_unlock_irq(¤t->sigmask_lock); + } + return 1; } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/kernel/syscalls.c linux-2.4.23-pre8/arch/ppc/kernel/syscalls.c --- linux-2.4.22/arch/ppc/kernel/syscalls.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/kernel/syscalls.c 2003-10-22 22:49:43.000000000 +0000 @@ -57,7 +57,7 @@ * This is really horribly ugly. */ int -sys_ipc (uint call, int first, int second, int third, void *ptr, long fifth) +sys_ipc(uint call, int first, int second, int third, void *ptr, long fifth) { int version, ret; @@ -67,24 +67,28 @@ ret = -EINVAL; switch (call) { case SEMOP: - ret = sys_semop (first, (struct sembuf *)ptr, second); + ret = sys_semtimedop(first, (struct sembuf *)ptr, second, NULL); + break; + case SEMTIMEDOP: + ret = sys_semtimedop(first, (struct sembuf *)ptr, second, + (const struct timespec *)fifth); break; case SEMGET: - ret = sys_semget (first, second, third); + ret = sys_semget(first, second, third); break; case SEMCTL: { union semun fourth; if (!ptr) break; - if ((ret = verify_area (VERIFY_READ, ptr, sizeof(long))) + if ((ret = verify_area(VERIFY_READ, ptr, sizeof(long))) || (ret = get_user(fourth.__pad, (void **)ptr))) break; - ret = sys_semctl (first, second, third, fourth); + ret = sys_semctl(first, second, third, fourth); break; } case MSGSND: - ret = sys_msgsnd (first, (struct msgbuf *) ptr, second, third); + ret = sys_msgsnd(first, (struct msgbuf *) ptr, second, third); break; case MSGRCV: switch (version) { @@ -93,26 +97,26 @@ if (!ptr) break; - if ((ret = verify_area (VERIFY_READ, ptr, sizeof(tmp))) + if ((ret = verify_area(VERIFY_READ, ptr, sizeof(tmp))) || (ret = copy_from_user(&tmp, (struct ipc_kludge *) ptr, sizeof (tmp)))) break; - ret = sys_msgrcv (first, tmp.msgp, second, tmp.msgtyp, - third); + ret = sys_msgrcv(first, tmp.msgp, second, tmp.msgtyp, + third); break; } default: - ret = sys_msgrcv (first, (struct msgbuf *) ptr, - second, fifth, third); + ret = sys_msgrcv(first, (struct msgbuf *) ptr, + second, fifth, third); break; } break; case MSGGET: - ret = sys_msgget ((key_t) first, second); + ret = sys_msgget((key_t) first, second); break; case MSGCTL: - ret = sys_msgctl (first, second, (struct msqid_ds *) ptr); + ret = sys_msgctl(first, second, (struct msqid_ds *) ptr); break; case SHMAT: switch (version) { @@ -122,29 +126,31 @@ if ((ret = verify_area(VERIFY_WRITE, (ulong*) third, sizeof(ulong)))) break; - ret = sys_shmat (first, (char *) ptr, second, &raddr); + ret = sys_shmat(first, (char *) ptr, second, &raddr); if (ret) break; - ret = put_user (raddr, (ulong *) third); + ret = put_user(raddr, (ulong *) third); break; } case 1: /* iBCS2 emulator entry point */ if (!segment_eq(get_fs(), get_ds())) break; - ret = sys_shmat (first, (char *) ptr, second, - (ulong *) third); + ret = sys_shmat(first, (char *) ptr, second, + (ulong *) third); break; } break; case SHMDT: - ret = sys_shmdt ((char *)ptr); + ret = sys_shmdt((char *)ptr); break; case SHMGET: - ret = sys_shmget (first, second, third); + ret = sys_shmget(first, second, third); break; case SHMCTL: - ret = sys_shmctl (first, second, (struct shmid_ds *) ptr); + ret = sys_shmctl(first, second, (struct shmid_ds *) ptr); break; + default: + ret = -ENOSYS; } return ret; @@ -167,6 +173,16 @@ return error; } +#ifndef CONFIG_40x +#define allow_mmap_address(addr) 1 +#else +/* Blech. On 40x allowing mmap() (MAP_FIXED) at the first few pages + * of (any process's) virtual memory is a security hole due to chip + * erratum #67 (and possibly also due to the (documented) bizarre + * prefetch behaviour around 'sc' see S3.8.2.1 of the user manual). */ +#define allow_mmap_address(addr) ((((addr) & PAGE_MASK) >= 0x2100) || suser()) +#endif + static inline unsigned long do_mmap2(unsigned long addr, size_t len, unsigned long prot, unsigned long flags, @@ -181,6 +197,10 @@ goto out; } + ret = -EINVAL; + if ((! allow_mmap_address(addr)) && (flags & MAP_FIXED)) + goto out; + down_write(¤t->mm->mmap_sem); ret = do_mmap_pgoff(file, addr, len, prot, flags, pgoff); up_write(¤t->mm->mmap_sem); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/kernel/traps.c linux-2.4.23-pre8/arch/ppc/kernel/traps.c --- linux-2.4.22/arch/ppc/kernel/traps.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/kernel/traps.c 2003-10-22 22:48:00.000000000 +0000 @@ -1,5 +1,5 @@ /* - * linux/arch/ppc/kernel/traps.c + * arch/ppc/kernel/traps.c * * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) * @@ -173,6 +173,10 @@ #define REASON_PRIVILEGED ESR_PPR #define REASON_TRAP ESR_PTR +/* single-step stuff */ +#define single_stepping(regs) (current->thread.dbcr0 & DBCR0_IC) +#define clear_single_step(regs) (current->thread.dbcr0 &= ~DBCR0_IC) + #else /* On non-4xx, the reason for the machine check or program exception is in the MSR. */ @@ -181,6 +185,9 @@ #define REASON_ILLEGAL 0x80000 #define REASON_PRIVILEGED 0x40000 #define REASON_TRAP 0x20000 + +#define single_stepping(regs) ((regs)->msr & MSR_SE) +#define clear_single_step(regs) ((regs)->msr &= ~MSR_SE) #endif void @@ -320,6 +327,22 @@ return retval; } +/* + * After we have successfully emulated an instruction, we have to + * check if the instruction was being single-stepped, and if so, + * pretend we got a single-step exception. This was pointed out + * by Kumar Gala. -- paulus + */ +static void emulate_single_step(struct pt_regs *regs) +{ + if (single_stepping(regs)) { + clear_single_step(regs); + if (debugger_sstep(regs)) + return; + _exception(SIGTRAP, regs, TRAP_TRACE, 0); + } +} + void ProgramCheckException(struct pt_regs *regs) { @@ -334,8 +357,10 @@ * hardware people - not sure if it can happen on any illegal * instruction or only on FP instructions, whether there is a * pattern to occurences etc. -dgibson 31/Mar/2003 */ - if (!(reason & REASON_TRAP) && do_mathemu(regs) == 0) + if (!(reason & REASON_TRAP) && do_mathemu(regs) == 0) { + emulate_single_step(regs); return; + } #endif /* CONFIG_MATH_EMULATION */ if (reason & REASON_FP) { @@ -371,8 +396,10 @@ if (reason & REASON_PRIVILEGED) { /* Try to emulate it if we should. */ - if (emulate_instruction(regs) == 0) + if (emulate_instruction(regs) == 0) { + emulate_single_step(regs); return; + } _exception(SIGILL, regs, ILL_PRVOPC, regs->nip); return; } @@ -397,6 +424,7 @@ fixed = fix_alignment(regs); if (fixed == 1) { regs->nip += 4; /* skip over emulated instruction */ + emulate_single_step(regs); return; } if (fixed == -EFAULT) { @@ -453,11 +481,12 @@ _exception(SIGSEGV, regs, 0, 0); else _exception(SIGILL, regs, ILL_ILLOPC, regs->nip); - } + } else + emulate_single_step(regs); } #endif /* CONFIG_8xx */ -#if defined(CONFIG_4xx) +#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) void DebugException(struct pt_regs *regs) { @@ -484,17 +513,28 @@ _exception(SIGTRAP, regs, 0, 0); } } -#endif /* CONFIG_4xx */ +#endif /* CONFIG_4xx || CONFIG_BOOKE */ #if !defined(CONFIG_TAU_INT) void TAUException(struct pt_regs *regs) { - printk("TAU trap at PC: %lx, SR: %lx, vector=%lx %s\n", + printk("Thermal trap at PC: %lx, SR: %lx, vector=%lx %s\n", regs->nip, regs->msr, regs->trap, print_tainted()); } #endif /* CONFIG_INT_TAU */ +#ifdef CONFIG_ALTIVEC +void +AltivecAssistException(struct pt_regs *regs) +{ + if (regs->msr & MSR_VEC) + giveup_altivec(current); + /* XXX quick hack for now: set the non-Java bit in the VSCR */ + current->thread.vscr.u[3] |= 0x10000; +} +#endif /* CONFIG_ALTIVEC */ + void __init trap_init(void) { } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/mm/44x_mmu.c linux-2.4.23-pre8/arch/ppc/mm/44x_mmu.c --- linux-2.4.22/arch/ppc/mm/44x_mmu.c 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/mm/44x_mmu.c 2003-10-22 22:48:26.000000000 +0000 @@ -0,0 +1,142 @@ +/* + * Modifications by Matt Porter (mporter@mvista.com) to support + * PPC44x Book E processors. + * + * This file contains the routines for initializing the MMU + * on the 4xx series of chips. + * -- paulus + * + * Derived from arch/ppc/mm/init.c: + * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org) + * + * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au) + * and Cort Dougan (PReP) (cort@cs.nmt.edu) + * Copyright (C) 1996 Paul Mackerras + * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk). + * + * Derived from "arch/i386/mm/init.c" + * Copyright (C) 1991, 1992, 1993, 1994 Linus Torvalds + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "mmu_decl.h" +#include "mem_pieces.h" + +extern char etext[], _stext[]; +extern struct mem_pieces phys_avail; + +/* Used by the 44x TLB replacement exception handler. + * Just needed it declared someplace. + */ +unsigned int tlb_44x_index = 0; +unsigned int tlb_44x_hwater = 61; + +/* + * "Pins" a 256MB TLB entry in AS0 for kernel lowmem + */ +static void __init +ppc44x_pin_tlb(int slot, unsigned int virt, unsigned int phys) +{ + unsigned long attrib; + + __asm__ __volatile__("\ + clrrwi %2,%2,10\n\ + ori %2,%2,%4\n\ + clrrwi %1,%1,10\n\ + li %0,0\n\ + ori %0,%0,%5\n\ + tlbwe %2,%3,%6\n\ + tlbwe %1,%3,%7\n\ + tlbwe %0,%3,%8" + : + : "r" (attrib), "r" (phys), "r" (virt), "r" (slot), + "i" (PPC44x_TLB_VALID | PPC44x_TLB_PAGESZ(PPC44x_PAGESZ_256M)), + "i" (PPC44x_TLB_SW | PPC44x_TLB_SR | PPC44x_TLB_SX | PPC44x_TLB_G), + "i" (PPC44x_TLB_PAGEID), + "i" (PPC44x_TLB_XLAT), + "i" (PPC44x_TLB_ATTRIB)); +} + +/* + * Configure PPC44x TLB for AS0 exception processing. + */ +static void __init +ppc44x_tlb_config(void) +{ + unsigned int pinned_tlbs = 1; + int i; + + /* + * If lowmem is not on a pin tlb entry size boundary, + * then reserve the last page of system memory. This + * eliminates the possibility of a speculative dcache + * fetch past the end of system memory that would + * result in a machine check exception. + */ + if (total_lowmem & (PPC44x_PIN_SIZE - 1)) + mem_pieces_remove(&phys_avail, total_lowmem - PAGE_SIZE, PAGE_SIZE, 1); + + /* Determine number of entries necessary to cover lowmem */ + pinned_tlbs = (unsigned int) + (_ALIGN(total_lowmem, PPC44x_PIN_SIZE) >> PPC44x_PIN_SHIFT); + + /* Write upper watermark to save location */ + tlb_44x_hwater = PPC44x_LOW_SLOT - pinned_tlbs; + + /* If necessary, set additional pinned TLBs */ + if (pinned_tlbs > 1) + for (i = (PPC44x_LOW_SLOT-(pinned_tlbs-1)); i < PPC44x_LOW_SLOT; i++) { + unsigned int phys_addr = (PPC44x_LOW_SLOT-i) * PPC44x_PIN_SIZE; + ppc44x_pin_tlb(i, phys_addr+PAGE_OFFSET, phys_addr); + } + + /* Make sure vmalloc doesn't use virtual space covered by + the last pinned TLB entry. */ + vmalloc_start = KERNELBASE + _ALIGN(total_lowmem, PPC44x_PIN_SIZE); +} + +/* + * MMU_init_hw does the chip-specific initialization of the MMU hardware. + */ +void __init MMU_init_hw(void) +{ + flush_instruction_cache(); + + ppc44x_tlb_config(); +} diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/mm/Makefile linux-2.4.23-pre8/arch/ppc/mm/Makefile --- linux-2.4.22/arch/ppc/mm/Makefile 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/mm/Makefile 2003-10-22 22:49:17.000000000 +0000 @@ -19,6 +19,7 @@ obj-$(CONFIG_PPC_STD_MMU) += hashtable.o ppc_mmu.o tlb.o obj-$(CONFIG_40x) += 4xx_mmu.o +obj-$(CONFIG_44x) += 44x_mmu.o obj-$(CONFIG_NOT_COHERENT_CACHE) += cachemap.o include $(TOPDIR)/Rules.make diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/mm/cachemap.c linux-2.4.23-pre8/arch/ppc/mm/cachemap.c --- linux-2.4.22/arch/ppc/mm/cachemap.c 2003-06-13 14:51:31.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/mm/cachemap.c 2003-10-22 22:49:51.000000000 +0000 @@ -11,6 +11,7 @@ * is the virtual address and 'dma_handle' is the physical address. * Mostly stolen from the ARM port, with some changes for PowerPC. * -- Dan + * Modified for 36-bit support. -Matt * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -48,14 +49,24 @@ #include #include -extern int get_pteptr(struct mm_struct *mm, unsigned long addr, pte_t **ptep); +#include "mmu_decl.h" +extern int map_page(unsigned long va, phys_addr_t pa, int flags); + +/* This function will allocate the requested contiguous pages and + * map them into the kernel's vmalloc() space. This is done so we + * get unique mapping for these pages, outside of the kernel's 1:1 + * virtual:physical mapping. This is necessary so we can cover large + * portions of the kernel with single large page TLB entries, and + * still get unique uncached pages for consistent DMA. + */ void *consistent_alloc(int gfp, size_t size, dma_addr_t *dma_handle) { - int order, rsize; - unsigned long page; - void *ret; - pte_t *pte; + int order, err, i; + unsigned long page, va, flags; + phys_addr_t pa; + struct vm_struct *area; + void *ret; if (in_interrupt()) BUG(); @@ -77,23 +88,41 @@ */ invalidate_dcache_range(page, page + size); - ret = (void *)page; - *dma_handle = virt_to_bus(ret); + /* Allocate some common virtual space to map the new pages. + */ + area = get_vm_area(size, VM_ALLOC); + if (area == 0) { + free_pages(page, order); + return NULL; + } + va = VMALLOC_VMADDR(area->addr); + ret = (void *)va; - /* Chase down all of the PTEs and mark them uncached. + /* This gives us the real physical address of the first page. */ - rsize = (int)size; - while (rsize > 0) { - if (get_pteptr(&init_mm, page, &pte)) { - pte_val(*pte) |= _PAGE_NO_CACHE | _PAGE_GUARDED; - flush_tlb_page(find_vma(&init_mm,page),page); - } - else { - BUG(); - return NULL; - } - page += PAGE_SIZE; - rsize -= PAGE_SIZE; + *dma_handle = pa = virt_to_bus((void *)page); + + flags = _PAGE_KERNEL | _PAGE_NO_CACHE; + + /* + * Set refcount=1 on all pages in an order>0 + * allocation so that vfree() will actually + * free all pages that were allocated. + */ + if (order > 0) + { + struct page *rpage = virt_to_page(page); + for (i = 1; i < (1 << order); i++) + set_page_count(rpage+i, 1); + } + + err = 0; + for (i = 0; i < size && err == 0; i += PAGE_SIZE) + err = map_page(va+i, pa+i, flags); + + if (err) { + vfree((void *)va); + return NULL; } return ret; @@ -101,42 +130,12 @@ /* * free page(s) as defined by the above mapping. - * The caller has to tell us the size so we can free the proper number - * of pages. We can't vmalloc() a new space for these pages and simply - * call vfree() like some other architectures because we could end up - * with aliased cache lines (or at least a cache line with the wrong - * attributes). This can happen when the PowerPC speculative loads - * across page boundaries. */ -void consistent_free(void *vaddr, size_t size) +void consistent_free(void *vaddr) { - int order, rsize; - unsigned long addr; - pte_t *pte; - if (in_interrupt()) BUG(); - - size = PAGE_ALIGN(size); - order = get_order(size); - - /* Chase down all of the PTEs and mark them cached again. - */ - addr = (unsigned long)vaddr; - rsize = (int)size; - while (rsize > 0) { - if (get_pteptr(&init_mm, addr, &pte)) { - pte_val(*pte) &= ~(_PAGE_NO_CACHE | _PAGE_GUARDED); - flush_tlb_page(find_vma(&init_mm,addr),addr); - } - else { - BUG(); - return; - } - addr += PAGE_SIZE; - rsize -= PAGE_SIZE; - } - free_pages((unsigned long)vaddr, order); + vfree(vaddr); } /* @@ -161,3 +160,17 @@ break; } } + +/* + * consistent_sync_page make a page are consistent. identical + * to consistent_sync, but takes a struct page instead of a virtual address + */ + +void consistent_sync_page(struct page *page, unsigned long offset, +size_t size, int direction) +{ + void *start; + + start = page_address(page) + offset; + consistent_sync(start, size, direction); +} diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/mm/fault.c linux-2.4.23-pre8/arch/ppc/mm/fault.c --- linux-2.4.22/arch/ppc/mm/fault.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/mm/fault.c 2003-10-22 22:48:20.000000000 +0000 @@ -100,7 +100,7 @@ struct mm_struct *mm = current->mm; siginfo_t info; int code = SEGV_MAPERR; -#if defined(CONFIG_4xx) +#if defined(CONFIG_4xx) || defined (CONFIG_BOOKE) int is_write = error_code & ESR_DST; #else int is_write = 0; @@ -115,14 +115,14 @@ error_code &= 0x48200000; else is_write = error_code & 0x02000000; -#endif /* CONFIG_4xx */ +#endif /* CONFIG_4xx || CONFIG_BOOKE */ #if defined(CONFIG_XMON) || defined(CONFIG_KGDB) if (debugger_fault_handler && regs->trap == 0x300) { debugger_fault_handler(regs); return; } -#if !defined(CONFIG_4xx) +#ifndef CONFIG_4xx if (error_code & 0x00400000) { /* DABR match */ if (debugger_dabr_match(regs)) diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/mm/init.c linux-2.4.23-pre8/arch/ppc/mm/init.c --- linux-2.4.22/arch/ppc/mm/init.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/mm/init.c 2003-10-22 22:48:11.000000000 +0000 @@ -46,6 +46,31 @@ #include "mem_pieces.h" #include "mmu_decl.h" +/* + * Just any arbitrary offset to the start of the vmalloc VM area: the + * current 64MB value just means that there will be a 64MB "hole" after the + * physical memory until the kernel virtual memory starts. That means that + * any out-of-bounds memory accesses will hopefully be caught. + * The vmalloc() routines leaves a hole of 4kB between each vmalloced + * area for the same reason. ;) + * + * We no longer map larger than phys RAM with the BATs so we don't have + * to worry about the VMALLOC_OFFSET causing problems. We do have to worry + * about clashes between our early calls to ioremap() that start growing down + * from ioremap_base being run into the VM area allocations (growing upwards + * from VMALLOC_START). For this reason we have ioremap_bot to check when + * we actually run into our mappings setup in the early boot with the VM + * system. This really does become a problem for machines with good amounts + * of RAM. -- Cort + */ +#ifdef CONFIG_PIN_TLB +#define VMALLOC_OFFSET (0x2000000) /* 32M */ +#else +#define VMALLOC_OFFSET (0x1000000) /* 16M */ +#endif + +unsigned long vmalloc_start; + mmu_gather_t mmu_gathers[NR_CPUS]; unsigned long total_memory; @@ -313,6 +338,7 @@ total_lowmem = total_memory; adjust_total_lowmem(); set_phys_avail(total_lowmem); + vmalloc_start = KERNELBASE + total_lowmem; /* Initialize the MMU hardware */ if (ppc_md.progress) @@ -459,6 +485,9 @@ totalram_pages += free_all_bootmem(); + /* adjust vmalloc_start */ + vmalloc_start = (vmalloc_start + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1); + #ifdef CONFIG_BLK_DEV_INITRD /* if we are booted from BootX with an initial ramdisk, make sure the ramdisk pages aren't reserved. */ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/mm/mmu_context.c linux-2.4.23-pre8/arch/ppc/mm/mmu_context.c --- linux-2.4.22/arch/ppc/mm/mmu_context.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/mm/mmu_context.c 2003-10-22 22:49:01.000000000 +0000 @@ -3,9 +3,6 @@ * PowerPC implementations where the MMU substantially follows the * architecture specification. This includes the 6xx, 7xx, 7xxx, * 8260, and POWER3 implementations but excludes the 8xx and 4xx. - * Although the iSeries hardware does comply with the architecture - * specification, the need to work through the hypervisor makes - * things sufficiently different that it is handled elsewhere. * -- paulus * * Derived from arch/ppc/mm/init.c: diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/mm/mmu_decl.h linux-2.4.23-pre8/arch/ppc/mm/mmu_decl.h --- linux-2.4.22/arch/ppc/mm/mmu_decl.h 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/mm/mmu_decl.h 2003-10-22 22:48:59.000000000 +0000 @@ -21,11 +21,12 @@ */ #include +#include extern void mapin_ram(void); extern void bat_mapin_ram(unsigned long bat2, unsigned long bat3); extern void adjust_total_lowmem(void); -extern int map_page(unsigned long va, unsigned long pa, int flags); +extern int map_page(unsigned long va, phys_addr_t pa, int flags); extern void setbat(int index, unsigned long virt, unsigned long phys, unsigned int size, int flags); extern void reserve_phys_mem(unsigned long start, unsigned long size); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/mm/pgtable.c linux-2.4.23-pre8/arch/ppc/mm/pgtable.c --- linux-2.4.22/arch/ppc/mm/pgtable.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/mm/pgtable.c 2003-10-22 22:47:58.000000000 +0000 @@ -37,10 +37,11 @@ unsigned long ioremap_bot; int io_bat_index; -/* Maximum 768Mb of lowmem. On SMP, this value will be - * trimmed down to whatever can be covered by BATs though. +/* The maximum lowmem defaults to 768Mb, but this can be configured to + * another value. On SMP, this value will be trimmed down to whatever + * can be covered by BATs. */ -#define MAX_LOW_MEM 0x30000000 +#define MAX_LOW_MEM CONFIG_LOWMEM_SIZE #ifndef CONFIG_SMP struct pgtable_cache_struct quicklists; @@ -67,16 +68,35 @@ #define p_mapped_by_bats(x) (0UL) #endif /* HAVE_BATS */ +#ifdef CONFIG_PTE_64BIT void * -ioremap(unsigned long addr, unsigned long size) +ioremap(phys_addr_t addr, unsigned long size) +{ + phys_addr_t addr64 = fixup_bigphys_addr(addr, size);; + + return ioremap64(addr64, size); +} + +void * +ioremap64(unsigned long long addr, unsigned long size) +{ + return __ioremap(addr, size, _PAGE_NO_CACHE); +} + +#else /* !CONFIG_PTE_64BIT */ + +void * +ioremap(phys_addr_t addr, unsigned long size) { return __ioremap(addr, size, _PAGE_NO_CACHE); } +#endif /* CONFIG_PTE_64BIT */ void * -__ioremap(unsigned long addr, unsigned long size, unsigned long flags) +__ioremap(phys_addr_t addr, unsigned long size, unsigned long flags) { - unsigned long p, v, i; + unsigned long v, i; + phys_addr_t p; int err; /* @@ -101,7 +121,7 @@ */ if ( mem_init_done && (p < virt_to_phys(high_memory)) ) { - printk("__ioremap(): phys addr %0lx is RAM lr %p\n", p, + printk("__ioremap(): phys addr "PTE_FMT" is RAM lr %p\n", p, __builtin_return_address(0)); return NULL; } @@ -152,7 +172,7 @@ } out: - return (void *) (v + (addr & ~PAGE_MASK)); + return (void *) (v + ((unsigned long)addr & ~PAGE_MASK)); } void iounmap(void *addr) @@ -168,7 +188,7 @@ } int -map_page(unsigned long va, unsigned long pa, int flags) +map_page(unsigned long va, phys_addr_t pa, int flags) { pmd_t *pd; pte_t *pg; @@ -308,7 +328,7 @@ * virt, phys, size must all be page-aligned. * This should only be called before ioremap is called. */ -void __init io_block_mapping(unsigned long virt, unsigned long phys, +void __init io_block_mapping(unsigned long virt, phys_addr_t phys, unsigned int size, int flags) { int i; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/mm/ppc_mmu.c linux-2.4.23-pre8/arch/ppc/mm/ppc_mmu.c --- linux-2.4.22/arch/ppc/mm/ppc_mmu.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/mm/ppc_mmu.c 2003-10-22 22:47:49.000000000 +0000 @@ -3,9 +3,6 @@ * PowerPC implementations where the MMU substantially follows the * architecture specification. This includes the 6xx, 7xx, 7xxx, * 8260, and POWER3 implementations but excludes the 8xx and 4xx. - * Although the iSeries hardware does comply with the architecture - * specification, the need to work through the hypervisor makes - * things sufficiently different that it is handled elsewhere. * -- paulus * * Derived from arch/ppc/mm/init.c: @@ -181,6 +178,17 @@ #define MIN_N_HPTEG 1024 /* min 64kB hash table */ #endif +#ifdef CONFIG_POWER4 + /* The hash table has already been allocated and initialized + in prom.c */ + n_hpteg = Hash_size >> LG_HPTEG_SIZE; + lg_n_hpteg = __ilog2(n_hpteg); + + /* Remove the hash table from the available memory */ + if (Hash) + reserve_phys_mem(__pa(Hash), Hash_size); + +#else /* CONFIG_POWER4 */ /* * Allow 1 HPTE (1/8 HPTEG) for each page of memory. * This is less than the recommended amount, but then @@ -204,6 +212,7 @@ cacheable_memzero(Hash, Hash_size); _SDR1 = __pa(Hash) | SDR1_LOW_BITS; Hash_end = (PTE *) ((unsigned long)Hash + Hash_size); +#endif /* CONFIG_POWER4 */ printk("Total memory = %ldMB; using %ldkB for hash table (at %p)\n", total_memory >> 20, Hash_size >> 10, Hash); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/platforms/Makefile linux-2.4.23-pre8/arch/ppc/platforms/Makefile --- linux-2.4.22/arch/ppc/platforms/Makefile 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/platforms/Makefile 2003-10-22 22:49:58.000000000 +0000 @@ -26,9 +26,15 @@ O_TARGET := platform.o -export-objs := prep_setup.o +export-objs := prep_setup.o ibm440gp.o ibm440gx.o -obj-$(CONFIG_WALNUT) += walnut.o ibm405gp.o +obj-$(CONFIG_405GP) += ibm405gp.o +obj-$(CONFIG_440GP) += ibm440gp.o +obj-$(CONFIG_440GX) += ibm440gx.o + +obj-$(CONFIG_EBONY) += ebony.o +obj-$(CONFIG_OCOTEA) += ocotea.o +obj-$(CONFIG_WALNUT) += walnut.o obj-$(CONFIG_APUS) += apus_setup.o ifeq ($(CONFIG_APUS),y) diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/platforms/dbox2.h linux-2.4.23-pre8/arch/ppc/platforms/dbox2.h --- linux-2.4.22/arch/ppc/platforms/dbox2.h 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/platforms/dbox2.h 2003-10-22 22:47:37.000000000 +0000 @@ -0,0 +1,24 @@ +/* + * D-BOX2 board specific definitions + * + * Copyright (c) 2001-2002 Florian Schirmer (jolt@tuxbox.org) + */ + +#ifndef __MACH_DBOX2_H +#define __MACH_DBOX2_H + +#include + +#include + +#define DBOX2_IMMR_BASE 0xFF000000 /* phys. addr of IMMR */ +#define DBOX2_IMAP_SIZE (64 * 1024) /* size of mapped area */ + +#define IMAP_ADDR DBOX2_IMMR_BASE /* physical base address of IMMR area */ +#define IMAP_SIZE DBOX2_IMAP_SIZE /* mapped size of IMMR area */ + +/* We don't use the 8259. +*/ +#define NR_8259_INTS 0 + +#endif /* __MACH_DBOX2_H */ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/platforms/ebony.c linux-2.4.23-pre8/arch/ppc/platforms/ebony.c --- linux-2.4.22/arch/ppc/platforms/ebony.c 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/platforms/ebony.c 2003-10-22 22:47:56.000000000 +0000 @@ -0,0 +1,534 @@ +/* + * arch/ppc/platforms/ebony.c + * + * Ebony board specific routines + * + * Matt Porter + * + * Copyright 2002-2003 MontaVista Software Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +extern void abort(void); +extern int pckbd_setkeycode(unsigned int scancode, unsigned int keycode); +extern int pckbd_getkeycode(unsigned int scancode); +extern int pckbd_translate(unsigned char scancode, unsigned char *keycode, + char raw_mode); +extern void gen550_progress(char *, unsigned short); +extern void gen550_init(int, struct serial_struct *); + +/* + * Ebony IRQ triggering/polarity settings + */ +static u_char ebony_IRQ_initsenses[] __initdata = { + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 0: UART 0 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 1: UART 1 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 2: IIC 0 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 3: IIC 1 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 4: PCI Inb Mess */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 5: PCI Cmd Wrt */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 6: PCI PM */ + (IRQ_SENSE_EDGE | IRQ_POLARITY_POSITIVE), /* 7: PCI MSI 0 */ + (IRQ_SENSE_EDGE | IRQ_POLARITY_POSITIVE), /* 8: PCI MSI 1 */ + (IRQ_SENSE_EDGE | IRQ_POLARITY_POSITIVE), /* 9: PCI MSI 2 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 10: MAL TX EOB */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 11: MAL RX EOB */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 12: DMA Chan 0 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 13: DMA Chan 1 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 14: DMA Chan 2 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 15: DMA Chan 3 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 16: Reserved */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 17: Reserved */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 18: GPT Timer 0 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 19: GPT Timer 1 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 20: GPT Timer 2 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 21: GPT Timer 3 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 22: GPT Timer 4 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* 23: Ext Int 0 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* 24: Ext Int 1 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* 25: Ext Int 2 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* 26: Ext Int 3 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 27: Ext Int 4 */ + (IRQ_SENSE_EDGE | IRQ_POLARITY_NEGATIVE), /* 28: Ext Int 5 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* 29: Ext Int 6 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 30: UIC1 NC Int */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 31: UIC1 Crit Int */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 32: MAL SERR */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 33: MAL TXDE */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 34: MAL RXDE */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 35: ECC Unc Err */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 36: ECC Corr Err */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 37: Ext Bus Ctrl */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 38: Ext Bus Mstr */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 39: OPB->PLB */ + (IRQ_SENSE_EDGE | IRQ_POLARITY_POSITIVE), /* 40: PCI MSI 3 */ + (IRQ_SENSE_EDGE | IRQ_POLARITY_POSITIVE), /* 41: PCI MSI 4 */ + (IRQ_SENSE_EDGE | IRQ_POLARITY_POSITIVE), /* 42: PCI MSI 5 */ + (IRQ_SENSE_EDGE | IRQ_POLARITY_POSITIVE), /* 43: PCI MSI 6 */ + (IRQ_SENSE_EDGE | IRQ_POLARITY_POSITIVE), /* 44: PCI MSI 7 */ + (IRQ_SENSE_EDGE | IRQ_POLARITY_POSITIVE), /* 45: PCI MSI 8 */ + (IRQ_SENSE_EDGE | IRQ_POLARITY_POSITIVE), /* 46: PCI MSI 9 */ + (IRQ_SENSE_EDGE | IRQ_POLARITY_POSITIVE), /* 47: PCI MSI 10 */ + (IRQ_SENSE_EDGE | IRQ_POLARITY_POSITIVE), /* 48: PCI MSI 11 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 49: PLB Perf Mon */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 50: Ext Int 7 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* 51: Ext Int 8 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* 52: Ext Int 9 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* 53: Ext Int 10 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* 54: Ext Int 11 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* 55: Ext Int 12 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 56: Ser ROM Err */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 57: Reserved */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 58: Reserved */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 59: PCI Async Err */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 60: EMAC 0 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 61: EMAC 0 WOL */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 62: EMAC 1 */ + (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 63: EMAC 1 WOL */ +}; + +/* Global Variables */ +unsigned char __res[sizeof (bd_t)]; + +static void __init +ebony_calibrate_decr(void) +{ + unsigned int freq; + + /* + * Determine system clock speed + * + * If we are on Rev. B silicon, then use + * default external system clock. If we are + * on Rev. C silicon then errata forces us to + * use the internal clock. + */ + switch (PVR_REV(mfspr(PVR))) { + case PVR_REV(PVR_440GP_RB): + freq = EBONY_440GP_RB_SYSCLK; + break; + case PVR_REV(PVR_440GP_RC1): + default: + freq = EBONY_440GP_RC_SYSCLK; + break; + } + + tb_ticks_per_jiffy = freq / HZ; + tb_to_us = mulhwu_scale_factor(freq, 1000000); + + /* Set the time base to zero */ + mtspr(SPRN_TBWL, 0); + mtspr(SPRN_TBWU, 0); + + /* Clear any pending timer interrupts */ + mtspr(SPRN_TSR, TSR_ENW | TSR_WIS | TSR_DIS | TSR_FIS); + + /* Enable decrementer interrupt */ + mtspr(SPRN_TCR, TCR_DIE); +} + +static int +ebony_show_cpuinfo(struct seq_file *m) +{ + seq_printf(m, "vendor\t\t: IBM\n"); + seq_printf(m, "machine\t\t: Ebony\n"); + + return 0; +} + +static inline int +ebony_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) +{ + static char pci_irq_table[][4] = + /* + * PCI IDSEL/INTPIN->INTLINE + * A B C D + */ + { + { 23, 23, 23, 23 }, /* IDSEL 1 - PCI Slot 0 */ + { 24, 24, 24, 24 }, /* IDSEL 2 - PCI Slot 1 */ + { 25, 25, 25, 25 }, /* IDSEL 3 - PCI Slot 2 */ + { 26, 26, 26, 26 }, /* IDSEL 4 - PCI Slot 3 */ + }; + + const long min_idsel = 1, max_idsel = 4, irqs_per_slot = 4; + return PCI_IRQ_TABLE_LOOKUP; +} + +#define PCIX_READW(offset) \ + (readw((u32)pcix_reg_base+offset)) + +#define PCIX_WRITEW(value, offset) \ + (writew(value, (u32)pcix_reg_base+offset)) + +#define PCIX_WRITEL(value, offset) \ + (writel(value, (u32)pcix_reg_base+offset)) + +/* + * FIXME: This is only here to "make it work". This will move + * to a ibm_pcix.c which will contain a generic IBM PCIX bridge + * configuration library. -Matt + */ +static void __init +ebony_setup_pcix(void) +{ + void *pcix_reg_base; + + pcix_reg_base = ioremap64(PCIX0_REG_BASE, PCIX0_REG_SIZE); + + /* Enable PCIX0 I/O, Mem, and Busmaster cycles */ + PCIX_WRITEW(PCIX_READW(PCIX0_COMMAND) | PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER, PCIX0_COMMAND); + + /* Disable all windows */ + PCIX_WRITEL(0, PCIX0_POM0SA); + PCIX_WRITEL(0, PCIX0_POM1SA); + PCIX_WRITEL(0, PCIX0_POM2SA); + PCIX_WRITEL(0, PCIX0_PIM0SA); + PCIX_WRITEL(0, PCIX0_PIM1SA); + PCIX_WRITEL(0, PCIX0_PIM2SA); + + /* Setup 2GB PLB->PCI outbound mem window (3_8000_0000->0_8000_0000) */ + PCIX_WRITEL(0x00000003, PCIX0_POM0LAH); + PCIX_WRITEL(0x80000000, PCIX0_POM0LAL); + PCIX_WRITEL(0x00000000, PCIX0_POM0PCIAH); + PCIX_WRITEL(0x80000000, PCIX0_POM0PCIAL); + PCIX_WRITEL(0x80000001, PCIX0_POM0SA); + + /* Setup 2GB PCI->PLB inbound memory window at 0, enable MSIs */ + PCIX_WRITEL(0x00000000, PCIX0_PIM0LAH); + PCIX_WRITEL(0x00000000, PCIX0_PIM0LAL); + PCIX_WRITEL(0xe0000007, PCIX0_PIM0SA); + + eieio(); +} + +static void __init +ebony_setup_hose(void) +{ + struct pci_controller *hose; + + /* Configure windows on the PCI-X host bridge */ + ebony_setup_pcix(); + + hose = pcibios_alloc_controller(); + + if (!hose) + return; + + hose->first_busno = 0; + hose->last_busno = 0xff; + + hose->pci_mem_offset = EBONY_PCI_MEM_OFFSET; + + pci_init_resource(&hose->io_resource, + EBONY_PCI_LOWER_IO, + EBONY_PCI_UPPER_IO, + IORESOURCE_IO, + "PCI host bridge"); + + pci_init_resource(&hose->mem_resources[0], + EBONY_PCI_LOWER_MEM, + EBONY_PCI_UPPER_MEM, + IORESOURCE_MEM, + "PCI host bridge"); + + hose->io_space.start = EBONY_PCI_LOWER_IO; + hose->io_space.end = EBONY_PCI_UPPER_IO; + hose->mem_space.start = EBONY_PCI_LOWER_MEM; + hose->mem_space.end = EBONY_PCI_UPPER_MEM; + isa_io_base = + (unsigned long)ioremap64(EBONY_PCI_IO_BASE, EBONY_PCI_IO_SIZE); + hose->io_base_virt = (void *)isa_io_base; + + setup_indirect_pci(hose, + EBONY_PCI_CFGA_PLB32, + EBONY_PCI_CFGD_PLB32); + hose->set_cfg_type = 1; + + hose->last_busno = pciauto_bus_scan(hose, hose->first_busno); + + ppc_md.pci_swizzle = common_swizzle; + ppc_md.pci_map_irq = ebony_map_irq; +} + +TODC_ALLOC(); + +static void __init +ebony_early_serial_map(void) +{ + struct serial_struct serial_req; + + /* Setup ioremapped serial port access */ + memset(&serial_req, 0, sizeof(serial_req)); + serial_req.line = 0; + serial_req.baud_base = BASE_BAUD; + serial_req.port = 0; + serial_req.irq = 0; + serial_req.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST; + serial_req.io_type = SERIAL_IO_MEM; + serial_req.iomem_base = ioremap64(PPC440GP_UART0_ADDR, 8); + serial_req.iomem_reg_shift = 0; + +#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB) + /* Configure debug serial access */ + gen550_init(0, &serial_req); +#endif + + if (early_serial_setup(&serial_req) != 0) { + printk("Early serial init of port 0 failed\n"); + } + + /* Assume early_serial_setup() doesn't modify serial_req */ + serial_req.line = 1; + serial_req.port = 1; + serial_req.irq = 1; + serial_req.iomem_base = ioremap64(PPC440GP_UART1_ADDR, 8); + +#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB) + /* Configure debug serial access */ + gen550_init(1, &serial_req); +#endif + + if (early_serial_setup(&serial_req) != 0) { + printk("Early serial init of port 1 failed\n"); + } +} + +static void __init +ebony_setup_arch(void) +{ + unsigned char * vpd_base; + struct ibm440gp_clocks clocks; + bd_t *bip = (bd_t *) __res; + +#if !defined(CONFIG_BDI_SWITCH) + /* + * The Abatron BDI JTAG debugger does not tolerate others + * mucking with the debug registers. + */ + mtspr(SPRN_DBCR0, (DBCR0_TDE | DBCR0_IDM)); +#endif + + /* Retrieve MAC addresses */ + vpd_base = ioremap64(EBONY_VPD_BASE, EBONY_VPD_SIZE); + memcpy(bip->bi_enetaddr[0],EBONY_NA0_ADDR(vpd_base),6); + memcpy(bip->bi_enetaddr[1],EBONY_NA1_ADDR(vpd_base),6); + + /* + * Determine various clocks. + * To be completely correct we should get SysClk + * from FPGA, because it can be changed by on-board switches + * --ebs + */ + ibm440gp_get_clocks(&clocks, 33333333, 6 * 1843200); + bip->bi_opb_busfreq = clocks.opb; + + /* Use IIC in standard (100 kHz) mode */ + bip->bi_iic_fast[0] = bip->bi_iic_fast[1] = 0; + + /* Setup TODC access */ + TODC_INIT(TODC_TYPE_DS1743, + 0, + 0, + ioremap64(EBONY_RTC_ADDR, EBONY_RTC_SIZE), + 8); + + /* init to some ~sane value until calibrate_delay() runs */ + loops_per_jiffy = 50000000/HZ; + + /* Setup PCI host bridge */ + ebony_setup_hose(); + +#ifdef CONFIG_BLK_DEV_INITRD + if (initrd_start) + ROOT_DEV = to_kdev_t(0x0100); /* /dev/ram */ + else +#endif +#ifdef CONFIG_ROOT_NFS + ROOT_DEV = to_kdev_t(0x00ff); /* /dev/nfs */ +#else + ROOT_DEV = to_kdev_t(0x0301); /* /dev/hda1 */ +#endif + +#ifdef CONFIG_VT + conswitchp = &dummy_con; +#endif + + ebony_early_serial_map(); + + ibm4xxPIC_InitSenses = ebony_IRQ_initsenses; + ibm4xxPIC_NumInitSenses = sizeof(ebony_IRQ_initsenses); + + /* Identify the system */ + printk("IBM Ebony port (MontaVista Software, Inc. (source@mvista.com))\n"); +} + +static void +ebony_restart(char *cmd) +{ + local_irq_disable(); + abort(); +} + +static void +ebony_power_off(void) +{ + local_irq_disable(); + for(;;); +} + +static void +ebony_halt(void) +{ + local_irq_disable(); + for(;;); +} + +/* + * Read the 440GP memory controller to get size of system memory. + */ +static unsigned long __init +ebony_find_end_of_memory(void) +{ + u32 i, bank_config; + u32 mem_size = 0; + + for (i=0; i<4; i++) + { + switch (i) + { + case 0: + mtdcr(DCRN_SDRAM0_CFGADDR, SDRAM0_B0CR); + break; + case 1: + mtdcr(DCRN_SDRAM0_CFGADDR, SDRAM0_B1CR); + break; + case 2: + mtdcr(DCRN_SDRAM0_CFGADDR, SDRAM0_B2CR); + break; + case 3: + mtdcr(DCRN_SDRAM0_CFGADDR, SDRAM0_B3CR); + break; + } + + bank_config = mfdcr(DCRN_SDRAM0_CFGDATA); + + if (!(bank_config & SDRAM_CONFIG_BANK_ENABLE)) + continue; + switch (SDRAM_CONFIG_BANK_SIZE(bank_config)) + { + case SDRAM_CONFIG_SIZE_8M: + mem_size += PPC44x_MEM_SIZE_8M; + break; + case SDRAM_CONFIG_SIZE_16M: + mem_size += PPC44x_MEM_SIZE_16M; + break; + case SDRAM_CONFIG_SIZE_32M: + mem_size += PPC44x_MEM_SIZE_32M; + break; + case SDRAM_CONFIG_SIZE_64M: + mem_size += PPC44x_MEM_SIZE_64M; + break; + case SDRAM_CONFIG_SIZE_128M: + mem_size += PPC44x_MEM_SIZE_128M; + break; + case SDRAM_CONFIG_SIZE_256M: + mem_size += PPC44x_MEM_SIZE_256M; + break; + case SDRAM_CONFIG_SIZE_512M: + mem_size += PPC44x_MEM_SIZE_512M; + break; + } + } + return mem_size; +} + +static void __init +ebony_init_irq(void) +{ + int i; + + ppc4xx_pic_init(); + + for (i = 0; i < NR_IRQS; i++) + irq_desc[i].handler = ppc4xx_pic; +} + +void __init +platform_init(unsigned long r3, unsigned long r4, + unsigned long r5, unsigned long r6, unsigned long r7) +{ + parse_bootinfo(find_bootinfo()); + + ppc_md.setup_arch = ebony_setup_arch; + ppc_md.show_cpuinfo = ebony_show_cpuinfo; + ppc_md.init_IRQ = ebony_init_irq; + ppc_md.get_irq = NULL; /* Set in ppc4xx_pic_init() */ + + ppc_md.find_end_of_memory = ebony_find_end_of_memory; + + ppc_md.restart = ebony_restart; + ppc_md.power_off = ebony_power_off; + ppc_md.halt = ebony_halt; + + ppc_md.calibrate_decr = ebony_calibrate_decr; + ppc_md.time_init = todc_time_init; + ppc_md.set_rtc_time = todc_set_rtc_time; + ppc_md.get_rtc_time = todc_get_rtc_time; + + ppc_md.nvram_read_val = todc_direct_read_val; + ppc_md.nvram_write_val = todc_direct_write_val; +#if defined(CONFIG_VT) + ppc_md.kbd_setkeycode = pckbd_setkeycode; + ppc_md.kbd_getkeycode = pckbd_getkeycode; + ppc_md.kbd_translate = pckbd_translate; + ppc_md.kbd_unexpected_up = pckbd_unexpected_up; + ppc_md.kbd_leds = pckbd_leds; + ppc_md.kbd_init_hw = 0; +#endif + +#ifdef CONFIG_SERIAL_TEXT_DEBUG + ppc_md.progress = gen550_progress; +#endif /* CONFIG_SERIAL_TEXT_DEBUG */ +#ifdef CONFIG_KGDB + ppc_md.early_serial_map = ebony_early_serial_map; +#endif +} + diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/platforms/ebony.h linux-2.4.23-pre8/arch/ppc/platforms/ebony.h --- linux-2.4.22/arch/ppc/platforms/ebony.h 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/platforms/ebony.h 2003-10-22 22:48:10.000000000 +0000 @@ -0,0 +1,94 @@ +/* + * arch/ppc/platforms/ebony.h + * + * Ebony board definitions + * + * Matt Porter + * + * Copyright 2002 MontaVista Software Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +#ifdef __KERNEL__ +#ifndef __ASM_EBONY_H__ +#define __ASM_EBONY_H__ + +#include +#include + +/* F/W TLB mapping used in bootloader glue to reset EMAC */ +#define PPC44x_EMAC0_MR0 0xE0000800 + +/* Macros to get at Ebony VPD info */ +#define EBONY_VPD_BASE 0x00000001fffffe00ULL +#define EBONY_VPD_SIZE 0x24 +#define EBONY_NA0_OFFSET 0x0c +#define EBONY_NA1_OFFSET 0x18 +#define EBONY_NA0_ADDR(base) (base + EBONY_NA0_OFFSET) +#define EBONY_NA1_ADDR(base) (base + EBONY_NA1_OFFSET) + +/* Default clock rates for Rev. B and Rev. C silicon */ +#define EBONY_440GP_RB_SYSCLK 33000000 +#define EBONY_440GP_RC_SYSCLK 400000000 + +/* RTC/NVRAM location */ +#define EBONY_RTC_ADDR 0x0000000148000000ULL +#define EBONY_RTC_SIZE 0x2000 + +/* Flash */ +#define EBONY_FPGA_ADDR 0x0000000148300000 +#define EBONY_BOOT_SMALL_FLASH(x) (x & 0x20) +#define EBONY_ONBRD_FLASH_EN(x) (x & 0x02) +#define EBONY_FLASH_SEL(x) (x & 0x01) +#define EBONY_SMALL_FLASH_LOW1 0x00000001ff800000 +#define EBONY_SMALL_FLASH_LOW2 0x00000001ff880000 +#define EBONY_SMALL_FLASH_HIGH1 0x00000001fff00000 +#define EBONY_SMALL_FLASH_HIGH2 0x00000001fff80000 +#define EBONY_SMALL_FLASH_SIZE 0x80000 +#define EBONY_LARGE_FLASH_LOW 0x00000001ff800000 +#define EBONY_LARGE_FLASH_HIGH 0x00000001ffc00000 +#define EBONY_LARGE_FLASH_SIZE 0x400000 + +#define EBONY_SMALL_FLASH_BASE 0x00000001fff80000 +#define EBONY_LARGE_FLASH_BASE 0x00000001ff800000 + +/* + * Serial port defines + */ + +/* OpenBIOS defined UART mappings, used before early_serial_setup */ +#define UART0_IO_BASE (u8 *) 0xE0000200 +#define UART1_IO_BASE (u8 *) 0xE0000300 + +#define BASE_BAUD 33000000/3/16 + +#define STD_UART_OP(num) \ + { 0, BASE_BAUD, 0, UART##num##_INT, \ + (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST), \ + iomem_base: UART##num##_IO_BASE, \ + io_type: SERIAL_IO_MEM}, + +#define SERIAL_PORT_DFNS \ + STD_UART_OP(0) \ + STD_UART_OP(1) + +/* PCI support */ +#define EBONY_PCI_LOWER_IO 0x00000000 +#define EBONY_PCI_UPPER_IO 0x0000ffff +#define EBONY_PCI_LOWER_MEM 0x80002000 +#define EBONY_PCI_UPPER_MEM 0xffffefff + +#define EBONY_PCI_CFGREGS_BASE 0x000000020ec00000 +#define EBONY_PCI_CFGA_PLB32 0x0ec00000 +#define EBONY_PCI_CFGD_PLB32 0x0ec00004 + +#define EBONY_PCI_IO_BASE 0x0000000208000000ULL +#define EBONY_PCI_IO_SIZE 0x00010000 +#define EBONY_PCI_MEM_OFFSET 0x00000000 + +#endif /* __ASM_EBONY_H__ */ +#endif /* __KERNEL__ */ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/platforms/ibm440gp.c linux-2.4.23-pre8/arch/ppc/platforms/ibm440gp.c --- linux-2.4.22/arch/ppc/platforms/ibm440gp.c 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/platforms/ibm440gp.c 2003-10-22 22:49:12.000000000 +0000 @@ -0,0 +1,129 @@ +/* + * arch/ppc/platforms/ibm440gp.c + * + * PPC440GP I/O descriptions + * + * Matt Porter + * Copyright 2002-2003 MontaVista Software Inc. + * + * Eugene Surovegin or + * Copyright (c) 2003 Zultys Technologies + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + */ +#include +#include +#include +#include + +#if defined(EMAC_NUMS) && EMAC_NUMS > 0 +u32 emac_phy_map[EMAC_NUMS]; +EXPORT_SYMBOL(emac_phy_map); +#endif + +static struct ocp_func_emac_data ibm440gp_emac0_def = { + .zmii_idx = 0, /* ZMII device index */ + .zmii_mux = 0, /* ZMII input of this EMAC */ + .mal_idx = 0, /* MAL device index */ + .mal_rx_chan = 0, /* MAL rx channel number */ + .mal_tx1_chan = 0, /* MAL tx channel 1 number */ + .mal_tx2_chan = 1, /* MAL tx channel 2 number */ + .wol_irq = BL_MAC_WOL, /* WOL interrupt number */ + .mdio_idx = -1, /* No shared MDIO */ +}; + +static struct ocp_func_emac_data ibm440gp_emac1_def = { + .zmii_idx = 0, /* ZMII device index */ + .zmii_mux = 1, /* ZMII input of this EMAC */ + .mal_idx = 0, /* MAL device index */ + .mal_rx_chan = 1, /* MAL rx channel number */ + .mal_tx1_chan = 2, /* MAL tx channel 1 number */ + .mal_tx2_chan = 3, /* MAL tx channel 2 number */ + .wol_irq = BL_MAC_WOL1, /* WOL interrupt number */ + .mdio_idx = -1, /* No shared MDIO */ +}; + +static struct ocp_func_mal_data ibm440gp_mal0_def = { + .num_tx_chans = 2*EMAC_NUMS, /* Number of TX channels */ + .num_rx_chans = EMAC_NUMS, /* Number of RX channels */ +}; + +struct ocp_def core_ocp[] __initdata = { + { .vendor = OCP_VENDOR_IBM, + .function = OCP_FUNC_OPB, + .index = 0, + .paddr = PPC440GP_OPB_BASE_START, + .irq = OCP_IRQ_NA, + .pm = OCP_CPM_NA, + }, + { .vendor = OCP_VENDOR_IBM, + .function = OCP_FUNC_16550, + .index = 0, + .paddr = PPC440GP_UART0_ADDR, + .irq = UART0_INT, + .pm = IBM_CPM_UART0, + }, + { .vendor = OCP_VENDOR_IBM, + .function = OCP_FUNC_16550, + .index = 1, + .paddr = PPC440GP_UART1_ADDR, + .irq = UART1_INT, + .pm = IBM_CPM_UART1, + }, + { .vendor = OCP_VENDOR_IBM, + .function = OCP_FUNC_IIC, + .index = 0, + .paddr = PPC440GP_IIC0_ADDR, + .irq = IIC0_IRQ, + .pm = IBM_CPM_IIC0, + }, + { .vendor = OCP_VENDOR_IBM, + .function = OCP_FUNC_IIC, + .index = 1, + .paddr = PPC440GP_IIC1_ADDR, + .irq = IIC1_IRQ, + .pm = IBM_CPM_IIC1, + }, + { .vendor = OCP_VENDOR_IBM, + .function = OCP_FUNC_GPIO, + .index = 0, + .paddr = PPC440GP_GPIO0_ADDR, + .irq = OCP_IRQ_NA, + .pm = IBM_CPM_GPIO0, + }, + { .vendor = OCP_VENDOR_IBM, + .function = OCP_FUNC_MAL, + .paddr = OCP_PADDR_NA, + .irq = OCP_IRQ_NA, + .pm = OCP_CPM_NA, + .additions = &ibm440gp_mal0_def, + }, + { .vendor = OCP_VENDOR_IBM, + .function = OCP_FUNC_EMAC, + .index = 0, + .paddr = PPC440GP_EMAC0_ADDR, + .irq = BL_MAC_ETH0, + .pm = OCP_CPM_NA, + .additions = &ibm440gp_emac0_def, + }, + { .vendor = OCP_VENDOR_IBM, + .function = OCP_FUNC_EMAC, + .index = 1, + .paddr = PPC440GP_EMAC1_ADDR, + .irq = BL_MAC_ETH1, + .pm = OCP_CPM_NA, + .additions = &ibm440gp_emac1_def, + }, + { .vendor = OCP_VENDOR_IBM, + .function = OCP_FUNC_ZMII, + .paddr = PPC440GP_ZMII_ADDR, + .irq = OCP_IRQ_NA, + .pm = OCP_CPM_NA, + }, + { .vendor = OCP_VENDOR_INVALID + } +}; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/platforms/ibm440gp.h linux-2.4.23-pre8/arch/ppc/platforms/ibm440gp.h --- linux-2.4.22/arch/ppc/platforms/ibm440gp.h 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/platforms/ibm440gp.h 2003-10-22 22:49:54.000000000 +0000 @@ -0,0 +1,103 @@ +/* + * arch/ppc/platforms/ibm440gp.h + * + * PPC440GP definitions + * + * Roland Dreier + * + * Copyright 2002 Roland Dreier + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This file contains code that was originally in the files ibm44x.h + * and ebony.h, which were written by Matt Porter of MontaVista Software Inc. + */ + +#ifdef __KERNEL__ +#ifndef __PPC_PLATFORMS_IBM440GP_H +#define __PPC_PLATFORMS_IBM440GP_H + +#include + +#include + +#define EMAC_NUMS 2 +#define UART_NUMS 2 +#define ZMII_NUMS 1 +#define IIC_NUMS 2 +#define IIC0_IRQ 2 +#define IIC1_IRQ 3 +#define GPIO_NUMS 1 + +/* UART location */ +#define PPC440GP_UART0_ADDR 0x0000000140000200ULL +#define PPC440GP_UART1_ADDR 0x0000000140000300ULL +#define UART0_INT 0 +#define UART1_INT 1 + +/* EMAC location */ +#define PPC440GP_EMAC0_ADDR 0x0000000140000800ULL +#define PPC440GP_EMAC1_ADDR 0x0000000140000900ULL +#define PPC440GP_EMAC_SIZE 0x70 + +/* EMAC IRQ's */ +#define BL_MAC_WOL 61 /* WOL */ +#define BL_MAC_WOL1 63 /* WOL */ +#define BL_MAL_SERR 32 /* MAL SERR */ +#define BL_MAL_TXDE 33 /* MAL TXDE */ +#define BL_MAL_RXDE 34 /* MAL RXDE */ +#define BL_MAL_TXEOB 10 /* MAL TX EOB */ +#define BL_MAL_RXEOB 11 /* MAL RX EOB */ +#define BL_MAC_ETH0 60 /* MAC */ +#define BL_MAC_ETH1 62 /* MAC */ + +/* ZMII location */ +#define PPC440GP_ZMII_ADDR 0x0000000140000780ULL +#define PPC440GP_ZMII_SIZE 0x0c + +/* I2C location */ +#define PPC440GP_IIC0_ADDR 0x40000400 +#define PPC440GP_IIC1_ADDR 0x40000500 + +/* GPIO location */ +#define PPC440GP_GPIO0_ADDR 0x0000000140000700ULL + +/* Clock and Power Management */ +#define IBM_CPM_IIC0 0x80000000 /* IIC interface */ +#define IBM_CPM_IIC1 0x40000000 /* IIC interface */ +#define IBM_CPM_PCI 0x20000000 /* PCI bridge */ +#define IBM_CPM_CPU 0x02000000 /* processor core */ +#define IBM_CPM_DMA 0x01000000 /* DMA controller */ +#define IBM_CPM_BGO 0x00800000 /* PLB to OPB bus arbiter */ +#define IBM_CPM_BGI 0x00400000 /* OPB to PLB bridge */ +#define IBM_CPM_EBC 0x00200000 /* External Bux Controller */ +#define IBM_CPM_EBM 0x00100000 /* Ext Bus Master Interface */ +#define IBM_CPM_DMC 0x00080000 /* SDRAM peripheral controller */ +#define IBM_CPM_PLB 0x00040000 /* PLB bus arbiter */ +#define IBM_CPM_SRAM 0x00020000 /* SRAM memory controller */ +#define IBM_CPM_PPM 0x00002000 /* PLB Performance Monitor */ +#define IBM_CPM_UIC1 0x00001000 /* Universal Interrupt Controller */ +#define IBM_CPM_GPIO0 0x00000800 /* General Purpose IO (??) */ +#define IBM_CPM_GPT 0x00000400 /* General Purpose Timers */ +#define IBM_CPM_UART0 0x00000200 /* serial port 0 */ +#define IBM_CPM_UART1 0x00000100 /* serial port 1 */ +#define IBM_CPM_UIC0 0x00000080 /* Universal Interrupt Controller */ +#define IBM_CPM_TMRCLK 0x00000040 /* CPU timers */ + +#define DFLT_IBM4xx_PM ~(IBM_CPM_UIC | IBM_CPM_UIC1 | IBM_CPM_CPU \ + | IBM_CPM_EBC | IBM_CPM_SRAM | IBM_CPM_BGO \ + | IBM_CPM_EBM | IBM_CPM_PLB | IBM_CPM_OPB \ + | IBM_CPM_TMRCLK | IBM_CPM_DMA | IBM_CPM_PCI) + +#define PPC440GP_OPB_BASE_START 0x0000000140000000ULL + +/* + * Serial port defines + */ +#define RS_TABLE_SIZE 2 + +#endif /* __PPC_PLATFORMS_IBM440GP_H */ +#endif /* __KERNEL__ */ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/platforms/ibm440gx.c linux-2.4.23-pre8/arch/ppc/platforms/ibm440gx.c --- linux-2.4.22/arch/ppc/platforms/ibm440gx.c 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/platforms/ibm440gx.c 2003-10-22 22:49:03.000000000 +0000 @@ -0,0 +1,129 @@ +/* + * arch/ppc/platforms/4xx/ibm440gx.c + * + * PPC440GX I/O descriptions + * + * Matt Porter + * Copyright 2002-2003 MontaVista Software Inc. + * + * Eugene Surovegin or + * Copyright (c) 2003 Zultys Technologies + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + */ +#include +#include +#include +#include + +#if defined(EMAC_NUMS) && EMAC_NUMS > 0 +u32 emac_phy_map[EMAC_NUMS]; +EXPORT_SYMBOL(emac_phy_map); +#endif + +static struct ocp_func_emac_data ibm440gx_emac0_def = { + .zmii_idx = 0, /* ZMII device index */ + .zmii_mux = 0, /* ZMII input of this EMAC */ + .mal_idx = 0, /* MAL device index */ + .mal_rx_chan = 0, /* MAL rx channel number */ + .mal_tx1_chan = 0, /* MAL tx channel 1 number */ + .mal_tx2_chan = -1, /* MAL tx channel 2 number */ + .wol_irq = BL_MAC_WOL, /* WOL interrupt number */ + .mdio_idx = -1, /* No shared MDIO */ +}; + +static struct ocp_func_emac_data ibm440gx_emac1_def = { + .zmii_idx = 0, /* ZMII device index */ + .zmii_mux = 1, /* ZMII input of this EMAC */ + .mal_idx = 0, /* MAL device index */ + .mal_rx_chan = 1, /* MAL rx channel number */ + .mal_tx1_chan = 1, /* MAL tx channel 1 number */ + .mal_tx2_chan = -1, /* MAL tx channel 2 number */ + .wol_irq = BL_MAC_WOL1, /* WOL interrupt number */ + .mdio_idx = -1, /* No shared MDIO */ +}; + +static struct ocp_func_mal_data ibm440gx_mal0_def = { + .num_tx_chans = 2*EMAC_NUMS, /* Number of TX channels */ + .num_rx_chans = EMAC_NUMS, /* Number of RX channels */ +}; + +struct ocp_def core_ocp[] __initdata = { + { .vendor = OCP_VENDOR_IBM, + .function = OCP_FUNC_OPB, + .index = 0, + .paddr = PPC440GX_OPB_BASE_START, + .irq = OCP_IRQ_NA, + .pm = OCP_CPM_NA, + }, + { .vendor = OCP_VENDOR_IBM, + .function = OCP_FUNC_16550, + .index = 0, + .paddr = PPC440GX_UART0_ADDR, + .irq = UART0_INT, + .pm = IBM_CPM_UART0, + }, + { .vendor = OCP_VENDOR_IBM, + .function = OCP_FUNC_16550, + .index = 1, + .paddr = PPC440GX_UART1_ADDR, + .irq = UART1_INT, + .pm = IBM_CPM_UART1, + }, + { .vendor = OCP_VENDOR_IBM, + .function = OCP_FUNC_IIC, + .index = 0, + .paddr = PPC440GX_IIC0_ADDR, + .irq = IIC0_IRQ, + .pm = IBM_CPM_IIC0, + }, + { .vendor = OCP_VENDOR_IBM, + .function = OCP_FUNC_IIC, + .index = 1, + .paddr = PPC440GX_IIC1_ADDR, + .irq = IIC1_IRQ, + .pm = IBM_CPM_IIC1, + }, + { .vendor = OCP_VENDOR_IBM, + .function = OCP_FUNC_GPIO, + .index = 0, + .paddr = PPC440GX_GPIO0_ADDR, + .irq = OCP_IRQ_NA, + .pm = IBM_CPM_GPIO0, + }, + { .vendor = OCP_VENDOR_IBM, + .function = OCP_FUNC_MAL, + .paddr = OCP_PADDR_NA, + .irq = OCP_IRQ_NA, + .pm = OCP_CPM_NA, + .additions = &ibm440gx_mal0_def, + }, + { .vendor = OCP_VENDOR_IBM, + .function = OCP_FUNC_EMAC, + .index = 0, + .paddr = PPC440GX_EMAC0_ADDR, + .irq = BL_MAC_ETH0, + .pm = OCP_CPM_NA, + .additions = &ibm440gx_emac0_def, + }, + { .vendor = OCP_VENDOR_IBM, + .function = OCP_FUNC_EMAC, + .index = 1, + .paddr = PPC440GX_EMAC1_ADDR, + .irq = BL_MAC_ETH1, + .pm = OCP_CPM_NA, + .additions = &ibm440gx_emac1_def, + }, + { .vendor = OCP_VENDOR_IBM, + .function = OCP_FUNC_ZMII, + .paddr = PPC440GX_ZMII_ADDR, + .irq = OCP_IRQ_NA, + .pm = OCP_CPM_NA, + }, + { .vendor = OCP_VENDOR_INVALID + } +}; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/platforms/ibm440gx.h linux-2.4.23-pre8/arch/ppc/platforms/ibm440gx.h --- linux-2.4.22/arch/ppc/platforms/ibm440gx.h 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/platforms/ibm440gx.h 2003-10-22 22:48:30.000000000 +0000 @@ -0,0 +1,123 @@ +/* + * arch/ppc/platforms/ibm440gx.h + * + * PPC440GX definitions + * + * Matt Porter + * + * Copyright 2002 Roland Dreier + * Copyright 2003 MontaVista Software, Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + */ + +#ifdef __KERNEL__ +#ifndef __PPC_PLATFORMS_IBM440GX_H +#define __PPC_PLATFORMS_IBM440GX_H + +#include + +#include + +/* UART */ +#define PPC440GX_UART0_ADDR 0x0000000140000200 +#define PPC440GX_UART1_ADDR 0x0000000140000300 +#define UART0_INT 0 +#define UART1_INT 1 + +/* EMAC */ +#define PPC440GX_EMAC0_ADDR 0x0000000140000800 +#define PPC440GX_EMAC1_ADDR 0x0000000140000900 +#define PPC440GX_EMAC2_ADDR 0x0000000140000C00 +#define PPC440GX_EMAC3_ADDR 0x0000000140000E00 +#define PPC440GX_EMAC_SIZE 0xFC +#define EMAC_NUMS 2 +#define BL_MAC_WOL 61 /* WOL */ +#define BL_MAC_WOL1 63 /* WOL */ +#define BL_MAC_WOL2 65 /* WOL */ +#define BL_MAC_WOL3 67 /* WOL */ +#define BL_MAL_SERR 32 /* MAL SERR */ +#define BL_MAL_TXDE 33 /* MAL TXDE */ +#define BL_MAL_RXDE 34 /* MAL RXDE */ +#define BL_MAL_TXEOB 10 /* MAL TX EOB */ +#define BL_MAL_RXEOB 11 /* MAL RX EOB */ +#define BL_MAC_ETH0 60 /* MAC */ +#define BL_MAC_ETH1 62 /* MAC */ +#define BL_MAC_ETH2 64 /* MAC */ +#define BL_MAC_ETH3 66 /* MAC */ +#define BL_TAH0 68 /* TAH 0 */ +#define BL_TAH1 69 /* TAH 1 */ + +/* TAH */ +#define PPC440GX_TAH0_ADDR 0x0000000140000B00 +#define PPC440GX_TAH1_ADDR 0x0000000140000D00 +#define PPC440GX_TAH_SIZE 0xFC + +/* ZMII */ +#define PPC440GX_ZMII_ADDR 0x0000000140000780 +#define PPC440GX_ZMII_SIZE 0x0c + +/* RGMII */ +#define PPC440GX_RGMII_ADDR 0x0000000140000790 +#define PPC440GX_RGMII_SIZE 0x0c + +/* IIC */ +#define PPC440GX_IIC0_ADDR 0x40000400 +#define PPC440GX_IIC1_ADDR 0x40000500 +#define IIC0_IRQ 2 +#define IIC1_IRQ 3 + +/* GPIO */ +#define PPC440GX_GPIO0_ADDR 0x0000000140000700 + +/* Clock and Power Management */ +#define IBM_CPM_IIC0 0x80000000 /* IIC interface */ +#define IBM_CPM_IIC1 0x40000000 /* IIC interface */ +#define IBM_CPM_PCI 0x20000000 /* PCI bridge */ +#define IBM_CPM_RGMII 0x10000000 /* RGMII */ +#define IBM_CPM_TAHOE0 0x08000000 /* TAHOE 0 */ +#define IBM_CPM_TAHOE1 0x04000000 /* TAHOE 1 */ +#define IBM_CPM_CPU 0x02000000 /* processor core */ +#define IBM_CPM_DMA 0x01000000 /* DMA controller */ +#define IBM_CPM_BGO 0x00800000 /* PLB to OPB bus arbiter */ +#define IBM_CPM_BGI 0x00400000 /* OPB to PLB bridge */ +#define IBM_CPM_EBC 0x00200000 /* External Bux Controller */ +#define IBM_CPM_EBM 0x00100000 /* Ext Bus Master Interface */ +#define IBM_CPM_DMC 0x00080000 /* SDRAM peripheral controller */ +#define IBM_CPM_PLB 0x00040000 /* PLB bus arbiter */ +#define IBM_CPM_SRAM 0x00020000 /* SRAM memory controller */ +#define IBM_CPM_PPM 0x00002000 /* PLB Performance Monitor */ +#define IBM_CPM_UIC1 0x00001000 /* Universal Interrupt Controller */ +#define IBM_CPM_GPIO0 0x00000800 /* General Purpose IO (??) */ +#define IBM_CPM_GPT 0x00000400 /* General Purpose Timers */ +#define IBM_CPM_UART0 0x00000200 /* serial port 0 */ +#define IBM_CPM_UART1 0x00000100 /* serial port 1 */ +#define IBM_CPM_UIC0 0x00000080 /* Universal Interrupt Controller */ +#define IBM_CPM_TMRCLK 0x00000040 /* CPU timers */ +#define IBM_CPM_EMAC0 0x00000020 /* EMAC 0 */ +#define IBM_CPM_EMAC1 0x00000010 /* EMAC 1 */ +#define IBM_CPM_EMAC2 0x00000008 /* EMAC 2 */ +#define IBM_CPM_EMAC3 0x00000004 /* EMAC 3 */ + +#define DFLT_IBM4xx_PM ~(IBM_CPM_UIC | IBM_CPM_UIC1 | IBM_CPM_CPU \ + | IBM_CPM_EBC | IBM_CPM_SRAM | IBM_CPM_BGO \ + | IBM_CPM_EBM | IBM_CPM_PLB | IBM_CPM_OPB \ + | IBM_CPM_TMRCLK | IBM_CPM_DMA | IBM_CPM_PCI \ + | IBM_CPM_TAHOE0 | IBM_CPM_TAHOE1 \ + | IBM_CPM_EMAC0 | IBM_CPM_EMAC1 \ + | IBM_CPM_EMAC2 | IBM_CPM_EMAC3 ) + +/* OPB */ +#define PPC440GX_OPB_BASE_START 0x0000000140000000 + +/* + * Serial port defines + */ +#define RS_TABLE_SIZE 2 + +#endif /* __PPC_PLATFORMS_IBM440GX_H */ +#endif /* __KERNEL__ */ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/platforms/ocotea.c linux-2.4.23-pre8/arch/ppc/platforms/ocotea.c --- linux-2.4.22/arch/ppc/platforms/ocotea.c 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/platforms/ocotea.c 2003-10-22 22:48:12.000000000 +0000 @@ -0,0 +1,441 @@ +/* + * arch/ppc/platforms/ocotea.c + * + * Ocotea board specific routines + * + * Matt Porter + * + * Copyright 2003 MontaVista Software Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern void abort(void); +extern int pckbd_setkeycode(unsigned int scancode, unsigned int keycode); +extern int pckbd_getkeycode(unsigned int scancode); +extern int pckbd_translate(unsigned char scancode, unsigned char *keycode, + char raw_mode); +extern void gen550_progress(char *, unsigned short); +extern void gen550_init(int, struct serial_struct *); + +/* Global Variables */ +unsigned char __res[sizeof (bd_t)]; + +static void __init +ocotea_calibrate_decr(void) +{ + unsigned int freq; + + freq = OCOTEA_SYSCLK; + + tb_ticks_per_jiffy = freq / HZ; + tb_to_us = mulhwu_scale_factor(freq, 1000000); + + /* Set the time base to zero */ + mtspr(SPRN_TBWL, 0); + mtspr(SPRN_TBWU, 0); + + /* Clear any pending timer interrupts */ + mtspr(SPRN_TSR, TSR_ENW | TSR_WIS | TSR_DIS | TSR_FIS); + + /* Enable decrementer interrupt */ + mtspr(SPRN_TCR, TCR_DIE); +} + +static int +ocotea_show_cpuinfo(struct seq_file *m) +{ + seq_printf(m, "vendor\t\t: IBM\n"); + seq_printf(m, "machine\t\t: PPC440GX EVB (Ocotea)\n"); + + return 0; +} +static inline int +ocotea_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) +{ + static char pci_irq_table[][4] = + /* + * PCI IDSEL/INTPIN->INTLINE + * A B C D + */ + { + { 23, 23, 23, 23 }, /* IDSEL 1 - PCI Slot 0 */ + { 24, 24, 24, 24 }, /* IDSEL 2 - PCI Slot 1 */ + { 25, 25, 25, 25 }, /* IDSEL 3 - PCI Slot 2 */ + { 26, 26, 26, 26 }, /* IDSEL 4 - PCI Slot 3 */ + }; + + const long min_idsel = 1, max_idsel = 4, irqs_per_slot = 4; + return PCI_IRQ_TABLE_LOOKUP; +} + +#define PCIX_READW(offset) \ + (readw((u32)pcix_reg_base+offset)) + +#define PCIX_WRITEW(value, offset) \ + (writew(value, (u32)pcix_reg_base+offset)) + +#define PCIX_WRITEL(value, offset) \ + (writel(value, (u32)pcix_reg_base+offset)) + +/* + * FIXME: This is only here to "make it work". This will move + * to a ibm_pcix.c which will contain a generic IBM PCIX bridge + * configuration library. -Matt + */ +static void __init +ocotea_setup_pcix(void) +{ + void *pcix_reg_base; + + pcix_reg_base = ioremap64(PCIX0_REG_BASE, PCIX0_REG_SIZE); + + /* Enable PCIX0 I/O, Mem, and Busmaster cycles */ + PCIX_WRITEW(PCIX_READW(PCIX0_COMMAND) | PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER, PCIX0_COMMAND); + + /* Disable all windows */ + PCIX_WRITEL(0, PCIX0_POM0SA); + PCIX_WRITEL(0, PCIX0_POM1SA); + PCIX_WRITEL(0, PCIX0_POM2SA); + PCIX_WRITEL(0, PCIX0_PIM0SA); + PCIX_WRITEL(0, PCIX0_PIM0SAH); + PCIX_WRITEL(0, PCIX0_PIM1SA); + PCIX_WRITEL(0, PCIX0_PIM2SA); + PCIX_WRITEL(0, PCIX0_PIM2SAH); + + /* Setup 2GB PLB->PCI outbound mem window (3_8000_0000->0_8000_0000) */ + PCIX_WRITEL(0x00000003, PCIX0_POM0LAH); + PCIX_WRITEL(0x80000000, PCIX0_POM0LAL); + PCIX_WRITEL(0x00000000, PCIX0_POM0PCIAH); + PCIX_WRITEL(0x80000000, PCIX0_POM0PCIAL); + PCIX_WRITEL(0x80000001, PCIX0_POM0SA); + + /* Setup 2GB PCI->PLB inbound memory window at 0, enable MSIs */ + PCIX_WRITEL(0x00000000, PCIX0_PIM0LAH); + PCIX_WRITEL(0x00000000, PCIX0_PIM0LAL); + PCIX_WRITEL(0xe0000007, PCIX0_PIM0SA); + + eieio(); +} + +static void __init +ocotea_setup_hose(void) +{ + struct pci_controller *hose; + + /* Configure windows on the PCI-X host bridge */ + ocotea_setup_pcix(); + + hose = pcibios_alloc_controller(); + + if (!hose) + return; + + hose->first_busno = 0; + hose->last_busno = 0xff; + + hose->pci_mem_offset = OCOTEA_PCI_MEM_OFFSET; + + pci_init_resource(&hose->io_resource, + OCOTEA_PCI_LOWER_IO, + OCOTEA_PCI_UPPER_IO, + IORESOURCE_IO, + "PCI host bridge"); + + pci_init_resource(&hose->mem_resources[0], + OCOTEA_PCI_LOWER_MEM, + OCOTEA_PCI_UPPER_MEM, + IORESOURCE_MEM, + "PCI host bridge"); + + hose->io_space.start = OCOTEA_PCI_LOWER_IO; + hose->io_space.end = OCOTEA_PCI_UPPER_IO; + hose->mem_space.start = OCOTEA_PCI_LOWER_MEM; + hose->mem_space.end = OCOTEA_PCI_UPPER_MEM; + isa_io_base = + (unsigned long)ioremap64(OCOTEA_PCI_IO_BASE, OCOTEA_PCI_IO_SIZE); + hose->io_base_virt = (void *)isa_io_base; + + setup_indirect_pci(hose, + OCOTEA_PCI_CFGA_PLB32, + OCOTEA_PCI_CFGD_PLB32); + hose->set_cfg_type = 1; + + hose->last_busno = pciauto_bus_scan(hose, hose->first_busno); + + ppc_md.pci_swizzle = common_swizzle; + ppc_md.pci_map_irq = ocotea_map_irq; +} + + +TODC_ALLOC(); + +static void __init +ocotea_early_serial_map(void) +{ + struct serial_struct serial_req; + + /* Setup ioremapped serial port access */ + memset(&serial_req, 0, sizeof(serial_req)); + serial_req.line = 0; + serial_req.baud_base = BASE_BAUD; + serial_req.port = 0; + serial_req.irq = 0; + serial_req.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST; + serial_req.io_type = SERIAL_IO_MEM; + serial_req.iomem_base = ioremap64(PPC440GX_UART0_ADDR, 8); + serial_req.iomem_reg_shift = 0; + +#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB) + /* Configure debug serial access */ + gen550_init(0, &serial_req); +#endif + + if (early_serial_setup(&serial_req) != 0) { + printk("Early serial init of port 0 failed\n"); + } + + /* Assume early_serial_setup() doesn't modify serial_req */ + serial_req.line = 1; + serial_req.port = 1; + serial_req.irq = 1; + serial_req.iomem_base = ioremap64(PPC440GX_UART1_ADDR, 8); + +#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB) + /* Configure debug serial access */ + gen550_init(1, &serial_req); +#endif + + if (early_serial_setup(&serial_req) != 0) { + printk("Early serial init of port 1 failed\n"); + } +} + +static void __init +ocotea_setup_arch(void) +{ + unsigned char *addr; + unsigned long long mac64; + bd_t *bip = (bd_t *) __res; + + /* Retrieve MAC addresses from flash */ + addr = ioremap64(OCOTEA_MAC_BASE, OCOTEA_MAC_SIZE); + mac64 = simple_strtoull(addr, 0, 16); + memcpy(bip->bi_enetaddr[0], (char *)&mac64+2, 6); + mac64 = simple_strtoull(addr+OCOTEA_MAC1_OFFSET, 0, 16); + memcpy(bip->bi_enetaddr[1], (char *)&mac64+2, 6); + iounmap(addr); + + /* Set EMAC PHY map to not probe address 0x00 */ + emac_phy_map[0] = 0x00000001; + emac_phy_map[1] = 0x00000001; + +#if !defined(CONFIG_BDI_SWITCH) + /* + * The Abatron BDI JTAG debugger does not tolerate others + * mucking with the debug registers. + */ + mtspr(SPRN_DBCR0, (DBCR0_TDE | DBCR0_IDM)); +#endif + + /* Setup TODC access */ + TODC_INIT(TODC_TYPE_DS1743, + 0, + 0, + ioremap64(OCOTEA_RTC_ADDR, OCOTEA_RTC_SIZE), + 8); + + /* init to some ~sane value until calibrate_delay() runs */ + loops_per_jiffy = 50000000/HZ; + + /* Setup PCI host bridge */ + ocotea_setup_hose(); + +#ifdef CONFIG_BLK_DEV_INITRD + if (initrd_start) + ROOT_DEV = to_kdev_t(0x0100); /* /dev/ram */ + else +#endif +#ifdef CONFIG_ROOT_NFS + ROOT_DEV = to_kdev_t(0x00ff); /* /dev/nfs */ +#else + ROOT_DEV = to_kdev_t(0x0301); /* /dev/hda1 */ +#endif + +#ifdef CONFIG_VT + conswitchp = &dummy_con; +#endif + + ocotea_early_serial_map(); + + /* Identify the system */ + printk("IBM Ocotea port (MontaVista Software, Inc. )\n"); +} + +static void +ocotea_restart(char *cmd) +{ + local_irq_disable(); + abort(); +} + +static void +ocotea_power_off(void) +{ + local_irq_disable(); + for(;;); +} + +static void +ocotea_halt(void) +{ + local_irq_disable(); + for(;;); +} + +/* + * Read the 440GX memory controller to get size of system memory. + */ +static unsigned long __init +ocotea_find_end_of_memory(void) +{ + u32 i, bank_config; + u32 mem_size = 0; + + for (i=0; i<4; i++) + { + switch (i) + { + case 0: + mtdcr(DCRN_SDRAM0_CFGADDR, SDRAM0_B0CR); + break; + case 1: + mtdcr(DCRN_SDRAM0_CFGADDR, SDRAM0_B1CR); + break; + case 2: + mtdcr(DCRN_SDRAM0_CFGADDR, SDRAM0_B2CR); + break; + case 3: + mtdcr(DCRN_SDRAM0_CFGADDR, SDRAM0_B3CR); + break; + } + + bank_config = mfdcr(DCRN_SDRAM0_CFGDATA); + + if (!(bank_config & SDRAM_CONFIG_BANK_ENABLE)) + continue; + switch (SDRAM_CONFIG_BANK_SIZE(bank_config)) + { + case SDRAM_CONFIG_SIZE_8M: + mem_size += PPC44x_MEM_SIZE_8M; + break; + case SDRAM_CONFIG_SIZE_16M: + mem_size += PPC44x_MEM_SIZE_16M; + break; + case SDRAM_CONFIG_SIZE_32M: + mem_size += PPC44x_MEM_SIZE_32M; + break; + case SDRAM_CONFIG_SIZE_64M: + mem_size += PPC44x_MEM_SIZE_64M; + break; + case SDRAM_CONFIG_SIZE_128M: + mem_size += PPC44x_MEM_SIZE_128M; + break; + case SDRAM_CONFIG_SIZE_256M: + mem_size += PPC44x_MEM_SIZE_256M; + break; + case SDRAM_CONFIG_SIZE_512M: + mem_size += PPC44x_MEM_SIZE_512M; + break; + } + } + return mem_size; +} + +static void __init +ocotea_init_irq(void) +{ + int i; + + /* Enable PPC440GP interrupt compatibility mode */ + SDR_WRITE(DCRN_SDR_MFR,SDR_READ(DCRN_SDR_MFR) | DCRN_SDR_MFR_PCM); + + ppc4xx_pic_init(); + + for (i = 0; i < NR_IRQS; i++) + irq_desc[i].handler = ppc4xx_pic; +} + +void __init platform_init(unsigned long r3, unsigned long r4, + unsigned long r5, unsigned long r6, unsigned long r7) +{ + parse_bootinfo(find_bootinfo()); + + ppc_md.setup_arch = ocotea_setup_arch; + ppc_md.show_cpuinfo = ocotea_show_cpuinfo; + ppc_md.init_IRQ = ocotea_init_irq; + ppc_md.get_irq = NULL; /* Set in ppc4xx_pic_init() */ + + ppc_md.find_end_of_memory = ocotea_find_end_of_memory; + + ppc_md.restart = ocotea_restart; + ppc_md.power_off = ocotea_power_off; + ppc_md.halt = ocotea_halt; + + ppc_md.calibrate_decr = ocotea_calibrate_decr; + ppc_md.time_init = todc_time_init; + ppc_md.set_rtc_time = todc_set_rtc_time; + ppc_md.get_rtc_time = todc_get_rtc_time; + + ppc_md.nvram_read_val = todc_direct_read_val; + ppc_md.nvram_write_val = todc_direct_write_val; +#if defined(CONFIG_VT) + ppc_md.kbd_setkeycode = pckbd_setkeycode; + ppc_md.kbd_getkeycode = pckbd_getkeycode; + ppc_md.kbd_translate = pckbd_translate; + ppc_md.kbd_unexpected_up = pckbd_unexpected_up; + ppc_md.kbd_leds = pckbd_leds; + ppc_md.kbd_init_hw = 0; +#endif + +#ifdef CONFIG_SERIAL_TEXT_DEBUG + ppc_md.progress = gen550_progress; +#endif /* CONFIG_SERIAL_TEXT_DEBUG */ +#ifdef CONFIG_KGDB + ppc_md.early_serial_map = ocotea_early_serial_map; +#endif +} diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc/platforms/ocotea.h linux-2.4.23-pre8/arch/ppc/platforms/ocotea.h --- linux-2.4.22/arch/ppc/platforms/ocotea.h 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc/platforms/ocotea.h 2003-10-22 22:47:52.000000000 +0000 @@ -0,0 +1,84 @@ +/* + * arch/ppc/platforms/ocotea.h + * + * Ocotea board definitions + * + * Matt Porter + * + * Copyright 2003 MontaVista Software Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + */ + +#ifdef __KERNEL__ +#ifndef __ASM_OCOTEA_H__ +#define __ASM_OCOTEA_H__ + +#include +#include + +/* F/W TLB mapping used in bootloader glue to reset EMAC */ +#define PPC44x_EMAC0_MR0 0xE0000800 + +/* Location of MAC addresses in firmware */ +#define OCOTEA_MAC_BASE (OCOTEA_SMALL_FLASH_HIGH+0xc0500) +#define OCOTEA_MAC_SIZE 0x200 +#define OCOTEA_MAC1_OFFSET 0x100 + +/* Default clock rate */ +#define OCOTEA_SYSCLK 25000000 + +/* RTC/NVRAM location */ +#define OCOTEA_RTC_ADDR 0x0000000148000000ULL +#define OCOTEA_RTC_SIZE 0x2000 + +/* Flash */ +#define OCOTEA_FPGA_ADDR 0x0000000148300000ULL +#define OCOTEA_BOOT_LARGE_FLASH(x) (x & 0x40) +#define OCOTEA_SMALL_FLASH_LOW 0x00000001ff900000ULL +#define OCOTEA_SMALL_FLASH_HIGH 0x00000001fff00000ULL +#define OCOTEA_SMALL_FLASH_SIZE 0x100000 +#define OCOTEA_LARGE_FLASH_LOW 0x00000001ff800000ULL +#define OCOTEA_LARGE_FLASH_HIGH 0x00000001ffc00000ULL +#define OCOTEA_LARGE_FLASH_SIZE 0x400000 + +/* + * Serial port defines + */ +#define RS_TABLE_SIZE 2 + +/* OpenBIOS defined UART mappings, used before early_serial_setup */ +#define UART0_IO_BASE (u8 *) 0xE0000200 +#define UART1_IO_BASE (u8 *) 0xE0000300 + +#define BASE_BAUD 11059200/16 +#define STD_UART_OP(num) \ + { 0, BASE_BAUD, 0, UART##num##_INT, \ + (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST), \ + iomem_base: UART##num##_IO_BASE, \ + io_type: SERIAL_IO_MEM}, + +#define SERIAL_PORT_DFNS \ + STD_UART_OP(0) \ + STD_UART_OP(1) + +/* PCI support */ +#define OCOTEA_PCI_LOWER_IO 0x00000000 +#define OCOTEA_PCI_UPPER_IO 0x0000ffff +#define OCOTEA_PCI_LOWER_MEM 0x80000000 +#define OCOTEA_PCI_UPPER_MEM 0xffffefff + +#define OCOTEA_PCI_CFGREGS_BASE 0x000000020ec00000ULL +#define OCOTEA_PCI_CFGA_PLB32 0x0ec00000 +#define OCOTEA_PCI_CFGD_PLB32 0x0ec00004 + +#define OCOTEA_PCI_IO_BASE 0x0000000208000000ULL +#define OCOTEA_PCI_IO_SIZE 0x00010000 +#define OCOTEA_PCI_MEM_OFFSET 0x00000000 + +#endif /* __ASM_OCOTEA_H__ */ +#endif /* __KERNEL__ */ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc64/config.in linux-2.4.23-pre8/arch/ppc64/config.in --- linux-2.4.22/arch/ppc64/config.in 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc64/config.in 2003-10-22 22:48:13.000000000 +0000 @@ -29,6 +29,7 @@ bool 'Symmetric multi-processing support' CONFIG_SMP if [ "$CONFIG_SMP" = "y" ]; then bool ' Distribute interrupts on all CPUs by default' CONFIG_IRQ_ALL_CPUS + int 'Maximum number of CPUs (2-32)' CONFIG_NR_CPUS 32 if [ "$CONFIG_PPC_PSERIES" = "y" ]; then bool ' Hardware multithreading' CONFIG_HMT fi @@ -262,4 +263,7 @@ dep_bool ' LKCD RLE compression' CONFIG_DUMP_COMPRESS_RLE $CONFIG_DUMP dep_bool ' LKCD GZIP compression' CONFIG_DUMP_COMPRESS_GZIP $CONFIG_DUMP fi + +int 'Kernel messages buffer length shift (0 = default)' CONFIG_LOG_BUF_SHIFT 0 + endmenu diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/ppc64/defconfig linux-2.4.23-pre8/arch/ppc64/defconfig --- linux-2.4.22/arch/ppc64/defconfig 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/ppc64/defconfig 2003-10-22 22:48:53.000000000 +0000 @@ -22,6 +22,7 @@ CONFIG_PPC_PSERIES=y # CONFIG_PPC_ISERIES is not set CONFIG_SMP=y +CONFIG_NR_CPUS=32 CONFIG_IRQ_ALL_CPUS=y # CONFIG_HMT is not set # CONFIG_MSCHUNKS is not set diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/s390/config.in linux-2.4.23-pre8/arch/s390/config.in --- linux-2.4.22/arch/s390/config.in 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/s390/config.in 2003-10-22 22:49:17.000000000 +0000 @@ -32,6 +32,9 @@ comment 'Processor type and features' bool 'Symmetric multi-processing support' CONFIG_SMP bool 'IEEE FPU emulation' CONFIG_MATHEMU +if [ "$CONFIG_SMP" = "y" ]; then + int 'Maximum number of CPUs (2-32)' CONFIG_NR_CPUS 32 +fi endmenu mainmenu_option next_comment @@ -77,6 +80,9 @@ # bool 'Remote GDB kernel debugging' CONFIG_REMOTE_DEBUG #fi bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ + +int 'Kernel messages buffer length shift (0 = default)' CONFIG_LOG_BUF_SHIFT 0 + endmenu source crypto/Config.in diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/s390/defconfig linux-2.4.23-pre8/arch/s390/defconfig --- linux-2.4.22/arch/s390/defconfig 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/s390/defconfig 2003-10-22 22:49:21.000000000 +0000 @@ -27,6 +27,7 @@ # CONFIG_SMP=y CONFIG_MATHEMU=y +CONFIG_NR_CPUS=32 # # General setup diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/s390x/config.in linux-2.4.23-pre8/arch/s390x/config.in --- linux-2.4.22/arch/s390x/config.in 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/s390x/config.in 2003-10-22 22:47:42.000000000 +0000 @@ -22,6 +22,9 @@ mainmenu_option next_comment comment 'Processor type and features' bool 'Symmetric multi-processing support' CONFIG_SMP +if [ "$CONFIG_SMP" = "y" ]; then + int 'Maximum number of CPUs (2-32)' CONFIG_NR_CPUS 32 +fi bool 'Kernel support for 31 bit emulation' CONFIG_S390_SUPPORT if [ "$CONFIG_S390_SUPPORT" = "y" ]; then tristate 'Kernel support for 31 bit ELF binaries' CONFIG_BINFMT_ELF32 @@ -81,6 +84,9 @@ # bool 'Remote GDB kernel debugging' CONFIG_REMOTE_DEBUG #fi bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ + +int 'Kernel messages buffer length shift (0 = default)' CONFIG_LOG_BUF_SHIFT 0 + endmenu source crypto/Config.in diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/s390x/defconfig linux-2.4.23-pre8/arch/s390x/defconfig --- linux-2.4.22/arch/s390x/defconfig 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/s390x/defconfig 2003-10-22 22:47:28.000000000 +0000 @@ -21,6 +21,7 @@ CONFIG_SMP=y CONFIG_S390_SUPPORT=y CONFIG_BINFMT_ELF32=y +CONFIG_NR_CPUS=32 # # Loadable module support diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sh/Makefile linux-2.4.23-pre8/arch/sh/Makefile --- linux-2.4.22/arch/sh/Makefile 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/sh/Makefile 2003-10-22 22:49:09.000000000 +0000 @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.1.1.1.2.2 2002/05/10 17:58:54 jzs Exp $ +# $Id: Makefile,v 1.1.1.1.2.4 2003/08/22 04:04:16 sugioka Exp $ # # This file is subject to the terms and conditions of the GNU General Public # License. See the file "COPYING" in the main directory of this archive @@ -87,7 +87,7 @@ FORCE: ; zImage: vmlinux - @$(MAKEBOOT) zImage + @$(MAKEBOOT) $@ compressed: zImage diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sh/boot/compressed/Makefile linux-2.4.23-pre8/arch/sh/boot/compressed/Makefile --- linux-2.4.22/arch/sh/boot/compressed/Makefile 2000-10-02 18:57:33.000000000 +0000 +++ linux-2.4.23-pre8/arch/sh/boot/compressed/Makefile 2003-10-22 22:48:59.000000000 +0000 @@ -18,9 +18,9 @@ # # ZIMAGE_OFFSET is the load offset of the compression loader # -ZIMAGE_OFFSET = $(shell printf "0x%8x" $$[0x80000000+0x$(CONFIG_MEMORY_START)+0x200000+0x10000]) +ZIMAGE_OFFSET = $(shell printf "0x%8x" $$[0x80000000+0x$(CONFIG_MEMORY_START)+0x$(CONFIG_BOOT_LINK_OFFSET)]) -ZLINKFLAGS = -Ttext $(ZIMAGE_OFFSET) $(ZLDFLAGS) +ZLINKFLAGS = -Ttext $(ZIMAGE_OFFSET) $(ZLDFLAGS) all: vmlinux diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sh/boot/compressed/head.S linux-2.4.23-pre8/arch/sh/boot/compressed/head.S --- linux-2.4.22/arch/sh/boot/compressed/head.S 2001-01-29 02:56:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/sh/boot/compressed/head.S 2003-10-22 22:48:15.000000000 +0000 @@ -2,6 +2,7 @@ * linux/arch/sh/boot/compressed/head.S * * Copyright (C) 1999 Stuart Menefy + * Copyright (C) 2003 SUGIOKA Toshinobu */ .text @@ -14,7 +15,54 @@ mov.l init_sr, r1 ldc r1, sr - /* First clear BSS */ + /* Move myself to proper location if necessary */ + mova 1f, r0 + mov.l 1f, r2 + cmp/eq r2, r0 + bt clear_bss + sub r0, r2 + mov.l bss_start_addr, r0 + mov #0xe0, r1 + and r1, r0 ! align cache line + mov.l text_start_addr, r3 + mov r0, r1 + sub r2, r1 +3: + mov.l @r1, r4 + mov.l @(4,r1), r5 + mov.l @(8,r1), r6 + mov.l @(12,r1), r7 + mov.l @(16,r1), r8 + mov.l @(20,r1), r9 + mov.l @(24,r1), r10 + mov.l @(28,r1), r11 + mov.l r4, @r0 + mov.l r5, @(4,r0) + mov.l r6, @(8,r0) + mov.l r7, @(12,r0) + mov.l r8, @(16,r0) + mov.l r9, @(20,r0) + mov.l r10, @(24,r0) + mov.l r11, @(28,r0) +#ifdef CONFIG_CPU_SH4 + ocbwb @r0 +#endif + cmp/hi r3, r0 + add #-32, r0 + bt/s 3b + add #-32, r1 + mov.l 2f, r0 + jmp @r0 + nop + + .align 2 +1: .long 1b +2: .long clear_bss +text_start_addr: + .long startup + + /* Clear BSS */ +clear_bss: mov.l end_addr, r1 mov.l bss_start_addr, r2 mov #0, r0 diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sh/config.in linux-2.4.23-pre8/arch/sh/config.in --- linux-2.4.22/arch/sh/config.in 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/sh/config.in 2003-10-22 22:48:57.000000000 +0000 @@ -28,6 +28,7 @@ comment 'Processor type and features' choice 'SuperH system type' \ "Generic CONFIG_SH_GENERIC \ + SH4-202-MicroDev CONFIG_SH_SH4202_MICRODEV \ SolutionEngine CONFIG_SH_SOLUTION_ENGINE \ SolutionEngine7751 CONFIG_SH_7751_SOLUTION_ENGINE \ SHMobileSolutionEngine CONFIG_SH_MOBILE_SOLUTION_ENGINE \ @@ -68,7 +69,9 @@ SH7708 CONFIG_CPU_SUBTYPE_SH7708 \ SH7709 CONFIG_CPU_SUBTYPE_SH7709 \ SH7750 CONFIG_CPU_SUBTYPE_SH7750 \ + SH7751R CONFIG_CPU_SUBTYPE_SH7751R \ SH7751 CONFIG_CPU_SUBTYPE_SH7751 \ + SH4-202 CONFIG_CPU_SUBTYPE_SH4_202 \ ST40RA/ST40STB1 CONFIG_CPU_SUBTYPE_ST40STB1 \ ST40GX1 CONFIG_CPU_SUBTYPE_ST40GX1" SH7708 if [ "$CONFIG_CPU_SUBTYPE_SH7300" = "y" ]; then @@ -95,6 +98,19 @@ define_bool CONFIG_CPU_SH3 n define_bool CONFIG_CPU_SH4 y fi +if [ "$CONFIG_CPU_SUBTYPE_SH7751R" = "y" ]; then + define_bool CONFIG_CPU_SH3 n + define_bool CONFIG_CPU_SH4 y + define_bool CONFIG_CPU_SUBTYPE_SH7751 y +fi +if [ "$CONFIG_CPU_SUBTYPE_SH4_202" = "y" ]; then + define_bool CONFIG_CPU_SH3 n + define_bool CONFIG_CPU_SH4 y +fi +if [ "$CONFIG_CPU_SUBTYPE_SH7751R" = "y" -o \ + "$CONFIG_CPU_SUBTYPE_SH4_202" = "y" ]; then + bool 'Use 2-way set associative caches' CONFIG_SH_CACHE_ASSOC +fi if [ "$CONFIG_CPU_SUBTYPE_ST40STB1" = "y" ]; then define_bool CONFIG_CPU_SH3 n define_bool CONFIG_CPU_SH4 y @@ -157,6 +173,9 @@ hex 'Physical memory start address' CONFIG_MEMORY_START 08000000 hex 'Physical memory size' CONFIG_MEMORY_SIZE 00400000 fi + +hex 'Link address offset for booting' CONFIG_BOOT_LINK_OFFSET 00210000 + dep_bool 'Enable OC RAM zone (experimental)' CONFIG_SCRATCH_SPACE $CONFIG_EXPERIMENTAL if [ "$CONFIG_CPU_SUBTYPE_ST40" = "y" ]; then @@ -332,9 +351,9 @@ # source drivers/input/Config.in -if [ "$CONFIG_SH_DREAMCAST" = "y" ]; then - source drivers/maple/Config.in -fi +#if [ "$CONFIG_SH_DREAMCAST" = "y" ]; then +# source drivers/maple/Config.in +#fi mainmenu_option next_comment comment 'Character devices' @@ -465,6 +484,9 @@ 8 CONFIG_KGDB_DEFBITS_8" 8 endmenu fi + +int 'Kernel messages buffer length shift (0 = default)' CONFIG_LOG_BUF_SHIFT 0 + endmenu source crypto/Config.in diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sh/kernel/Makefile linux-2.4.23-pre8/arch/sh/kernel/Makefile --- linux-2.4.22/arch/sh/kernel/Makefile 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/sh/kernel/Makefile 2003-10-22 22:49:04.000000000 +0000 @@ -93,6 +93,9 @@ obj-$(CONFIG_SH_KEYWEST) += mach_keywest.o setup_keywest.o io_keywest.o machine-specific-objs += mach_keywest.o setup_keywest.o io_keywest.o +obj-$(CONFIG_SH_SH4202_MICRODEV)+= mach_microdev.o setup_microdev.o io_microdev.o irq_microdev.o +machine-specific-objs += mach_microdev.o setup_microdev.o io_microdev.o irq_microdev.o + # Doesn't compile well, so don't include in machine-specific-objs obj-$(CONFIG_HD64465) += setup_hd64465.o io_hd64465.o hd64465_gpio.o obj-$(CONFIG_SH_DMIDA) += mach_dmida.o diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sh/kernel/entry.S linux-2.4.23-pre8/arch/sh/kernel/entry.S --- linux-2.4.22/arch/sh/kernel/entry.S 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/sh/kernel/entry.S 2003-10-22 22:48:32.000000000 +0000 @@ -589,6 +589,7 @@ mov #0, k1 mov.b k1, @k0 #endif + mov.l @r15+, k2 ! restore EXPEVT mov k4, r15 rte nop @@ -678,6 +679,7 @@ 9: mov.l 3f, k1 ! ! Save the user registers on the stack. + mov.l k2, @-r15 ! EXPEVT add #-4, r15 ! placeholder ! sts.l macl, @-r15 diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sh/kernel/fpu.c linux-2.4.23-pre8/arch/sh/kernel/fpu.c --- linux-2.4.22/arch/sh/kernel/fpu.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/sh/kernel/fpu.c 2003-10-22 22:49:01.000000000 +0000 @@ -18,6 +18,14 @@ #include #include +/* The PR (precision) bit in the FP Status Register must be clear when + * an frchg instruction is executed, otherwise the instruction is undefined. + * Executing frchg with PR set causes a trap on some SH4 implementations. + */ + +#define FPSCR_RCHG 0x00000000 + + /* * Save FPU registers onto task structure. * Assume called with FPU enabled (SR.FD=0). @@ -61,9 +69,11 @@ "fmov.s fr3, @-%0\n\t" "fmov.s fr2, @-%0\n\t" "fmov.s fr1, @-%0\n\t" - "fmov.s fr0, @-%0" + "fmov.s fr0, @-%0\n\t" + "lds %2, fpscr\n\t" : /* no output */ : "r" ((char *)(&tsk->thread.fpu.hard.status)), + "r" (FPSCR_RCHG), "r" (FPSCR_INIT) : "memory"); @@ -112,7 +122,7 @@ "lds.l @%0+, fpscr\n\t" "lds.l @%0+, fpul\n\t" : /* no output */ - : "r" (&tsk->thread.fpu), "r" (FPSCR_INIT) + : "r" (&tsk->thread.fpu), "r" (FPSCR_RCHG) : "memory"); } @@ -160,9 +170,10 @@ "fsts fpul, fr13\n\t" "fsts fpul, fr14\n\t" "fsts fpul, fr15\n\t" - "frchg" + "frchg\n\t" + "lds %2, fpscr\n\t" : /* no output */ - : "r" (0), "r" (FPSCR_INIT)); + : "r" (0), "r" (FPSCR_RCHG), "r" (FPSCR_INIT)); } /** diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sh/kernel/io_microdev.c linux-2.4.23-pre8/arch/sh/kernel/io_microdev.c --- linux-2.4.22/arch/sh/kernel/io_microdev.c 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/sh/kernel/io_microdev.c 2003-10-22 22:49:57.000000000 +0000 @@ -0,0 +1,219 @@ +/* + * linux/arch/sh/kernel/io_microdev.c + * + * Copyright (C) 2003 Sean McGoogan (Sean.McGoogan@superh.com) + * + * SuperH SH4-202 MicroDev board support. + * + * May be copied or modified under the terms of the GNU General Public + * License. See linux/COPYING for more information. + */ + +#include +#include +#include + + + /* + * we need to have a 'safe' address to re-direct all I/O requests + * that we do not explicitly wish to handle. This safe address + * must have the following properies: + * + * * writes are ignored (no exception) + * * reads are benign (no side-effects) + * * accesses of width 1, 2 and 4-bytes are all valid. + * + * The Processor Version Register (PVR) has these properties. + */ +#define PVR 0xff000030 /* Processor Version Register */ + + +#define IO_LAN91C111 0x300ul /* I/O port for SMSC LAN91C111 Ethernet chip */ + +#define PORT2ADDR(x) (microdev_isa_port2addr(x)) + + +static inline void delay(void) +{ + ctrl_inw(0xa0000000); +} + +unsigned char microdev_inb(unsigned long port) +{ + return *(volatile unsigned char*)PORT2ADDR(port); +} + +unsigned short microdev_inw(unsigned long port) +{ + return *(volatile unsigned short*)PORT2ADDR(port); +} + +unsigned int microdev_inl(unsigned long port) +{ + return *(volatile unsigned int*)PORT2ADDR(port); +} + +void microdev_outb(unsigned char b, unsigned long port) +{ + /* + * There is a board feature with the current SH4-202 MicroDev + * in that the 2 byte enables (nBE0 and nBE1) are tied together (and to the + * Chip Select Line (Ethernet_CS)). Due to this conectivity, it is not possible + * to safely perform 8-bit writes to the Ethernet registers, as 16-bits + * will be consumed from the Data lines (corrupting the other byte). + * Hence, this function is written to impliment 16-bit read/modify/write + * for all byte-wide acceses. + * + * Note: there is no problem with byte READS (even or odd). + * + * Sean McGoogan - 16th June 2003. + */ + if ( (port>=IO_LAN91C111) && (port=IO_LAN91C111) && (offset - * Based largely on io_se.c - * - * I/O routine for SH-Mobile SolutionEngine. + * Copyright (C) 2003 YOSHII Takashi */ #include -#include -#include #include -#include +#include + +#define badio(fn, a) panic("bad i/o operation %s for %08lx.", #fn, a) + +struct iop { + unsigned long start, end; + unsigned long base; + struct iop *(*check)(struct iop *p, unsigned long port); + unsigned char (*inb)(struct iop *p, unsigned long port); + unsigned short (*inw)(struct iop *p, unsigned long port); + void (*outb)(struct iop *p, unsigned char value, unsigned long port); + void (*outw)(struct iop *p, unsigned short value, unsigned long port); +}; + +struct iop *simple_check(struct iop *p, unsigned long port){ + if((p->start <= port) && (port <= p->end)) + return p; + else + badio(check, port); +} + +unsigned short simple_inw(struct iop *p, unsigned long port){ + return *(unsigned short*)(p->base+port); +} + +void simple_outw(struct iop *p, unsigned short value, unsigned long port){ + *(unsigned short*)(p->base+port)=value; +} + +unsigned char bad_inb(struct iop *p, unsigned long port) +{ + badio(inb, port); +} + +void bad_outb(struct iop *p, unsigned char value, unsigned long port){ + badio(inw, port); +} + +/* MSTLANEX01 LAN at 0xb400:0000 */ +static struct iop laniop = { + .start = 0x200, // device is at 0x300, but start here for probing. + .end = 0x30f, + .base = 0xb4000000, + .check = simple_check, + .inb = bad_inb, + .inw = simple_inw, + .outb = bad_outb, + .outw = simple_outw, +}; + +static __inline__ struct iop *port2iop(unsigned long port){ + if(laniop.check(&laniop, port)) + return &laniop; + else + badio(check, port); /* XXX: dummy fallback routine? */ +} static inline void delay(void) { @@ -19,151 +69,117 @@ ctrl_inw(0xac000000); } -#define maybebadio(name,port) \ - printk("bad PC-like io %s for port 0x%lx at 0x%08lx\n", \ - #name, (port), (volatile unsigned long) __builtin_return_address(0)) - unsigned char shmse_inb(unsigned long port) { - if (PXSEG(port)){ - return *(volatile unsigned char *) port; - }else{ - maybebadio(inb, port); - return 0; - } + struct iop *p=port2iop(port); + return (p->inb)(p, port); } unsigned char shmse_inb_p(unsigned long port) { - unsigned char v; - - if (PXSEG(port)){ - v = *(volatile unsigned char *)port; - }else{ - maybebadio(inb_p, port); - return 0; - } + unsigned char v=shmse_inb(port); delay(); return v; } unsigned short shmse_inw(unsigned long port) { - if (PXSEG(port)){ - return *(volatile unsigned short *) port; - }else{ - maybebadio(inw, port); - return 0; - } + struct iop *p=port2iop(port); + return (p->inw)(p, port); } unsigned int shmse_inl(unsigned long port) { - if (PXSEG(port)){ - return *(volatile unsigned short *) port; - }else{ - maybebadio(inl, port); - return 0; - } + badio(inl, port); } void shmse_outb(unsigned char value, unsigned long port) { - if (PXSEG(port)){ - *(volatile unsigned char *)port = value; - }else{ - maybebadio(outb, port); - } + struct iop *p=port2iop(port); + (p->outb)(p, value, port); } void shmse_outb_p(unsigned char value, unsigned long port) { - if (PXSEG(port)){ - *(volatile unsigned char *)port = value; - }else{ - maybebadio(outb_p, port); - } + shmse_outb(value, port); delay(); } void shmse_outw(unsigned short value, unsigned long port) { - if (PXSEG(port)){ - *(volatile unsigned short *)port = value; - }else{ - maybebadio(outw, port); - } + struct iop *p=port2iop(port); + (p->outw)(p, value, port); } void shmse_outl(unsigned int value, unsigned long port) { - if (PXSEG(port)){ - *(volatile unsigned long *)port = value; - }else{ - maybebadio(outl, port); - } + badio(outl, port); } void shmse_insb(unsigned long port, void *addr, unsigned long count) { - unsigned char *p = addr; - while (count--) *p++ = shmse_inb(port); + unsigned char *a = addr; + struct iop *p=port2iop(port); + while (count--) *a++ = (p->inb)(p, port); } void shmse_insw(unsigned long port, void *addr, unsigned long count) { - unsigned short *p = addr; - while (count--) *p++ = shmse_inw(port); + unsigned short *a = addr; + struct iop *p=port2iop(port); + while (count--) *a++ = (p->inw)(p, port); } void shmse_insl(unsigned long port, void *addr, unsigned long count) { - maybebadio(insl, port); + badio(insl, port); } void shmse_outsb(unsigned long port, const void *addr, unsigned long count) { - unsigned char *p = (unsigned char *)addr; - while (count--) shmse_outb(*p++, port); + unsigned char *a = (unsigned char*)addr; + struct iop *p=port2iop(port); + while (count--) (p->outb)(p, *a++, port); } void shmse_outsw(unsigned long port, const void *addr, unsigned long count) { - unsigned short *p = (unsigned short *)addr; - while (count--) shmse_outw(*p++, port); + unsigned short *a = (unsigned short*)addr; + struct iop *p=port2iop(port); + while (count--) (p->outw)(p, *a++, port); } void shmse_outsl(unsigned long port, const void *addr, unsigned long count) { - maybebadio(outsw, port); + badio(outsw, port); } unsigned char shmse_readb(unsigned long addr) { - return *(volatile unsigned char*)addr; + badio(readb, addr); } unsigned short shmse_readw(unsigned long addr) { - return *(volatile unsigned short*)addr; + badio(readw, addr); } unsigned int shmse_readl(unsigned long addr) { - return *(volatile unsigned long*)addr; + badio(readl, addr); } void shmse_writeb(unsigned char b, unsigned long addr) { - *(volatile unsigned char*)addr = b; + badio(writeb, addr); } void shmse_writew(unsigned short b, unsigned long addr) { - *(volatile unsigned short*)addr = b; + badio(writew, addr); } void shmse_writel(unsigned int b, unsigned long addr) { - *(volatile unsigned long*)addr = b; + badio(writel, addr); } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sh/kernel/irq_intc2.c linux-2.4.23-pre8/arch/sh/kernel/irq_intc2.c --- linux-2.4.22/arch/sh/kernel/irq_intc2.c 2003-06-13 14:51:32.000000000 +0000 +++ linux-2.4.23-pre8/arch/sh/kernel/irq_intc2.c 2003-10-22 22:49:11.000000000 +0000 @@ -12,6 +12,8 @@ * Hitachi 7751 and the STM ST40 STB1. */ +#include +#include #include #include #include @@ -22,8 +24,11 @@ struct intc2_data { - unsigned int addr; /* Address of Interrupt Priority Register */ - int mask; /*Mask to apply */ + unsigned char msk_offset; + unsigned char msk_shift; +#ifdef CONFIG_CPU_SUBTYPE_ST40 + int (*clear_irq) (int); +#endif }; @@ -56,33 +61,34 @@ static void disable_intc2_irq(unsigned int irq) { - unsigned addr; - int offset=irq-INTC2_FIRST_IRQ; - unsigned val,flags; + int irq_offset = irq - INTC2_FIRST_IRQ; + int msk_shift, msk_offset; // Sanity check - if(offset<0 || offset>=NR_INTC2_IRQS) return; - - addr=intc2_data[offset].addr+INTC2_INTMSK_OFFSET; + if((irq_offset<0) || (irq_offset>=NR_INTC2_IRQS)) + return; - save_and_cli(flags); - val=ctrl_inl(addr); - val|=intc2_data[offset].mask; - ctrl_outl(val,addr); + msk_shift = intc2_data[irq_offset].msk_shift; + msk_offset = intc2_data[irq_offset].msk_offset; - restore_flags(flags); + ctrl_outl(1<=NR_INTC2_IRQS) return; + /* Sanity check */ + if((irq_offset<0) || (irq_offset>=NR_INTC2_IRQS)) + return; - ctrl_outl(intc2_data[offset].mask, - intc2_data[offset].addr+INTC2_INTMSKCLR_OFFSET); + msk_shift = intc2_data[irq_offset].msk_shift; + msk_offset = intc2_data[irq_offset].msk_offset; + ctrl_outl(1<=NR_INTC2_IRQS) { + if((irq_offset<0) || (irq_offset>=NR_INTC2_IRQS)) return; - } + disable_irq_nosync(irq); - /* Fill the data we need */ - intc2_data[offset].addr=addr; - intc2_data[offset].mask=1<irq, p->ipr_offset, p->ipr_shift, + p-> msk_offset, p->msk_shift, 13); + } +} + +/* Adds a termination callback to the interrupt */ +void intc2_add_clear_irq(int irq, int (*fn)(int)) +{ + if (irq < INTC2_FIRST_IRQ) + return; + + intc2_data[irq - INTC2_FIRST_IRQ].clear_irq = fn; +} +#endif /* CONFIG_CPU_SUBTYPE_ST40 */ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sh/kernel/irq_ipr.c linux-2.4.23-pre8/arch/sh/kernel/irq_ipr.c --- linux-2.4.22/arch/sh/kernel/irq_ipr.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/sh/kernel/irq_ipr.c 2003-10-22 22:48:30.000000000 +0000 @@ -1,4 +1,4 @@ -/* $Id: irq_ipr.c,v 1.1.1.1.2.1 2003/07/16 18:41:20 yoshii Exp $ +/* $Id: irq_ipr.c,v 1.1.1.1.2.2 2003/10/14 16:46:10 trent Exp $ * * linux/arch/sh/kernel/irq_ipr.c * @@ -274,6 +274,10 @@ #endif #endif /* CONFIG_CPU_SUBTYPE_SH7300 || CONFIG_CPU_SUBTYPE_SH7707 || CONFIG_CPU_SUBTYPE_SH7709 */ +#ifdef CONFIG_CPU_SUBTYPE_ST40 + init_IRQ_intc2(); +#endif + /* Perform the machine specific initialisation */ if (sh_mv.mv_init_irq != NULL) { sh_mv.mv_init_irq(); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sh/kernel/irq_microdev.c linux-2.4.23-pre8/arch/sh/kernel/irq_microdev.c --- linux-2.4.22/arch/sh/kernel/irq_microdev.c 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/sh/kernel/irq_microdev.c 2003-10-22 22:49:53.000000000 +0000 @@ -0,0 +1,158 @@ +/* + * linux/arch/sh/kernel/irq_microdev.c + * + * Copyright (C) 2003 Sean McGoogan (Sean.McGoogan@superh.com) + * + * SuperH SH4-202 MicroDev board support. + * + * May be copied or modified under the terms of the GNU General Public + * License. See linux/COPYING for more information. + */ + +#include +#include +#include + +#include +#include +#include + +#define NUM_EXTERNAL_IRQS 16 /* IRL0 .. IRL15 */ + + +static const struct +{ + unsigned char fpgaIrq; + unsigned char mapped; + const char *name; +} fpgaIrqTable[NUM_EXTERNAL_IRQS] = +{ + { 0, 0, "unused" }, /* IRQ #0 IRL=15 0x200 */ + { 0, 0, "unused" }, /* IRQ #1 IRL=14 0x220 */ + { 0, 0, "unused" }, /* IRQ #2 IRL=13 0x240 */ + { 18, 1, "Ethernet" }, /* IRQ #3 IRL=12 0x260 */ + { 0, 0, "unused" }, /* IRQ #4 IRL=11 0x280 */ + { 0, 0, "unused" }, /* IRQ #5 IRL=10 0x2a0 */ + { 0, 0, "unused" }, /* IRQ #6 IRL=9 0x2c0 */ + { 0, 0, "unused" }, /* IRQ #7 IRL=8 0x2e0 */ + { 8, 1, "PCI INTA" }, /* IRQ #8 IRL=7 0x300 */ + { 9, 1, "PCI INTB" }, /* IRQ #9 IRL=6 0x320 */ + { 10, 1, "PCI INTC" }, /* IRQ #10 IRL=5 0x340 */ + { 11, 1, "PCI INTD" }, /* IRQ #11 IRL=4 0x360 */ + { 0, 0, "unused" }, /* IRQ #12 IRL=3 0x380 */ + { 0, 0, "unused" }, /* IRQ #13 IRL=2 0x3a0 */ + { 0, 0, "unused" }, /* IRQ #14 IRL=1 0x3c0 */ + { 0, 0, "unused" }, /* IRQ #15 IRL=0 0x3e0 */ +}; + +static void enable_microdev_irq(unsigned int irq); +static void disable_microdev_irq(unsigned int irq); + + /* shutdown is same as "disable" */ +#define shutdown_microdev_irq disable_microdev_irq + +static void mask_and_ack_microdev(unsigned int); +static void end_microdev_irq(unsigned int irq); + +static unsigned int startup_microdev_irq(unsigned int irq) +{ + enable_microdev_irq(irq); + return 0; /* never anything pending */ +} + +static struct hw_interrupt_type microdev_irq_type = { + "MicroDev-IRQ", + startup_microdev_irq, + shutdown_microdev_irq, + enable_microdev_irq, + disable_microdev_irq, + mask_and_ack_microdev, + end_microdev_irq +}; + +static void disable_microdev_irq(unsigned int irq) +{ + unsigned int flags; + unsigned int fpgaIrq; + + if (irq >= NUM_EXTERNAL_IRQS) return; + if (!fpgaIrqTable[irq].mapped) return; + + fpgaIrq = fpgaIrqTable[irq].fpgaIrq; + + /* disable interrupts */ + save_and_cli(flags); + + /* disable interupts on the FPGA INTC register */ + ctrl_outl(MICRODEV_FPGA_INTC_MASK(fpgaIrq), MICRODEV_FPGA_INTDSB_REG); + + /* restore interrupts */ + restore_flags(flags); +} + +static void enable_microdev_irq(unsigned int irq) +{ + unsigned long priorityReg, priorities, pri; + unsigned int flags; + unsigned int fpgaIrq; + + + if (irq >= NUM_EXTERNAL_IRQS) return; + if (!fpgaIrqTable[irq].mapped) return; + + pri = 15 - irq; + + fpgaIrq = fpgaIrqTable[irq].fpgaIrq; + priorityReg = MICRODEV_FPGA_INTPRI_REG(fpgaIrq); + + /* disable interrupts */ + save_and_cli(flags); + + /* set priority for the interrupt */ + priorities = ctrl_inl(priorityReg); + priorities &= ~MICRODEV_FPGA_INTPRI_MASK(fpgaIrq); + priorities |= MICRODEV_FPGA_INTPRI_LEVEL(fpgaIrq, pri); + ctrl_outl(priorities, priorityReg); + + /* enable interupts on the FPGA INTC register */ + ctrl_outl(MICRODEV_FPGA_INTC_MASK(fpgaIrq), MICRODEV_FPGA_INTENB_REG); + + /* restore interrupts */ + restore_flags(flags); +} + + /* This functions sets the desired irq handler to be a MicroDev type */ +static void __init make_microdev_irq(unsigned int irq) +{ + disable_irq_nosync(irq); + irq_desc[irq].handler = µdev_irq_type; + disable_microdev_irq(irq); +} + +static void mask_and_ack_microdev(unsigned int irq) +{ + disable_microdev_irq(irq); +} + +static void end_microdev_irq(unsigned int irq) +{ + if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) + { + enable_microdev_irq(irq); + } +} + +extern void __init init_microdev_irq(void) +{ + int i; + + /* disable interupts on the FPGA INTC register */ + ctrl_outl(~0ul, MICRODEV_FPGA_INTDSB_REG); + + for (i = 0; i < NUM_EXTERNAL_IRQS; i++) + { + make_microdev_irq(i); + } +} + + diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sh/kernel/mach_microdev.c linux-2.4.23-pre8/arch/sh/kernel/mach_microdev.c --- linux-2.4.22/arch/sh/kernel/mach_microdev.c 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/sh/kernel/mach_microdev.c 2003-10-22 22:47:50.000000000 +0000 @@ -0,0 +1,77 @@ +/* + * linux/arch/sh/kernel/mach_microdev.c + * + * Copyright (C) 2003 Sean McGoogan (Sean.McGoogan@superh.com) + * + * Machine vector for the SuperH SH4-202 MicroDev board. + * + * May be copied or modified under the terms of the GNU General Public + * License. See linux/COPYING for more information. + * + */ + +#include +#include + +#include +#include +#include + +#include +#include + +void setup_microdev(void); + +/* + * The Machine Vector + */ + +struct sh_machine_vector mv_sh4202_microdev __initmv = { + mv_name: "SH4-202 MicroDev", + + mv_nr_irqs: 72, /* QQQ need to check this - use the MACRO */ + + mv_inb: microdev_inb, + mv_inw: microdev_inw, + mv_inl: microdev_inl, + mv_outb: microdev_outb, + mv_outw: microdev_outw, + mv_outl: microdev_outl, + + mv_inb_p: microdev_inb_p, + mv_inw_p: microdev_inw_p, + mv_inl_p: microdev_inl_p, + mv_outb_p: microdev_outb_p, + mv_outw_p: microdev_outw_p, + mv_outl_p: microdev_outl_p, + + mv_insb: microdev_insb, + mv_insw: microdev_insw, + mv_insl: microdev_insl, + mv_outsb: microdev_outsb, + mv_outsw: microdev_outsw, + mv_outsl: microdev_outsl, + + mv_readb: generic_readb, + mv_readw: generic_readw, + mv_readl: generic_readl, + mv_writeb: generic_writeb, + mv_writew: generic_writew, + mv_writel: generic_writel, + + mv_ioremap: generic_ioremap, + mv_iounmap: generic_iounmap, + + mv_isa_port2addr: microdev_isa_port2addr, + + mv_init_arch: setup_microdev, + + mv_init_irq: init_microdev_irq, + + mv_rtc_gettimeofday: sh_rtc_gettimeofday, + mv_rtc_settimeofday: sh_rtc_settimeofday, + + mv_hw_sh4202_microdev: 1, +}; +ALIAS_MV(sh4202_microdev) + diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sh/kernel/setup_microdev.c linux-2.4.23-pre8/arch/sh/kernel/setup_microdev.c --- linux-2.4.22/arch/sh/kernel/setup_microdev.c 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/sh/kernel/setup_microdev.c 2003-10-22 22:47:29.000000000 +0000 @@ -0,0 +1,37 @@ +/* + * linux/arch/sh/kernel/setup_microdev.c + * + * Copyright (C) 2003 Sean McGoogan (Sean.McGoogan@superh.com) + * + * SuperH SH4-202 MicroDev board support. + * + * May be copied or modified under the terms of the GNU General Public + * License. See linux/COPYING for more information. + */ + +#include +#include +#include + + /* General-Purpose base address on CPU-board FPGA */ +#define MICRODEV_FPGA_GP_BASE 0xa6100000ul + + /* Address of Cache Control Register */ +#define CCR 0xff00001cul + +/* + * Initialize the board + */ +void __init setup_microdev(void) +{ + int * const fpgaRevisionRegister = (int*)(MICRODEV_FPGA_GP_BASE + 0x8ul); + const int fpgaRevision = *fpgaRevisionRegister; + int * const CacheControlRegister = (int*)CCR; + + printk("SuperH SH4-202 MicroDev board (FPGA rev: 0x%0x, CCR: 0x%0x)\n", + fpgaRevision, *CacheControlRegister); + + return; +} + + diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sh/kernel/setup_shmse.c linux-2.4.23-pre8/arch/sh/kernel/setup_shmse.c --- linux-2.4.22/arch/sh/kernel/setup_shmse.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/sh/kernel/setup_shmse.c 2003-10-22 22:48:20.000000000 +0000 @@ -15,6 +15,12 @@ void __init init_shmse_IRQ(void) { + ctrl_outw(0x0028, 0xb0a00000); // mode set [active low]. + ctrl_outw(0x000a, INTC_ICR1); // IRQ mode; IRQ0,1 enable. + /* PC_IRQ[0-3] -> IRQ0 (32) */ + make_ipr_irq( IRQ0_IRQ, IRQ0_IPR_ADDR, IRQ0_IPR_POS, 0x0f-IRQ0_IRQ); + /* A_IRQ[0-3] -> IRQ1 (33) */ + make_ipr_irq( IRQ1_IRQ, IRQ1_IPR_ADDR, IRQ1_IPR_POS, 0x0f-IRQ1_IRQ); } void __init setup_shmse(void) diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sh/kernel/sh_ksyms.c linux-2.4.23-pre8/arch/sh/kernel/sh_ksyms.c --- linux-2.4.22/arch/sh/kernel/sh_ksyms.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/sh/kernel/sh_ksyms.c 2003-10-22 22:47:59.000000000 +0000 @@ -19,6 +19,7 @@ #include #include #include +#include #include extern void dump_thread(struct pt_regs *, struct user *); @@ -38,6 +39,7 @@ /* Networking helper routines. */ EXPORT_SYMBOL(csum_partial_copy); +EXPORT_SYMBOL(csum_partial_copy_generic); EXPORT_SYMBOL(strtok); EXPORT_SYMBOL(strpbrk); @@ -45,6 +47,7 @@ EXPORT_SYMBOL(strlen); EXPORT_SYMBOL(strnlen); EXPORT_SYMBOL(strchr); +EXPORT_SYMBOL(strrchr); EXPORT_SYMBOL(strcat); EXPORT_SYMBOL(strncat); @@ -81,6 +84,8 @@ EXPORT_SYMBOL(__down_interruptible); EXPORT_SYMBOL(__down_trylock); +/* Delay loops */ +EXPORT_SYMBOL(__ndelay); EXPORT_SYMBOL(__udelay); EXPORT_SYMBOL(__const_udelay); @@ -105,3 +110,4 @@ EXPORT_SYMBOL(flush_dcache_page); #endif EXPORT_SYMBOL(flush_tlb_page); +EXPORT_SYMBOL(__xdiv64_32); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sh/kernel/signal.c linux-2.4.23-pre8/arch/sh/kernel/signal.c --- linux-2.4.22/arch/sh/kernel/signal.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/sh/kernel/signal.c 2003-10-22 22:49:58.000000000 +0000 @@ -1,4 +1,4 @@ -/* $Id: signal.c,v 1.1.1.1.2.11 2002/10/23 00:57:46 mrbrown Exp $ +/* $Id: signal.c,v 1.1.1.1.2.12 2003/10/01 10:54:28 kkojima Exp $ * * linux/arch/sh/kernel/signal.c * @@ -168,21 +168,22 @@ * Do a signal return; undo the signal stack. */ -#define MOVW(n) (0x9300|((n)-2)) /* Move mem word at PC+n to R3 */ -#define TRAP16 0xc310 /* Syscall w/no args (NR in R3) */ +#define MOVW(n) (0x9300|((n)-2)) /* Move mem word at PC+n to R3 */ +#define TRAP16 0xc310 /* Syscall w/no args (NR in R3) */ +#define OR_R0_R0 0x200b /* or r0,r0 (insert to avoid hardware bug) */ struct sigframe { struct sigcontext sc; unsigned long extramask[_NSIG_WORDS-1]; - u16 retcode[3]; + u16 retcode[8]; }; struct rt_sigframe { struct siginfo info; struct ucontext uc; - u16 retcode[3]; + u16 retcode[8]; }; #if defined(__SH4__) @@ -397,9 +398,14 @@ regs->pr = (unsigned long) ka->sa.sa_restorer; } else { /* Generate return code (system call to sigreturn) */ - err |= __put_user(MOVW(2), &frame->retcode[0]); + err |= __put_user(MOVW(7), &frame->retcode[0]); err |= __put_user(TRAP16, &frame->retcode[1]); - err |= __put_user((__NR_sigreturn), &frame->retcode[2]); + err |= __put_user(OR_R0_R0, &frame->retcode[2]); + err |= __put_user(OR_R0_R0, &frame->retcode[3]); + err |= __put_user(OR_R0_R0, &frame->retcode[4]); + err |= __put_user(OR_R0_R0, &frame->retcode[5]); + err |= __put_user(OR_R0_R0, &frame->retcode[6]); + err |= __put_user((__NR_sigreturn), &frame->retcode[7]); regs->pr = (unsigned long) frame->retcode; } @@ -409,6 +415,8 @@ /* Set up registers for signal handler */ regs->regs[15] = (unsigned long) frame; regs->regs[4] = signal; /* Arg for signal handler */ + regs->regs[5] = 0; + regs->regs[6] = (unsigned long) &frame->sc; regs->pc = (unsigned long) ka->sa.sa_handler; set_fs(USER_DS); @@ -419,6 +427,8 @@ #endif flush_cache_sigtramp(regs->pr); + if ((-regs->pr & (L1_CACHE_BYTES-1)) < sizeof(frame->retcode)) + flush_cache_sigtramp(regs->pr + L1_CACHE_BYTES); return; give_sigsegv: @@ -465,9 +475,14 @@ regs->pr = (unsigned long) ka->sa.sa_restorer; } else { /* Generate return code (system call to rt_sigreturn) */ - err |= __put_user(MOVW(2), &frame->retcode[0]); + err |= __put_user(MOVW(7), &frame->retcode[0]); err |= __put_user(TRAP16, &frame->retcode[1]); - err |= __put_user((__NR_rt_sigreturn), &frame->retcode[2]); + err |= __put_user(OR_R0_R0, &frame->retcode[2]); + err |= __put_user(OR_R0_R0, &frame->retcode[3]); + err |= __put_user(OR_R0_R0, &frame->retcode[4]); + err |= __put_user(OR_R0_R0, &frame->retcode[5]); + err |= __put_user(OR_R0_R0, &frame->retcode[6]); + err |= __put_user((__NR_rt_sigreturn), &frame->retcode[7]); regs->pr = (unsigned long) frame->retcode; } @@ -489,6 +504,8 @@ #endif flush_cache_sigtramp(regs->pr); + if ((-regs->pr & (L1_CACHE_BYTES-1)) < sizeof(frame->retcode)) + flush_cache_sigtramp(regs->pr + L1_CACHE_BYTES); return; give_sigsegv: diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sh/lib/Makefile linux-2.4.23-pre8/arch/sh/lib/Makefile --- linux-2.4.22/arch/sh/lib/Makefile 2001-09-08 19:29:09.000000000 +0000 +++ linux-2.4.23-pre8/arch/sh/lib/Makefile 2003-10-22 22:48:55.000000000 +0000 @@ -4,7 +4,7 @@ L_TARGET = lib.a obj-y = delay.o memcpy.o memset.o memmove.o memchr.o old-checksum.o \ - checksum.o strcasecmp.o strlen.o + checksum.o strcasecmp.o strlen.o udivdi3.o div64.o USE_STANDARD_AS_RULE := true diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sh/lib/div64.S linux-2.4.23-pre8/arch/sh/lib/div64.S --- linux-2.4.22/arch/sh/lib/div64.S 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/sh/lib/div64.S 2003-10-22 22:47:59.000000000 +0000 @@ -0,0 +1,46 @@ +/* + * unsigned long long __xdiv64_32(unsigned long long n, unsigned long d); + */ + +#include + +.text +ENTRY(__xdiv64_32) +#ifdef __LITTLE_ENDIAN__ + mov r4, r0 + mov r5, r1 +#else + mov r4, r1 + mov r5, r0 +#endif + cmp/hs r6, r1 + bf.s 1f + mov #0, r2 + + mov r1, r2 + mov #0, r3 + div0u + .rept 32 + rotcl r2 + div1 r6, r3 + .endr + rotcl r2 + mul.l r6, r2 + sts macl, r3 + sub r3, r1 +1: + div0u + .rept 32 + rotcl r0 + div1 r6, r1 + .endr +#ifdef __LITTLE_ENDIAN__ + mov r2, r1 + rts + rotcl r0 +#else + rotcl r0 + mov r0, r1 + rts + mov r2, r0 +#endif diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sh/lib/udivdi3.c linux-2.4.23-pre8/arch/sh/lib/udivdi3.c --- linux-2.4.22/arch/sh/lib/udivdi3.c 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/arch/sh/lib/udivdi3.c 2003-10-22 22:47:56.000000000 +0000 @@ -0,0 +1,16 @@ +/* + * Simple __udivdi3 function which doesn't use FPU. + */ + +#include + +extern u64 __xdiv64_32(u64 n, u32 d); +extern void panic(const char * fmt, ...); + +u64 __udivdi3(u64 n, u64 d) +{ + if (d & ~0xffffffff) + panic("Need true 64-bit/64-bit division"); + return __xdiv64_32(n, (u32)d); +} + diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sh/mm/__clear_user_page-sh4.S linux-2.4.23-pre8/arch/sh/mm/__clear_user_page-sh4.S --- linux-2.4.22/arch/sh/mm/__clear_user_page-sh4.S 2001-09-08 19:29:09.000000000 +0000 +++ linux-2.4.23-pre8/arch/sh/mm/__clear_user_page-sh4.S 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -/* $Id$ - * - * __clear_user_page implementation of SuperH - * - * Copyright (C) 2001 Niibe Yutaka & Kaz Kojima - * - */ - -/* - * __clear_user_page - * @to: P1 address (with same color) - * @orig_to: P1 address - * - * void __clear_user_page(void *to, void *orig_to) - */ - -/* - * r0 --- scratch - * r4 --- to - * r5 --- orig_to - * r6 --- to + 4096 - */ -#include -ENTRY(__clear_user_page) - mov r4,r6 - mov.w .L4096,r0 - add r0,r6 - mov #0,r0 - ! -1: ocbi @r5 - add #32,r5 - movca.l r0,@r4 - mov r4,r1 - add #32,r4 - mov.l r0,@-r4 - mov.l r0,@-r4 - mov.l r0,@-r4 - mov.l r0,@-r4 - mov.l r0,@-r4 - mov.l r0,@-r4 - mov.l r0,@-r4 - add #28,r4 - cmp/eq r6,r4 - bf/s 1b - ocbwb @r1 - ! - rts - nop -.L4096: .word 4096 diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sh/mm/__copy_user_page-sh4.S linux-2.4.23-pre8/arch/sh/mm/__copy_user_page-sh4.S --- linux-2.4.22/arch/sh/mm/__copy_user_page-sh4.S 2001-09-08 19:29:09.000000000 +0000 +++ linux-2.4.23-pre8/arch/sh/mm/__copy_user_page-sh4.S 1970-01-01 00:00:00.000000000 +0000 @@ -1,69 +0,0 @@ -/* $Id: __copy_user_page-sh4.S,v 1.1 2001/07/23 09:02:17 gniibe Exp $ - * - * __copy_user_page implementation of SuperH - * - * Copyright (C) 2001 Niibe Yutaka & Kaz Kojima - * - */ - -/* - * __copy_user_page - * @to: P1 address (with same color) - * @from: P1 address - * @orig_to: P1 address - * - * void __copy_user_page(void *to, void *from, void *orig_to) - */ - -/* - * r0, r1, r2, r3, r4, r5, r6, r7 --- scratch - * r8 --- from + 4096 - * r9 --- orig_to - * r10 --- to - * r11 --- from - */ -#include -ENTRY(__copy_user_page) - mov.l r8,@-r15 - mov.l r9,@-r15 - mov.l r10,@-r15 - mov.l r11,@-r15 - mov r4,r10 - mov r5,r11 - mov r6,r9 - mov r5,r8 - mov.w .L4096,r0 - add r0,r8 - ! -1: ocbi @r9 - add #32,r9 - mov.l @r11+,r0 - mov.l @r11+,r1 - mov.l @r11+,r2 - mov.l @r11+,r3 - mov.l @r11+,r4 - mov.l @r11+,r5 - mov.l @r11+,r6 - mov.l @r11+,r7 - movca.l r0,@r10 - mov r10,r0 - add #32,r10 - mov.l r7,@-r10 - mov.l r6,@-r10 - mov.l r5,@-r10 - mov.l r4,@-r10 - mov.l r3,@-r10 - mov.l r2,@-r10 - mov.l r1,@-r10 - ocbwb @r0 - cmp/eq r11,r8 - bf/s 1b - add #28,r10 - ! - mov.l @r15+,r11 - mov.l @r15+,r10 - mov.l @r15+,r9 - mov.l @r15+,r8 - rts - nop -.L4096: .word 4096 diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sh/mm/cache-sh4.c linux-2.4.23-pre8/arch/sh/mm/cache-sh4.c --- linux-2.4.22/arch/sh/mm/cache-sh4.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/sh/mm/cache-sh4.c 2003-10-22 22:48:00.000000000 +0000 @@ -32,8 +32,17 @@ #define CCR_CACHE_ICI 0x0800 /* IC Invalidate */ #define CCR_CACHE_IIX 0x8000 /* IC Index Enable */ -/* Default CCR setup: 8k+16k-byte cache,P1-wb,enable */ -#define CCR_CACHE_VAL (CCR_CACHE_ICE|CCR_CACHE_CB|CCR_CACHE_OCE) + + +#if defined(CONFIG_SH_CACHE_ASSOC) +#define CCR_CACHE_EMODE 0x80000000 +/* CCR setup for associative mode: 16k+32k 2-way, P1 copy-back, enable */ +#define CCR_CACHE_VAL (CCR_CACHE_EMODE|CCR_CACHE_ENABLE|CCR_CACHE_CB) +#else +/* Default CCR setup: 8k+16k-byte cache, P1-copy-back, enable */ +#define CCR_CACHE_VAL (CCR_CACHE_ENABLE|CCR_CACHE_CB) +#endif + #define CCR_CACHE_INIT (CCR_CACHE_VAL|CCR_CACHE_OCI|CCR_CACHE_ICI) #define CCR_CACHE_ENABLE (CCR_CACHE_OCE|CCR_CACHE_ICE) @@ -43,7 +52,7 @@ #define CACHE_UPDATED 2 #define CACHE_ASSOC 8 -#define CACHE_OC_WAY_SHIFT 13 +#define CACHE_OC_WAY_SHIFT 14 #define CACHE_IC_WAY_SHIFT 13 #define CACHE_OC_ENTRY_SHIFT 5 #define CACHE_IC_ENTRY_SHIFT 5 @@ -53,6 +62,8 @@ #define CACHE_IC_NUM_ENTRIES 256 #define CACHE_OC_NUM_ENTRIES 512 +#define CACHE_NUM_WAYS 2 + static void __init detect_cpu_and_cache_system(void) { @@ -60,6 +71,8 @@ cpu_data->type = CPU_ST40; #elif defined(CONFIG_CPU_SUBTYPE_SH7750) || defined(CONFIG_CPU_SUBTYPE_SH7751) cpu_data->type = CPU_SH7750; +#elif defined(CONFIG_CPU_SUBTYPE_SH4_202) + cpu_data->type = CPU_SH4202; #else #error Unknown SH4 CPU type #endif @@ -80,6 +93,26 @@ */ unsigned long addr, data; +#if defined(CONFIG_SH_CACHE_ASSOC) + unsigned long way; + + for (way = 0; way <= CACHE_NUM_WAYS; ++way) { + unsigned long waybit = way << CACHE_OC_WAY_SHIFT; + + for (addr = CACHE_OC_ADDRESS_ARRAY + waybit; + addr < (CACHE_OC_ADDRESS_ARRAY + waybit + + (CACHE_OC_NUM_ENTRIES << + CACHE_OC_ENTRY_SHIFT)); + addr += (1 << CACHE_OC_ENTRY_SHIFT)) { + + data = ctrl_inl(addr); + + if ((data & (CACHE_UPDATED|CACHE_VALID)) + == (CACHE_UPDATED|CACHE_VALID)) + ctrl_outl(data & ~CACHE_UPDATED, addr); + } + } +#else for (addr = CACHE_OC_ADDRESS_ARRAY; addr < (CACHE_OC_ADDRESS_ARRAY+ (CACHE_OC_NUM_ENTRIES << CACHE_OC_ENTRY_SHIFT)); @@ -89,6 +122,7 @@ == (CACHE_UPDATED|CACHE_VALID)) ctrl_outl(data & ~CACHE_UPDATED, addr); } +#endif } ctrl_outl(CCR_CACHE_INIT, CCR); @@ -215,6 +249,12 @@ save_and_cli(flags); jump_to_P2(); ctrl_outl(0, index); /* Clear out Valid-bit */ + +#if defined(CONFIG_SH_CACHE_ASSOC) + /* Must invalidate both ways for associative cache */ + ctrl_outl(0, index | (1 << CACHE_IC_WAY_SHIFT)); +#endif + back_to_P1(); restore_flags(flags); } @@ -225,7 +265,7 @@ unsigned long flags; extern void __flush_cache_4096(unsigned long addr, unsigned long phys, unsigned long exec_offset); -#if defined(CONFIG_CPU_SUBTYPE_SH7751) || defined(CONFIG_CPU_SUBTYPE_ST40) +#if defined(CONFIG_CPU_SUBTYPE_SH7751) || defined(CONFIG_CPU_SUBTYPE_ST40) || defined(CONFIG_CPU_SUBTYPE_SH4_202) if (start >= CACHE_OC_ADDRESS_ARRAY) { /* * SH7751 and ST40 have no restriction to handle cache. @@ -481,3 +521,118 @@ up(&p3map_sem[(address & CACHE_ALIAS)>>12]); } } + + +/****************************************************************************/ + +#if defined(CONFIG_SH_CACHE_ASSOC) +/* + * It is no possible to use the approach implement in clear_page.S when we + * are in 2-way set associative mode as it would only clear half the cache, in + * general. For the moment we simply implement it as a iteration through the + * cache flushing both ways, this in itself is not optimial as the delay latency + * for interupts is probably longer than necessary! + * + * benedict.gaster.superh.com + */ +void __flush_dcache_all(void) +{ + unsigned long flags; + unsigned long addr; + unsigned long way; + + save_and_cli(flags); +#if !defined(CONFIG_CPU_SUBTYPE_SH7751) || defined(CONFIG_CPU_SUBTYPE_SH4_202) + jump_to_P2(); +#endif + /* Clear the U and V bits for each line and each way. On SH-4, this + * causes write-back if both U and V are set before the address write. + */ + for (way = 0; way <= 1; ++way) { + unsigned long waybit = way << CACHE_OC_WAY_SHIFT; + + /* Loop all the D-cache */ + for (addr = CACHE_OC_ADDRESS_ARRAY + waybit; + addr < (CACHE_OC_ADDRESS_ARRAY + waybit + + (CACHE_OC_NUM_ENTRIES << CACHE_OC_ENTRY_SHIFT)); + addr += (1 << CACHE_OC_ENTRY_SHIFT)) { + ctrl_outl(0, addr); + } + } + +#if !defined(CONFIG_CPU_SUBTYPE_SH7751) || defined(CONFIG_CPU_SUBTYPE_SH4_202) + back_to_P1(); +#endif + restore_flags(flags); +} + +void flush_cache_4096_all(unsigned long start) +{ + unsigned long phys = PHYSADDR(start); + + /* Loop all the D-cache */ + flush_cache_4096(CACHE_OC_ADDRESS_ARRAY, phys); +} +#endif + + + + + + +/****************************************************************************/ + +#if defined(CONFIG_SH_CACHE_ASSOC) +/* + * It is no possible to use the approach implement in clear_page.S when we + * are in 2-way set associative mode as it would only clear half the cache, in + * general. For the moment we simply implement it as a iteration through the + * cache flushing both ways, this in itself is not optimial as the delay latency + * for interupts is probably longer than necessary! + * + * benedict.gaster.superh.com + */ +void __flush_dcache_all(void) +{ + unsigned long flags; + unsigned long addr; + unsigned long way; + + save_and_cli(flags); +#if !defined(CONFIG_CPU_SUBTYPE_SH7751) || defined(CONFIG_CPU_SUBTYPE_SH4_202) + jump_to_P2(); +#endif + /* Clear the U and V bits for each line and each way. On SH-4, this + * causes write-back if both U and V are set before the address write. + */ + for (way = 0; way <= 1; ++way) { + unsigned long waybit = way << CACHE_OC_WAY_SHIFT; + + /* Loop all the D-cache */ + for (addr = CACHE_OC_ADDRESS_ARRAY + waybit; + addr < (CACHE_OC_ADDRESS_ARRAY + waybit + + (CACHE_OC_NUM_ENTRIES << CACHE_OC_ENTRY_SHIFT)); + addr += (1 << CACHE_OC_ENTRY_SHIFT)) { + ctrl_outl(0, addr); + } + } + +#if !defined(CONFIG_CPU_SUBTYPE_SH7751) || defined(CONFIG_CPU_SUBTYPE_SH4_202) + back_to_P1(); +#endif + restore_flags(flags); +} + +void flush_cache_4096_all(unsigned long start) +{ + unsigned long phys = PHYSADDR(start); + + /* Loop all the D-cache */ + flush_cache_4096(CACHE_OC_ADDRESS_ARRAY, phys); +} +#endif + + + + + diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sh/mm/clear_page.S linux-2.4.23-pre8/arch/sh/mm/clear_page.S --- linux-2.4.22/arch/sh/mm/clear_page.S 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/sh/mm/clear_page.S 2003-10-22 22:48:12.000000000 +0000 @@ -194,6 +194,40 @@ nop .L4096: .word 4096 +/* + * __flush_cache_4096 + * + * Flush the page at the specified physical address by writing to to + * the memory mapped address array. + * The offset into the memory mapped cache array selects the `color' of the + * virtual addresses which will be checked. + * Lower two bits of phys control the operation (invalidate/write-back). + * + * void __flush_cache_4096(unsigned long addr, unsigned long phys, + * unsigned long exec_offset); + * + * @addr: address of the memory mapped cache address array + * @phys: P1 address to be flushed + * @exec_offset: set to 0x20000000 if the flush needs to be executed from P2 + * (ie from uncached memory), otherwise 0. + */ + +/* + * Updated for the 2-way associative cache option on the SH-4-202 and SH7751R. + * + * The current implmentation simply adds an additional loop to flush the + * other way, but this could be improved by merging both loops to handle the + * flushing of boths ways with one iteration. + * + * benedict.gaster@superh.com + */ + +/* + * r4 --- addr + * r5 --- phys + * r6 --- exec_offset + */ + ENTRY(__flush_cache_4096) mov.l 1f,r3 add r6,r3 @@ -206,6 +240,9 @@ .align 2 1: .long 2f 2: +#if defined (CONFIG_SH_CACHE_ASSOC) + mov r5, r3 +#endif .rept 32 mov.l r5,@r0 mov.l r5,@(32,r0) @@ -214,6 +251,21 @@ add r2,r5 add r2,r0 .endr + +#if defined (CONFIG_SH_CACHE_ASSOC) + mov r4, r0 + mov #0x40, r1 ! set bit 14 in r0 to imply 2 way. + shll8 r1 + or r1, r0 + .rept 32 + mov.l r3,@r0 + mov.l r3,@(32,r0) + mov.l r3,@(r0,r6) + mov.l r3,@(r0,r7) + add r2,r3 + add r2,r0 + .endr +#endif nop nop nop @@ -222,7 +274,8 @@ nop nop rts - nop + nop + ENTRY(__flush_dcache_all) mov.l 2f,r0 @@ -233,6 +286,46 @@ or r1,r2 mov #32,r3 shll2 r3 + +! TODO : make this be dynamically selected based on CPU probing rather than assembled-in + +#if defined (CONFIG_SH_CACHE_ASSOC) + mov #0x40, r5 + shll8 r5 + add r4, r5 ! r5 = r4 + 16k +1: + ldc r2,sr ! set BL bit + movca.l r0,@r4 + movca.l r0,@r5 + ocbi @r4 + add #32,r4 + ocbi @r5 + add #32,r5 + movca.l r0,@r4 + movca.l r0,@r5 + ocbi @r4 + add #32,r4 + ocbi @r5 + add #32,r5 + movca.l r0,@r4 + movca.l r0,@r5 + ocbi @r4 + add #32,r4 + ocbi @r5 + add #32,r5 + movca.l r0,@r4 + movca.l r0,@r5 + ocbi @r4 + add #32, r4 + ocbi @r5 + ldc r1,sr ! restore SR + dt r3 + bf/s 1b + add #32,r5 + + rts + nop +#else 1: ldc r2,sr ! set BL bit movca.l r0,@r4 @@ -253,8 +346,11 @@ rts nop +#endif /* CONFIG_SH_CACHE_ASSOC */ + .align 2 2: .long 0xffffc000 + 3: .long SYMBOL_NAME(empty_zero_page) 4: .long 0x10000000 ! BL bit @@ -268,28 +364,73 @@ mov.l 4f,r2 or r1,r2 mov #32,r3 +! TODO : make this be dynamically selected based on CPU probing rather than assembled-in + +#if defined (CONFIG_SH_CACHE_ASSOC) + mov #0x40, r5 + shll8 r5 + add r4, r5 ! r5 = r4 + 16k 1: ldc r2,sr ! set BL bit movca.l r0,@r4 + movca.l r0,@r5 ocbi @r4 add #32,r4 + ocbi @r5 + add #32,r5 movca.l r0,@r4 + movca.l r0,@r5 ocbi @r4 add #32,r4 + ocbi @r5 + add #32,r5 movca.l r0,@r4 + movca.l r0,@r5 ocbi @r4 add #32,r4 + ocbi @r5 + add #32,r5 movca.l r0,@r4 + movca.l r0,@r5 ocbi @r4 + add #32,r4 + ocbi @r5 + ldc r1,sr ! restore SR dt r3 bf/s 1b - add #32,r4 + add #32,r5 rts - nop + nop +#else +1: + ldc r2,sr ! set BL bit + movca.l r0,@r4 + ocbi @r4 + add #32,r4 + + movca.l r0,@r4 + ocbi @r4 + add #32,r4 + movca.l r0,@r4 + ocbi @r4 + add #32,r4 + movca.l r0,@r4 + ocbi @r4 + + ldc r1,sr ! restore SR + dt r3 + bf/s 1b + add #32,r4 + + rts + nop +#endif + .align 2 2: .long 0xffffc000 3: .long SYMBOL_NAME(empty_zero_page) 4: .long 0x10000000 ! BL bit + #endif diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sh64/config.in linux-2.4.23-pre8/arch/sh64/config.in --- linux-2.4.22/arch/sh64/config.in 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/sh64/config.in 2003-10-22 22:49:54.000000000 +0000 @@ -54,6 +54,8 @@ "2 CONFIG_SH64_PGTABLE_2_LEVEL \ 3 CONFIG_SH64_PGTABLE_3_LEVEL" 2 +bool 'Fixup misaligned loads/stores occurring in user mode' CONFIG_SH64_USER_MISALIGNED_FIXUP + # Use 32-bit addressing for now. # EMI based. # P2 (UNCACHED) required to use identity mapping @@ -300,6 +302,9 @@ bool 'GDB Stub kernel debug' CONFIG_DEBUG_KERNEL_WITH_GDB_STUB bool "Debug: audit page tables on return from syscall/exception/interrupt" CONFIG_SH64_PAGE_TABLE_AUDIT dep_bool "Debug: report TLB fill/purge activity through /proc/tlb" CONFIG_SH64_PROC_TLB $CONFIG_PROC_FS +dep_bool "Debug: report ASIDS through /proc/asids" CONFIG_SH64_PROC_ASIDS $CONFIG_PROC_FS + +int 'Kernel messages buffer length shift (0 = default)' CONFIG_LOG_BUF_SHIFT 0 endmenu diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sh64/defconfig linux-2.4.23-pre8/arch/sh64/defconfig --- linux-2.4.22/arch/sh64/defconfig 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/sh64/defconfig 2003-10-22 22:49:42.000000000 +0000 @@ -39,6 +39,7 @@ # CONFIG_SH64_FPU_DENORM_FLUSH is not set CONFIG_SH64_PGTABLE_2_LEVEL=y # CONFIG_SH64_PGTABLE_3_LEVEL is not set +# CONFIG_SH64_USER_MISALIGNED_FIXUP is not set # # Memory options @@ -477,6 +478,7 @@ # CONFIG_DEBUG_KERNEL_WITH_GDB_STUB is not set # CONFIG_SH64_PAGE_TABLE_AUDIT is not set # CONFIG_SH64_PROC_TLB is not set +# CONFIG_SH64_PROC_ASIDS is not set # # Library routines diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sh64/kernel/fpu.c linux-2.4.23-pre8/arch/sh64/kernel/fpu.c --- linux-2.4.22/arch/sh64/kernel/fpu.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/sh64/kernel/fpu.c 2003-10-22 22:48:53.000000000 +0000 @@ -23,47 +23,56 @@ * has the property that no matter whether considered as single or as * double precision, it still represents a signalling NAN. */ -#define sNAN64 0xFFFFFFFFFFFFFFFF +#define sNAN64 0xFFFFFFFFFFFFFFFFULL +#define sNAN32 0xFFFFFFFFUL +static union sh_fpu_union init_fpuregs = { + .hard = { + .fp_regs = { [0 ... 63] = sNAN32 }, + .fpscr = FPSCR_INIT + } +}; +#if 0 static struct sh_fpu_hard_struct init_fpuregs = { - { [0 ... 31] = sNAN64 }, + { [0 ... 63] = sNAN32 }, FPSCR_INIT }; +#endif inline void fpsave(struct sh_fpu_hard_struct *fpregs) { - asm volatile("fst.d %0, (0*8)," __d(0) "\n\t" - "fst.d %0, (1*8)," __d(2) "\n\t" - "fst.d %0, (2*8)," __d(4) "\n\t" - "fst.d %0, (3*8)," __d(6) "\n\t" - "fst.d %0, (4*8)," __d(8) "\n\t" - "fst.d %0, (5*8)," __d(10) "\n\t" - "fst.d %0, (6*8)," __d(12) "\n\t" - "fst.d %0, (7*8)," __d(14) "\n\t" - "fst.d %0, (8*8)," __d(16) "\n\t" - "fst.d %0, (9*8)," __d(18) "\n\t" - "fst.d %0, (10*8)," __d(20) "\n\t" - "fst.d %0, (11*8)," __d(22) "\n\t" - "fst.d %0, (12*8)," __d(24) "\n\t" - "fst.d %0, (13*8)," __d(26) "\n\t" - "fst.d %0, (14*8)," __d(28) "\n\t" - "fst.d %0, (15*8)," __d(30) "\n\t" - "fst.d %0, (16*8)," __d(32) "\n\t" - "fst.d %0, (17*8)," __d(34) "\n\t" - "fst.d %0, (18*8)," __d(36) "\n\t" - "fst.d %0, (19*8)," __d(38) "\n\t" - "fst.d %0, (20*8)," __d(40) "\n\t" - "fst.d %0, (21*8)," __d(42) "\n\t" - "fst.d %0, (22*8)," __d(44) "\n\t" - "fst.d %0, (23*8)," __d(46) "\n\t" - "fst.d %0, (24*8)," __d(48) "\n\t" - "fst.d %0, (25*8)," __d(50) "\n\t" - "fst.d %0, (26*8)," __d(52) "\n\t" - "fst.d %0, (27*8)," __d(54) "\n\t" - "fst.d %0, (28*8)," __d(56) "\n\t" - "fst.d %0, (29*8)," __d(58) "\n\t" - "fst.d %0, (30*8)," __d(60) "\n\t" - "fst.d %0, (31*8)," __d(62) "\n\t" + asm volatile("fst.p %0, (0*8)," __p(0) "\n\t" + "fst.p %0, (1*8)," __p(2) "\n\t" + "fst.p %0, (2*8)," __p(4) "\n\t" + "fst.p %0, (3*8)," __p(6) "\n\t" + "fst.p %0, (4*8)," __p(8) "\n\t" + "fst.p %0, (5*8)," __p(10) "\n\t" + "fst.p %0, (6*8)," __p(12) "\n\t" + "fst.p %0, (7*8)," __p(14) "\n\t" + "fst.p %0, (8*8)," __p(16) "\n\t" + "fst.p %0, (9*8)," __p(18) "\n\t" + "fst.p %0, (10*8)," __p(20) "\n\t" + "fst.p %0, (11*8)," __p(22) "\n\t" + "fst.p %0, (12*8)," __p(24) "\n\t" + "fst.p %0, (13*8)," __p(26) "\n\t" + "fst.p %0, (14*8)," __p(28) "\n\t" + "fst.p %0, (15*8)," __p(30) "\n\t" + "fst.p %0, (16*8)," __p(32) "\n\t" + "fst.p %0, (17*8)," __p(34) "\n\t" + "fst.p %0, (18*8)," __p(36) "\n\t" + "fst.p %0, (19*8)," __p(38) "\n\t" + "fst.p %0, (20*8)," __p(40) "\n\t" + "fst.p %0, (21*8)," __p(42) "\n\t" + "fst.p %0, (22*8)," __p(44) "\n\t" + "fst.p %0, (23*8)," __p(46) "\n\t" + "fst.p %0, (24*8)," __p(48) "\n\t" + "fst.p %0, (25*8)," __p(50) "\n\t" + "fst.p %0, (26*8)," __p(52) "\n\t" + "fst.p %0, (27*8)," __p(54) "\n\t" + "fst.p %0, (28*8)," __p(56) "\n\t" + "fst.p %0, (29*8)," __p(58) "\n\t" + "fst.p %0, (30*8)," __p(60) "\n\t" + "fst.p %0, (31*8)," __p(62) "\n\t" "_fgetscr " __f(63) "\n\t" "fst.s %0, (32*8)," __f(63) "\n\t" @@ -76,49 +85,49 @@ static inline void fpload(struct sh_fpu_hard_struct *fpregs) { - asm volatile("fld.d %0, (0*8)," __d(0) "\n\t" - "fld.d %0, (1*8)," __d(2) "\n\t" - "fld.d %0, (2*8)," __d(4) "\n\t" - "fld.d %0, (3*8)," __d(6) "\n\t" - "fld.d %0, (4*8)," __d(8) "\n\t" - "fld.d %0, (5*8)," __d(10) "\n\t" - "fld.d %0, (6*8)," __d(12) "\n\t" - "fld.d %0, (7*8)," __d(14) "\n\t" - "fld.d %0, (8*8)," __d(16) "\n\t" - "fld.d %0, (9*8)," __d(18) "\n\t" - "fld.d %0, (10*8)," __d(20) "\n\t" - "fld.d %0, (11*8)," __d(22) "\n\t" - "fld.d %0, (12*8)," __d(24) "\n\t" - "fld.d %0, (13*8)," __d(26) "\n\t" - "fld.d %0, (14*8)," __d(28) "\n\t" - "fld.d %0, (15*8)," __d(30) "\n\t" - "fld.d %0, (16*8)," __d(32) "\n\t" - "fld.d %0, (17*8)," __d(34) "\n\t" - "fld.d %0, (18*8)," __d(36) "\n\t" - "fld.d %0, (19*8)," __d(38) "\n\t" - "fld.d %0, (20*8)," __d(40) "\n\t" - "fld.d %0, (21*8)," __d(42) "\n\t" - "fld.d %0, (22*8)," __d(44) "\n\t" - "fld.d %0, (23*8)," __d(46) "\n\t" - "fld.d %0, (24*8)," __d(48) "\n\t" - "fld.d %0, (25*8)," __d(50) "\n\t" - "fld.d %0, (26*8)," __d(52) "\n\t" - "fld.d %0, (27*8)," __d(54) "\n\t" - "fld.d %0, (28*8)," __d(56) "\n\t" - "fld.d %0, (29*8)," __d(58) "\n\t" - "fld.d %0, (30*8)," __d(60) "\n\t" + asm volatile("fld.p %0, (0*8)," __p(0) "\n\t" + "fld.p %0, (1*8)," __p(2) "\n\t" + "fld.p %0, (2*8)," __p(4) "\n\t" + "fld.p %0, (3*8)," __p(6) "\n\t" + "fld.p %0, (4*8)," __p(8) "\n\t" + "fld.p %0, (5*8)," __p(10) "\n\t" + "fld.p %0, (6*8)," __p(12) "\n\t" + "fld.p %0, (7*8)," __p(14) "\n\t" + "fld.p %0, (8*8)," __p(16) "\n\t" + "fld.p %0, (9*8)," __p(18) "\n\t" + "fld.p %0, (10*8)," __p(20) "\n\t" + "fld.p %0, (11*8)," __p(22) "\n\t" + "fld.p %0, (12*8)," __p(24) "\n\t" + "fld.p %0, (13*8)," __p(26) "\n\t" + "fld.p %0, (14*8)," __p(28) "\n\t" + "fld.p %0, (15*8)," __p(30) "\n\t" + "fld.p %0, (16*8)," __p(32) "\n\t" + "fld.p %0, (17*8)," __p(34) "\n\t" + "fld.p %0, (18*8)," __p(36) "\n\t" + "fld.p %0, (19*8)," __p(38) "\n\t" + "fld.p %0, (20*8)," __p(40) "\n\t" + "fld.p %0, (21*8)," __p(42) "\n\t" + "fld.p %0, (22*8)," __p(44) "\n\t" + "fld.p %0, (23*8)," __p(46) "\n\t" + "fld.p %0, (24*8)," __p(48) "\n\t" + "fld.p %0, (25*8)," __p(50) "\n\t" + "fld.p %0, (26*8)," __p(52) "\n\t" + "fld.p %0, (27*8)," __p(54) "\n\t" + "fld.p %0, (28*8)," __p(56) "\n\t" + "fld.p %0, (29*8)," __p(58) "\n\t" + "fld.p %0, (30*8)," __p(60) "\n\t" "fld.s %0, (32*8)," __f(63) "\n\t" "_fputscr " __f(63) "\n\t" - "fld.d %0, (31*8)," __d(62) "\n\t" + "fld.p %0, (31*8)," __p(62) "\n\t" : /* no output */ : "r" (fpregs) ); } void fpinit(struct sh_fpu_hard_struct *fpregs) { - *fpregs = init_fpuregs; + *fpregs = init_fpuregs.hard; } asmlinkage void @@ -163,7 +172,7 @@ fpload(¤t->thread.fpu.hard); } else { /* First time FPU user. */ - fpload(&init_fpuregs); + fpload(&init_fpuregs.hard); current->used_math = 1; } release_fpu(); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sh64/kernel/process.c linux-2.4.23-pre8/arch/sh64/kernel/process.c --- linux-2.4.22/arch/sh64/kernel/process.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/sh64/kernel/process.c 2003-10-22 22:47:49.000000000 +0000 @@ -937,3 +937,48 @@ return pc; } +/* Provide a /proc/asids file that lists out the + ASIDs currently associated with the processes. (If the DM.PC register is + examined through the debug link, this shows ASID + PC. To make use of this, + the PID->ASID relationship needs to be known. This is primarily for + debugging.) + */ + +#if defined(CONFIG_SH64_PROC_ASIDS) +#include +#include + +static int +asids_proc_info(char *buf, char **start, off_t fpos, int length, int *eof, void *data) +{ + int len=0; + struct task_struct *p; + read_lock(&tasklist_lock); + for_each_task(p) { + int pid = p->pid; + struct mm_struct *mm; + if (!pid) continue; + mm = p->mm; + if (mm) { + unsigned long asid, context; + context = mm->context; + asid = (context & 0xff); + len += sprintf(buf+len, "%5d : %02x\n", pid, asid); + } else { + len += sprintf(buf+len, "%5d : (none)\n", pid); + } + } + read_unlock(&tasklist_lock); + *eof = 1; + return len; +} + +static int __init register_proc_asids(void) +{ + create_proc_read_entry("asids", 0, NULL, asids_proc_info, NULL); + return 0; +} + +__initcall(register_proc_asids); +#endif + diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sh64/kernel/traps.c linux-2.4.23-pre8/arch/sh64/kernel/traps.c --- linux-2.4.22/arch/sh64/kernel/traps.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/sh64/kernel/traps.c 2003-10-22 22:48:54.000000000 +0000 @@ -7,6 +7,7 @@ * * Copyright (C) 2000, 2001 Paolo Alberelli * Copyright (C) 2003 Paul Mundt + * Copyright (C) 2003 Richard Curnow * */ @@ -27,11 +28,15 @@ #include #include +#include +#include + #include #include #include #include #include +#include #undef DEBUG_EXCEPTION #ifdef DEBUG_EXCEPTION @@ -42,14 +47,13 @@ #define show_excp_regs(a, b, c, d) #endif +static void do_unhandled_exception(int trapnr, int signr, char *str, char *fn_name, + unsigned long error_code, struct pt_regs *regs, struct task_struct *tsk); + #define DO_ERROR(trapnr, signr, str, name, tsk) \ asmlinkage void do_##name(unsigned long error_code, struct pt_regs *regs) \ { \ - show_excp_regs(__FUNCTION__, trapnr, signr, regs); \ - tsk->thread.error_code = error_code; \ - tsk->thread.trap_no = trapnr; \ - if (user_mode(regs)) force_sig(signr, tsk); \ - die_if_no_fixup(str,regs,error_code); \ + do_unhandled_exception(trapnr, signr, str, __FUNCTION__, error_code, regs, current); \ } spinlock_t die_lock; @@ -84,11 +88,34 @@ } } -DO_ERROR( 7, SIGSEGV, "address error (load)", address_error_load, current) -DO_ERROR( 8, SIGSEGV, "address error (store)", address_error_store, current) DO_ERROR(13, SIGILL, "illegal slot instruction", illegal_slot_inst, current) DO_ERROR(87, SIGSEGV, "address error (exec)", address_error_exec, current) + +/* Implement misaligned load/store handling for kernel (and optionally for user + mode too). Limitation : only SHmedia mode code is handled - there is no + handling at all for misaligned accesses occurring in SHcompact code yet. */ + +static int misaligned_fixup(struct pt_regs *regs); + +asmlinkage void do_address_error_load(unsigned long error_code, struct pt_regs *regs) +{ + if (misaligned_fixup(regs) < 0) { + do_unhandled_exception(7, SIGSEGV, "address error(load)", __FUNCTION__, + error_code, regs, current); + } + return; +} + +asmlinkage void do_address_error_store(unsigned long error_code, struct pt_regs *regs) +{ + if (misaligned_fixup(regs) < 0) { + do_unhandled_exception(8, SIGSEGV, "address error(store)", __FUNCTION__, + error_code, regs, current); + } + return; +} + #if defined(CONFIG_SH64_ID2815_WORKAROUND) #define OPCODE_INVALID 0 @@ -121,7 +148,7 @@ which should take ITLBMISS or EXECPROT exceptions at the target falsely take RESINST at the target instead. */ - unsigned long opcode; + unsigned long opcode = 0x6ff4fff0; /* guaranteed reserved opcode */ unsigned long pc, aligned_pc; int get_user_error; int trapnr = 12; @@ -203,11 +230,7 @@ } } - show_excp_regs("do_reserved_inst", trapnr, signr, regs); - current->thread.error_code = error_code; - current->thread.trap_no = trapnr; - if (user_mode(regs)) force_sig(signr, current); - die_if_no_fixup(exception_name, regs, error_code); + do_unhandled_exception(trapnr, signr, exception_name, "do_reserved_inst", error_code, regs, current); } #else /* CONFIG_SH64_ID2815_WORKAROUND */ @@ -302,3 +325,640 @@ show_task(NULL); } +static void do_unhandled_exception(int trapnr, int signr, char *str, char *fn_name, + unsigned long error_code, struct pt_regs *regs, struct task_struct *tsk) +{ + show_excp_regs(fn_name, trapnr, signr, regs); + tsk->thread.error_code = error_code; + tsk->thread.trap_no = trapnr; + if (user_mode(regs)) force_sig(signr, tsk); + die_if_no_fixup(str, regs, error_code); +} + +static int read_opcode(unsigned long long pc, unsigned long *result_opcode) +{ + int get_user_error; + unsigned long aligned_pc; + unsigned long opcode; + + if ((pc & 3) == 1) { + /* SHmedia */ + aligned_pc = pc & ~3; + if (!access_ok(VERIFY_READ, aligned_pc, sizeof(unsigned long))) { + get_user_error = -EFAULT; + } else { + get_user_error = __get_user(opcode, (unsigned long *)aligned_pc); + *result_opcode = opcode; + } + return get_user_error; + } else if ((pc & 1) == 0) { + /* SHcompact */ + /* TODO : provide handling for this. */ + return -EFAULT; + } else { + /* misaligned */ + return -EFAULT; + } +} + +static int address_is_sign_extended(__u64 a) +{ + __u64 b; +#if (NEFF == 32) + b = (__u64)(__s64)(__s32)(a & 0xffffffffUL); + return (b == a) ? 1 : 0; +#else +#error "Sign extend check only works for NEFF==32" +#endif +} + +static int generate_and_check_address(struct pt_regs *regs, + __u32 opcode, + int displacement_not_indexed, + int width_shift, + __u64 *address) +{ + /* return -1 for fault, 0 for OK */ + + __u64 base_address, addr; + int basereg; + int do_as_user = user_mode(regs); + + basereg = (opcode >> 20) & 0x3f; + base_address = regs->regs[basereg]; + if (displacement_not_indexed) { + __s64 displacement; + displacement = (opcode >> 10) & 0x3ff; + displacement = ((displacement << 54) >> 54); /* sign extend */ + addr = (__u64)((__s64)base_address + (displacement << width_shift)); + } else { + __u64 offset; + int offsetreg; + offsetreg = (opcode >> 10) & 0x3f; + offset = regs->regs[offsetreg]; + addr = base_address + offset; + } + + /* Check sign extended */ + if (!address_is_sign_extended(addr)) { + return -1; + } + +#if defined(CONFIG_SH64_USER_MISALIGNED_FIXUP) + /* Check accessible. For misaligned access in the kernel, assume the + address is always accessible (and if not, just fault when the + load/store gets done.) */ + if (do_as_user) { + if (addr >= TASK_SIZE) { + return -1; + } + /* Do access_ok check later - it depends on whether it's a load or a store. */ + } +#endif + + *address = addr; + return 0; +} + +/* Default value as for sh */ +#if defined(CONFIG_SH64_USER_MISALIGNED_FIXUP) +static int user_mode_unaligned_fixup_count = 10; +static int user_mode_unaligned_fixup_enable = 1; +#endif + +static int kernel_mode_unaligned_fixup_count = 32; + +static void misaligned_kernel_word_load(__u64 address, int do_sign_extend, __u64 *result) +{ + unsigned short x; + unsigned char *p, *q; + p = (unsigned char *) (int) address; + q = (unsigned char *) &x; + q[0] = p[0]; + q[1] = p[1]; + + if (do_sign_extend) { + *result = (__u64)(__s64) *(short *) &x; + } else { + *result = (__u64) x; + } +} + +static void misaligned_kernel_word_store(__u64 address, __u64 value) +{ + unsigned short x; + unsigned char *p, *q; + p = (unsigned char *) (int) address; + q = (unsigned char *) &x; + + x = (__u16) value; + p[0] = q[0]; + p[1] = q[1]; +} + +static int misaligned_load(struct pt_regs *regs, + __u32 opcode, + int displacement_not_indexed, + int width_shift, + int do_sign_extend) +{ + /* Return -1 for a fault, 0 for OK */ + int error; + int destreg; + __u64 address; + + error = generate_and_check_address(regs, opcode, + displacement_not_indexed, width_shift, &address); + if (error < 0) { + return error; + } + + destreg = (opcode >> 4) & 0x3f; +#if defined(CONFIG_SH64_USER_MISALIGNED_FIXUP) + if (user_mode(regs)) { + __u64 buffer; + + if (!access_ok(VERIFY_READ, (unsigned long) address, 1UL< 0) { + return -1; /* fault */ + } + switch (width_shift) { + case 1: + if (do_sign_extend) { + regs->regs[destreg] = (__u64)(__s64) *(__s16 *) &buffer; + } else { + regs->regs[destreg] = (__u64) *(__u16 *) &buffer; + } + break; + case 2: + regs->regs[destreg] = (__u64)(__s64) *(__s32 *) &buffer; + break; + case 3: + regs->regs[destreg] = buffer; + break; + default: + printk("Unexpected width_shift %d in misaligned_load, PC=%08lx\n", + width_shift, (unsigned long) regs->pc); + break; + } + } else +#endif + { + /* kernel mode - we can take short cuts since if we fault, it's a genuine bug */ + __u64 lo, hi; + + switch (width_shift) { + case 1: + misaligned_kernel_word_load(address, do_sign_extend, ®s->regs[destreg]); + break; + case 2: + asm ("ldlo.l %1, 0, %0" : "=r" (lo) : "r" (address)); + asm ("ldhi.l %1, 3, %0" : "=r" (hi) : "r" (address)); + regs->regs[destreg] = lo | hi; + break; + case 3: + asm ("ldlo.q %1, 0, %0" : "=r" (lo) : "r" (address)); + asm ("ldhi.q %1, 7, %0" : "=r" (hi) : "r" (address)); + regs->regs[destreg] = lo | hi; + break; + + default: + printk("Unexpected width_shift %d in misaligned_load, PC=%08lx\n", + width_shift, (unsigned long) regs->pc); + break; + } + } + + return 0; + +} + +static int misaligned_store(struct pt_regs *regs, + __u32 opcode, + int displacement_not_indexed, + int width_shift) +{ + /* Return -1 for a fault, 0 for OK */ + int error; + int srcreg; + __u64 address; + + error = generate_and_check_address(regs, opcode, + displacement_not_indexed, width_shift, &address); + if (error < 0) { + return error; + } + + srcreg = (opcode >> 4) & 0x3f; +#if defined(CONFIG_SH64_USER_MISALIGNED_FIXUP) + if (user_mode(regs)) { + __u64 buffer; + + if (!access_ok(VERIFY_WRITE, (unsigned long) address, 1UL<regs[srcreg]; + break; + case 2: + *(__u32 *) &buffer = (__u32) regs->regs[srcreg]; + break; + case 3: + buffer = regs->regs[srcreg]; + break; + default: + printk("Unexpected width_shift %d in misaligned_store, PC=%08lx\n", + width_shift, (unsigned long) regs->pc); + break; + } + + if (__copy_user((void *)(int)address, &buffer, (1 << width_shift)) > 0) { + return -1; /* fault */ + } + } else +#endif + { + /* kernel mode - we can take short cuts since if we fault, it's a genuine bug */ + __u64 val = regs->regs[srcreg]; + + switch (width_shift) { + case 1: + misaligned_kernel_word_store(address, val); + break; + case 2: + asm ("stlo.l %1, 0, %0" : : "r" (val), "r" (address)); + asm ("sthi.l %1, 3, %0" : : "r" (val), "r" (address)); + break; + case 3: + asm ("stlo.q %1, 0, %0" : : "r" (val), "r" (address)); + asm ("sthi.q %1, 7, %0" : : "r" (val), "r" (address)); + break; + + default: + printk("Unexpected width_shift %d in misaligned_store, PC=%08lx\n", + width_shift, (unsigned long) regs->pc); + break; + } + } + + return 0; + +} + +#if defined(CONFIG_SH64_USER_MISALIGNED_FIXUP) +/* Never need to fix up misaligned FPU accesses within the kernel since that's a real + error. */ +static int misaligned_fpu_load(struct pt_regs *regs, + __u32 opcode, + int displacement_not_indexed, + int width_shift, + int do_paired_load) +{ + /* Return -1 for a fault, 0 for OK */ + int error; + int destreg; + __u64 address; + + error = generate_and_check_address(regs, opcode, + displacement_not_indexed, width_shift, &address); + if (error < 0) { + return error; + } + + destreg = (opcode >> 4) & 0x3f; + if (user_mode(regs)) { + __u64 buffer; + __u32 buflo, bufhi; + + if (!access_ok(VERIFY_READ, (unsigned long) address, 1UL< 0) { + return -1; /* fault */ + } + /* 'current' may be the current owner of the FPU state, so + context switch the registers into memory so they can be + indexed by register number. */ + if (last_task_used_math == current) { + grab_fpu(); + fpsave(¤t->thread.fpu.hard); + release_fpu(); + last_task_used_math = NULL; + regs->sr |= SR_FD; + } + + buflo = *(__u32*) &buffer; + bufhi = *(1 + (__u32*) &buffer); + + switch (width_shift) { + case 2: + current->thread.fpu.hard.fp_regs[destreg] = buflo; + break; + case 3: + if (do_paired_load) { + current->thread.fpu.hard.fp_regs[destreg] = buflo; + current->thread.fpu.hard.fp_regs[destreg+1] = bufhi; + } else { +#if defined(CONFIG_LITTLE_ENDIAN) + current->thread.fpu.hard.fp_regs[destreg] = bufhi; + current->thread.fpu.hard.fp_regs[destreg+1] = buflo; +#else + current->thread.fpu.hard.fp_regs[destreg] = buflo; + current->thread.fpu.hard.fp_regs[destreg+1] = bufhi; +#endif + } + break; + default: + printk("Unexpected width_shift %d in misaligned_fpu_load, PC=%08lx\n", + width_shift, (unsigned long) regs->pc); + break; + } + return 0; + } else { + die ("Misaligned FPU load inside kernel", regs, 0); + return -1; + } + + +} + +static int misaligned_fpu_store(struct pt_regs *regs, + __u32 opcode, + int displacement_not_indexed, + int width_shift, + int do_paired_load) +{ + /* Return -1 for a fault, 0 for OK */ + int error; + int srcreg; + __u64 address; + + error = generate_and_check_address(regs, opcode, + displacement_not_indexed, width_shift, &address); + if (error < 0) { + return error; + } + + srcreg = (opcode >> 4) & 0x3f; + if (user_mode(regs)) { + __u64 buffer; + /* Initialise these to NaNs. */ + __u32 buflo=0xffffffffUL, bufhi=0xffffffffUL; + + if (!access_ok(VERIFY_WRITE, (unsigned long) address, 1UL<thread.fpu.hard); + release_fpu(); + last_task_used_math = NULL; + regs->sr |= SR_FD; + } + + switch (width_shift) { + case 2: + buflo = current->thread.fpu.hard.fp_regs[srcreg]; + break; + case 3: + if (do_paired_load) { + buflo = current->thread.fpu.hard.fp_regs[srcreg]; + bufhi = current->thread.fpu.hard.fp_regs[srcreg+1]; + } else { +#if defined(CONFIG_LITTLE_ENDIAN) + bufhi = current->thread.fpu.hard.fp_regs[srcreg]; + buflo = current->thread.fpu.hard.fp_regs[srcreg+1]; +#else + buflo = current->thread.fpu.hard.fp_regs[srcreg]; + bufhi = current->thread.fpu.hard.fp_regs[srcreg+1]; +#endif + } + break; + default: + printk("Unexpected width_shift %d in misaligned_fpu_store, PC=%08lx\n", + width_shift, (unsigned long) regs->pc); + break; + } + + *(__u32*) &buffer = buflo; + *(1 + (__u32*) &buffer) = bufhi; + if (__copy_user((void *)(int)address, &buffer, (1 << width_shift)) > 0) { + return -1; /* fault */ + } + return 0; + } else { + die ("Misaligned FPU load inside kernel", regs, 0); + return -1; + } +} +#endif + +static int misaligned_fixup(struct pt_regs *regs) +{ + unsigned long opcode; + int error; + int major, minor; + +#if !defined(CONFIG_SH64_USER_MISALIGNED_FIXUP) + /* Never fixup user mode misaligned accesses without this option enabled. */ + return -1; +#else + if (!user_mode_unaligned_fixup_enable) return -1; +#endif + + error = read_opcode(regs->pc, &opcode); + if (error < 0) { + return error; + } + major = (opcode >> 26) & 0x3f; + minor = (opcode >> 16) & 0xf; + +#if defined(CONFIG_SH64_USER_MISALIGNED_FIXUP) + if (user_mode(regs) && (user_mode_unaligned_fixup_count > 0)) { + --user_mode_unaligned_fixup_count; + /* Only do 'count' worth of these reports, to remove a potential DoS against syslog */ + printk("Fixing up unaligned userspace access in \"%s\" pid=%d pc=0x%08x ins=0x%08lx\n", + current->comm, current->pid, (__u32)regs->pc, opcode); + } else +#endif + if (!user_mode(regs) && (kernel_mode_unaligned_fixup_count > 0)) { + --kernel_mode_unaligned_fixup_count; + if (in_interrupt()) { + printk("Fixing up unaligned kernelspace access in interrupt pc=0x%08x ins=0x%08lx\n", + (__u32)regs->pc, opcode); + } else { + printk("Fixing up unaligned kernelspace access in \"%s\" pid=%d pc=0x%08x ins=0x%08lx\n", + current->comm, current->pid, (__u32)regs->pc, opcode); + } + } + + + switch (major) { + case (0x84>>2): /* LD.W */ + error = misaligned_load(regs, opcode, 1, 1, 1); + break; + case (0xb0>>2): /* LD.UW */ + error = misaligned_load(regs, opcode, 1, 1, 0); + break; + case (0x88>>2): /* LD.L */ + error = misaligned_load(regs, opcode, 1, 2, 1); + break; + case (0x8c>>2): /* LD.Q */ + error = misaligned_load(regs, opcode, 1, 3, 0); + break; + + case (0xa4>>2): /* ST.W */ + error = misaligned_store(regs, opcode, 1, 1); + break; + case (0xa8>>2): /* ST.L */ + error = misaligned_store(regs, opcode, 1, 2); + break; + case (0xac>>2): /* ST.Q */ + error = misaligned_store(regs, opcode, 1, 3); + break; + + case (0x40>>2): /* indexed loads */ + switch (minor) { + case 0x1: /* LDX.W */ + error = misaligned_load(regs, opcode, 0, 1, 1); + break; + case 0x5: /* LDX.UW */ + error = misaligned_load(regs, opcode, 0, 1, 0); + break; + case 0x2: /* LDX.L */ + error = misaligned_load(regs, opcode, 0, 2, 1); + break; + case 0x3: /* LDX.Q */ + error = misaligned_load(regs, opcode, 0, 3, 0); + break; + default: + error = -1; + break; + } + break; + + case (0x60>>2): /* indexed stores */ + switch (minor) { + case 0x1: /* STX.W */ + error = misaligned_store(regs, opcode, 0, 1); + break; + case 0x2: /* STX.L */ + error = misaligned_store(regs, opcode, 0, 2); + break; + case 0x3: /* STX.Q */ + error = misaligned_store(regs, opcode, 0, 3); + break; + default: + error = -1; + break; + } + break; + +#if defined(CONFIG_SH64_USER_MISALIGNED_FIXUP) + case (0x94>>2): /* FLD.S */ + error = misaligned_fpu_load(regs, opcode, 1, 2, 0); + break; + case (0x98>>2): /* FLD.P */ + error = misaligned_fpu_load(regs, opcode, 1, 3, 1); + break; + case (0x9c>>2): /* FLD.D */ + error = misaligned_fpu_load(regs, opcode, 1, 3, 0); + break; + case (0x1c>>2): /* floating indexed loads */ + switch (minor) { + case 0x8: /* FLDX.S */ + error = misaligned_fpu_load(regs, opcode, 0, 2, 0); + break; + case 0xd: /* FLDX.P */ + error = misaligned_fpu_load(regs, opcode, 0, 3, 1); + break; + case 0x9: /* FLDX.D */ + error = misaligned_fpu_load(regs, opcode, 0, 3, 0); + break; + default: + error = -1; + break; + } + break; + case (0xb4>>2): /* FLD.S */ + error = misaligned_fpu_store(regs, opcode, 1, 2, 0); + break; + case (0xb8>>2): /* FLD.P */ + error = misaligned_fpu_store(regs, opcode, 1, 3, 1); + break; + case (0xbc>>2): /* FLD.D */ + error = misaligned_fpu_store(regs, opcode, 1, 3, 0); + break; + case (0x3c>>2): /* floating indexed stores */ + switch (minor) { + case 0x8: /* FSTX.S */ + error = misaligned_fpu_store(regs, opcode, 0, 2, 0); + break; + case 0xd: /* FSTX.P */ + error = misaligned_fpu_store(regs, opcode, 0, 3, 1); + break; + case 0x9: /* FSTX.D */ + error = misaligned_fpu_store(regs, opcode, 0, 3, 0); + break; + default: + error = -1; + break; + } + break; +#endif + + default: + /* Fault */ + error = -1; + break; + } + + if (error < 0) { + return error; + } else { + regs->pc += 4; /* Skip the instruction that's just been emulated */ + return 0; + } + +} + +static ctl_table unaligned_table[] = { + {1, "kernel_reports", &kernel_mode_unaligned_fixup_count, + sizeof(int), 0644, NULL, &proc_dointvec}, +#if defined(CONFIG_SH64_USER_MISALIGNED_FIXUP) + {2, "user_reports", &user_mode_unaligned_fixup_count, + sizeof(int), 0644, NULL, &proc_dointvec}, + {3, "user_enable", &user_mode_unaligned_fixup_enable, + sizeof(int), 0644, NULL, &proc_dointvec}, +#endif + {0} +}; + +static ctl_table unaligned_root[] = { + {1, "unaligned_fixup", NULL, 0, 0555, unaligned_table}, + {0} +}; + +static ctl_table sh64_root[] = { + {1, "sh64", NULL, 0, 0555, unaligned_root}, + {0} +}; +static struct ctl_table_header *sysctl_header; +static int __init init_sysctl(void) +{ + sysctl_header = register_sysctl_table(sh64_root, 0); + return 0; +} + +__initcall(init_sysctl); + diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sparc/boot/btfixupprep.c linux-2.4.23-pre8/arch/sparc/boot/btfixupprep.c --- linux-2.4.22/arch/sparc/boot/btfixupprep.c 2001-08-28 14:09:44.000000000 +0000 +++ linux-2.4.23-pre8/arch/sparc/boot/btfixupprep.c 2003-10-22 22:49:21.000000000 +0000 @@ -167,6 +167,8 @@ } } else if (buffer[nbase+4] != '_') continue; + if (!strcmp (sect, ".text.exit")) + continue; if (strcmp (sect, ".text") && strcmp (sect, ".text.init") && strcmp (sect, ".fixup") && (strcmp (sect, "__ksymtab") || buffer[nbase+3] != 'f')) { if (buffer[nbase+3] == 'f') fprintf(stderr, "Wrong use of '%s' in '%s' section. It can be only used in .text, .text.init, .fixup and __ksymtab\n", buffer + shift, sect); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sparc/config.in linux-2.4.23-pre8/arch/sparc/config.in --- linux-2.4.22/arch/sparc/config.in 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/sparc/config.in 2003-10-22 22:47:39.000000000 +0000 @@ -29,6 +29,10 @@ bool 'Symmetric multi-processing support (does not work on sun4/sun4c)' CONFIG_SMP +if [ "$CONFIG_SMP" = "y" ]; then + int 'Maximum number of CPUs (2-32)' CONFIG_NR_CPUS 32 +fi + # Identify this as a Sparc32 build define_bool CONFIG_SPARC32 y @@ -273,6 +277,8 @@ bool ' Spinlock debugging' CONFIG_DEBUG_SPINLOCK fi +int 'Kernel messages buffer length shift (0 = default)' CONFIG_LOG_BUF_SHIFT 0 + endmenu source crypto/Config.in diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sparc/kernel/Makefile linux-2.4.23-pre8/arch/sparc/kernel/Makefile --- linux-2.4.22/arch/sparc/kernel/Makefile 2002-08-03 00:39:43.000000000 +0000 +++ linux-2.4.23-pre8/arch/sparc/kernel/Makefile 2003-10-22 22:48:24.000000000 +0000 @@ -51,15 +51,11 @@ @echo "" >> asm_offsets.h @echo "#include " >> asm_offsets.h @echo "" >> asm_offsets.h - @echo "#ifndef CONFIG_SMP" >> asm_offsets.h - @echo "" >> asm_offsets.h @echo "#include " > tmp.c - @echo "#undef CONFIG_SMP" >> tmp.c @echo "#include " >> tmp.c $(CPP) $(CPPFLAGS) tmp.c -o tmp.i @echo "/* Automatically generated. Do not edit. */" > check_asm_data.c @echo "#include " >> check_asm_data.c - @echo "#undef CONFIG_SMP" >> check_asm_data.c @echo "#include " >> check_asm_data.c @echo "unsigned int check_asm_data[] = {" >> check_asm_data.c $(SH) ./check_asm.sh -data task tmp.i check_asm_data.c @@ -83,42 +79,6 @@ ./check_asm >> asm_offsets.h @rm -f check_asm check_asm.c @echo "" >> asm_offsets.h - @echo "#else /* CONFIG_SMP */" >> asm_offsets.h - @echo "" >> asm_offsets.h - @echo "#include " > tmp.c - @echo "#undef CONFIG_SMP" >> tmp.c - @echo "#define CONFIG_SMP 1" >> tmp.c - @echo "#include " >> tmp.c - $(CPP) $(CPPFLAGS) tmp.c -o tmp.i - @echo "/* Automatically generated. Do not edit. */" > check_asm_data.c - @echo "#include " >> check_asm_data.c - @echo "#undef CONFIG_SMP" >> check_asm_data.c - @echo "#define CONFIG_SMP 1" >> check_asm_data.c - @echo "#include " >> check_asm_data.c - @echo "unsigned int check_asm_data[] = {" >> check_asm_data.c - $(SH) ./check_asm.sh -data task tmp.i check_asm_data.c - $(SH) ./check_asm.sh -data mm tmp.i check_asm_data.c - $(SH) ./check_asm.sh -data thread tmp.i check_asm_data.c - @echo '};' >> check_asm_data.c - $(CC) $(CFLAGS) -S -o check_asm_data.s check_asm_data.c - @echo "/* Automatically generated. Do not edit. */" > check_asm.c - @echo 'extern int printf(const char *fmt, ...);' >>check_asm.c - @echo "unsigned int check_asm_data[] = {" >> check_asm.c - $(SH) ./check_asm.sh -ints check_asm_data.s check_asm.c - @echo "};" >> check_asm.c - @echo 'int main(void) {' >> check_asm.c - @echo 'int i = 0;' >> check_asm.c - $(SH) ./check_asm.sh -printf task tmp.i check_asm.c - $(SH) ./check_asm.sh -printf mm tmp.i check_asm.c - $(SH) ./check_asm.sh -printf thread tmp.i check_asm.c - @echo 'return 0; }' >> check_asm.c - @rm -f tmp.[ci] check_asm_data.[cs] - $(HOSTCC) -o check_asm check_asm.c - ./check_asm >> asm_offsets.h - @rm -f check_asm check_asm.c - @echo "" >> asm_offsets.h - @echo "#endif /* CONFIG_SMP */" >> asm_offsets.h - @echo "" >> asm_offsets.h @echo "#endif /* __ASM_OFFSETS_H__ */" >> asm_offsets.h @if test -r $(HPATH)/asm/asm_offsets.h; then \ if cmp -s asm_offsets.h $(HPATH)/asm/asm_offsets.h; then \ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sparc/kernel/devices.c linux-2.4.23-pre8/arch/sparc/kernel/devices.c --- linux-2.4.22/arch/sparc/kernel/devices.c 2002-11-28 23:53:12.000000000 +0000 +++ linux-2.4.23-pre8/arch/sparc/kernel/devices.c 2003-10-22 22:49:32.000000000 +0000 @@ -15,7 +15,7 @@ #include #include -struct prom_cpuinfo linux_cpus[32]; +struct prom_cpuinfo linux_cpus[NR_CPUS]; int linux_num_cpus = 0; extern void cpu_probe(void); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sparc/kernel/sun4d_smp.c linux-2.4.23-pre8/arch/sparc/kernel/sun4d_smp.c --- linux-2.4.22/arch/sparc/kernel/sun4d_smp.c 2002-08-03 00:39:43.000000000 +0000 +++ linux-2.4.23-pre8/arch/sparc/kernel/sun4d_smp.c 2003-10-22 22:47:45.000000000 +0000 @@ -351,11 +351,11 @@ unsigned long a3 asm("i3") = arg3; unsigned long a4 asm("i4") = arg4; unsigned long a5 asm("i5") = arg5; - - __asm__ __volatile__(" - std %0, [%6] - std %2, [%6 + 8] - std %4, [%6 + 16]" : : + + __asm__ __volatile__( + "std %0, [%6]\n\t" + "std %2, [%6 + 8]\n\t" + "std %4, [%6 + 16]\n\t" : : "r"(f), "r"(a1), "r"(a2), "r"(a3), "r"(a4), "r"(a5), "r" (&ccall_info.func)); } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sparc/kernel/sys_sunos.c linux-2.4.23-pre8/arch/sparc/kernel/sys_sunos.c --- linux-2.4.22/arch/sparc/kernel/sys_sunos.c 2002-11-28 23:53:12.000000000 +0000 +++ linux-2.4.23-pre8/arch/sparc/kernel/sys_sunos.c 2003-10-22 22:48:38.000000000 +0000 @@ -193,7 +193,7 @@ * fool it, but this should catch most mistakes. */ freepages = atomic_read(&buffermem_pages) >> PAGE_SHIFT; - freepages += atomic_read(&page_cache_size); + freepages += page_cache_size; freepages >>= 1; freepages += nr_free_pages(); freepages += nr_swap_pages; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sparc/lib/checksum.S linux-2.4.23-pre8/arch/sparc/lib/checksum.S --- linux-2.4.22/arch/sparc/lib/checksum.S 1999-01-07 16:46:58.000000000 +0000 +++ linux-2.4.23-pre8/arch/sparc/lib/checksum.S 2003-10-22 22:49:03.000000000 +0000 @@ -145,36 +145,39 @@ .globl C_LABEL(__csum_partial_copy_start), C_LABEL(__csum_partial_copy_end) C_LABEL(__csum_partial_copy_start): -#define EX(x,y,a,b,z) \ +/* Work around cpp -rob */ +#define ALLOC #alloc +#define EXECINSTR #execinstr +#define EX(x,y,a,b) \ 98: x,y; \ - .section .fixup,z##alloc,z##execinstr; \ + .section .fixup,ALLOC,EXECINSTR; \ .align 4; \ 99: ba 30f; \ a, b, %o3; \ - .section __ex_table,z##alloc; \ + .section __ex_table,ALLOC; \ .align 4; \ .word 98b, 99b; \ .text; \ .align 4 -#define EX2(x,y,z) \ +#define EX2(x,y) \ 98: x,y; \ - .section __ex_table,z##alloc; \ + .section __ex_table,ALLOC; \ .align 4; \ .word 98b, 30f; \ .text; \ .align 4 -#define EX3(x,y,z) \ +#define EX3(x,y) \ 98: x,y; \ - .section __ex_table,z##alloc; \ + .section __ex_table,ALLOC; \ .align 4; \ .word 98b, 96f; \ .text; \ .align 4 -#define EXT(start,end,handler,z) \ - .section __ex_table,z##alloc; \ +#define EXT(start,end,handler) \ + .section __ex_table,ALLOC; \ .align 4; \ .word start, 0, end, handler; \ .text; \ @@ -247,21 +250,21 @@ cc_end_cruft: be 1f andcc %o3, 4, %g0 - EX(ldd [%o0 + 0x00], %g2, and %o3, 0xf,#) + EX(ldd [%o0 + 0x00], %g2, and %o3, 0xf) add %o1, 8, %o1 addcc %g2, %g7, %g7 add %o0, 8, %o0 addxcc %g3, %g7, %g7 - EX2(st %g2, [%o1 - 0x08],#) + EX2(st %g2, [%o1 - 0x08]) addx %g0, %g7, %g7 andcc %o3, 4, %g0 - EX2(st %g3, [%o1 - 0x04],#) + EX2(st %g3, [%o1 - 0x04]) 1: be 1f andcc %o3, 3, %o3 - EX(ld [%o0 + 0x00], %g2, add %o3, 4,#) + EX(ld [%o0 + 0x00], %g2, add %o3, 4) add %o1, 4, %o1 addcc %g2, %g7, %g7 - EX2(st %g2, [%o1 - 0x04],#) + EX2(st %g2, [%o1 - 0x04]) addx %g0, %g7, %g7 andcc %o3, 3, %g0 add %o0, 4, %o0 @@ -271,14 +274,14 @@ subcc %o3, 2, %o3 b 4f or %g0, %g0, %o4 -2: EX(lduh [%o0 + 0x00], %o4, add %o3, 2,#) +2: EX(lduh [%o0 + 0x00], %o4, add %o3, 2) add %o0, 2, %o0 - EX2(sth %o4, [%o1 + 0x00],#) + EX2(sth %o4, [%o1 + 0x00]) be 6f add %o1, 2, %o1 sll %o4, 16, %o4 -4: EX(ldub [%o0 + 0x00], %o5, add %g0, 1,#) - EX2(stb %o5, [%o1 + 0x00],#) +4: EX(ldub [%o0 + 0x00], %o5, add %g0, 1) + EX2(stb %o5, [%o1 + 0x00]) sll %o5, 8, %o5 or %o5, %o4, %o4 6: addcc %o4, %g7, %g7 @@ -295,9 +298,9 @@ andcc %o0, 0x2, %g0 be 1f andcc %o0, 0x4, %g0 - EX(lduh [%o0 + 0x00], %g4, add %g1, 0,#) + EX(lduh [%o0 + 0x00], %g4, add %g1, 0) sub %g1, 2, %g1 - EX2(sth %g4, [%o1 + 0x00],#) + EX2(sth %g4, [%o1 + 0x00]) add %o0, 2, %o0 sll %g4, 16, %g4 addcc %g4, %g7, %g7 @@ -311,9 +314,9 @@ or %g3, %g7, %g7 1: be 3f andcc %g1, 0xffffff80, %g0 - EX(ld [%o0 + 0x00], %g4, add %g1, 0,#) + EX(ld [%o0 + 0x00], %g4, add %g1, 0) sub %g1, 4, %g1 - EX2(st %g4, [%o1 + 0x00],#) + EX2(st %g4, [%o1 + 0x00]) add %o0, 4, %o0 addcc %g4, %g7, %g7 add %o1, 4, %o1 @@ -342,7 +345,7 @@ CSUMCOPY_BIGCHUNK(%o0,%o1,%g7,0x20,%o4,%o5,%g2,%g3,%g4,%g5,%o2,%o3) CSUMCOPY_BIGCHUNK(%o0,%o1,%g7,0x40,%o4,%o5,%g2,%g3,%g4,%g5,%o2,%o3) CSUMCOPY_BIGCHUNK(%o0,%o1,%g7,0x60,%o4,%o5,%g2,%g3,%g4,%g5,%o2,%o3) -10: EXT(5b, 10b, 20f,#) ! note for exception handling +10: EXT(5b, 10b, 20f) ! note for exception handling sub %g1, 128, %g1 ! detract from length addx %g0, %g7, %g7 ! add in last carry bit andcc %g1, 0xffffff80, %g0 ! more to csum? @@ -367,7 +370,7 @@ CSUMCOPY_LASTCHUNK(%o0,%o1,%g7,0x28,%g2,%g3,%g4,%g5) CSUMCOPY_LASTCHUNK(%o0,%o1,%g7,0x18,%g2,%g3,%g4,%g5) CSUMCOPY_LASTCHUNK(%o0,%o1,%g7,0x08,%g2,%g3,%g4,%g5) -12: EXT(cctbl, 12b, 22f,#) ! note for exception table handling +12: EXT(cctbl, 12b, 22f) ! note for exception table handling addx %g0, %g7, %g7 andcc %o3, 0xf, %g0 ! check for low bits set ccte: bne cc_end_cruft ! something left, handle it out of band @@ -378,7 +381,7 @@ CSUMCOPY_BIGCHUNK_ALIGNED(%o0,%o1,%g7,0x20,%o4,%o5,%g2,%g3,%g4,%g5,%o2,%o3) CSUMCOPY_BIGCHUNK_ALIGNED(%o0,%o1,%g7,0x40,%o4,%o5,%g2,%g3,%g4,%g5,%o2,%o3) CSUMCOPY_BIGCHUNK_ALIGNED(%o0,%o1,%g7,0x60,%o4,%o5,%g2,%g3,%g4,%g5,%o2,%o3) -11: EXT(ccdbl, 11b, 21f,#) ! note for exception table handling +11: EXT(ccdbl, 11b, 21f) ! note for exception table handling sub %g1, 128, %g1 ! detract from length addx %g0, %g7, %g7 ! add in last carry bit andcc %g1, 0xffffff80, %g0 ! more to csum? @@ -395,9 +398,9 @@ be,a 1f srl %g1, 1, %g4 sub %g1, 1, %g1 - EX(ldub [%o0], %g5, add %g1, 1,#) + EX(ldub [%o0], %g5, add %g1, 1) add %o0, 1, %o0 - EX2(stb %g5, [%o1],#) + EX2(stb %g5, [%o1]) srl %g1, 1, %g4 add %o1, 1, %o1 1: cmp %g4, 0 @@ -406,34 +409,34 @@ andcc %o0, 2, %g0 be,a 1f srl %g4, 1, %g4 - EX(lduh [%o0], %o4, add %g1, 0,#) + EX(lduh [%o0], %o4, add %g1, 0) sub %g1, 2, %g1 srl %o4, 8, %g2 sub %g4, 1, %g4 - EX2(stb %g2, [%o1],#) + EX2(stb %g2, [%o1]) add %o4, %g5, %g5 - EX2(stb %o4, [%o1 + 1],#) + EX2(stb %o4, [%o1 + 1]) add %o0, 2, %o0 srl %g4, 1, %g4 add %o1, 2, %o1 1: cmp %g4, 0 be,a 2f andcc %g1, 2, %g0 - EX3(ld [%o0], %o4,#) + EX3(ld [%o0], %o4) 5: srl %o4, 24, %g2 srl %o4, 16, %g3 - EX2(stb %g2, [%o1],#) + EX2(stb %g2, [%o1]) srl %o4, 8, %g2 - EX2(stb %g3, [%o1 + 1],#) + EX2(stb %g3, [%o1 + 1]) add %o0, 4, %o0 - EX2(stb %g2, [%o1 + 2],#) + EX2(stb %g2, [%o1 + 2]) addcc %o4, %g5, %g5 - EX2(stb %o4, [%o1 + 3],#) + EX2(stb %o4, [%o1 + 3]) addx %g5, %g0, %g5 ! I am now to lazy to optimize this (question it add %o1, 4, %o1 ! is worthy). Maybe some day - with the sll/srl subcc %g4, 1, %g4 ! tricks bne,a 5b - EX3(ld [%o0], %o4,#) + EX3(ld [%o0], %o4) sll %g5, 16, %g2 srl %g5, 16, %g5 srl %g2, 16, %g2 @@ -441,19 +444,19 @@ add %g2, %g5, %g5 2: be,a 3f andcc %g1, 1, %g0 - EX(lduh [%o0], %o4, and %g1, 3,#) + EX(lduh [%o0], %o4, and %g1, 3) andcc %g1, 1, %g0 srl %o4, 8, %g2 add %o0, 2, %o0 - EX2(stb %g2, [%o1],#) + EX2(stb %g2, [%o1]) add %g5, %o4, %g5 - EX2(stb %o4, [%o1 + 1],#) + EX2(stb %o4, [%o1 + 1]) add %o1, 2, %o1 3: be,a 1f sll %g5, 16, %o4 - EX(ldub [%o0], %g2, add %g0, 1,#) + EX(ldub [%o0], %g2, add %g0, 1) sll %g2, 8, %o4 - EX2(stb %g2, [%o1],#) + EX2(stb %g2, [%o1]) add %g5, %o4, %g5 sll %g5, 16, %o4 1: addcc %o4, %g5, %g5 diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sparc/lib/copy_user.S linux-2.4.23-pre8/arch/sparc/lib/copy_user.S --- linux-2.4.22/arch/sparc/lib/copy_user.S 2000-04-14 16:37:09.000000000 +0000 +++ linux-2.4.23-pre8/arch/sparc/lib/copy_user.S 2003-10-22 22:48:59.000000000 +0000 @@ -16,41 +16,44 @@ #include #include -#define EX(x,y,a,b,z) \ +/* Work around cpp -rob */ +#define ALLOC #alloc +#define EXECINSTR #execinstr +#define EX(x,y,a,b) \ 98: x,y; \ - .section .fixup,z##alloc,z##execinstr; \ + .section .fixup,ALLOC,EXECINSTR; \ .align 4; \ 99: ba fixupretl; \ a, b, %g3; \ - .section __ex_table,z##alloc; \ + .section __ex_table,ALLOC; \ .align 4; \ .word 98b, 99b; \ .text; \ .align 4 -#define EX2(x,y,c,d,e,a,b,z) \ +#define EX2(x,y,c,d,e,a,b) \ 98: x,y; \ - .section .fixup,z##alloc,z##execinstr; \ + .section .fixup,ALLOC,EXECINSTR; \ .align 4; \ 99: c, d, e; \ ba fixupretl; \ a, b, %g3; \ - .section __ex_table,z##alloc; \ + .section __ex_table,ALLOC; \ .align 4; \ .word 98b, 99b; \ .text; \ .align 4 -#define EXO2(x,y,z) \ -98: x,##y; \ - .section __ex_table,z##alloc; \ +#define EXO2(x,y) \ +98: x, y; \ + .section __ex_table,ALLOC; \ .align 4; \ .word 98b, 97f; \ .text; \ .align 4 -#define EXT(start,end,handler,z) \ - .section __ex_table,z##alloc; \ +#define EXT(start,end,handler) \ + .section __ex_table,ALLOC; \ .align 4; \ .word start, 0, end, handler; \ .text; \ @@ -121,23 +124,23 @@ be 4f andcc %o1, 2, %g0 - EXO2(ldub [%o1], %g2,#) + EXO2(ldub [%o1], %g2) add %o1, 1, %o1 - EXO2(stb %g2, [%o0],#) + EXO2(stb %g2, [%o0]) sub %o2, 1, %o2 bne 3f add %o0, 1, %o0 - EXO2(lduh [%o1], %g2,#) + EXO2(lduh [%o1], %g2) add %o1, 2, %o1 - EXO2(sth %g2, [%o0],#) + EXO2(sth %g2, [%o0]) sub %o2, 2, %o2 b 3f add %o0, 2, %o0 4: - EXO2(lduh [%o1], %g2,#) + EXO2(lduh [%o1], %g2) add %o1, 2, %o1 - EXO2(sth %g2, [%o0],#) + EXO2(sth %g2, [%o0]) sub %o2, 2, %o2 b 3f add %o0, 2, %o0 @@ -160,9 +163,9 @@ be 2f mov %o2, %g1 - EXO2(ld [%o1], %o4,#) + EXO2(ld [%o1], %o4) sub %g1, 4, %g1 - EXO2(st %o4, [%o0],#) + EXO2(st %o4, [%o0]) add %o1, 4, %o1 add %o0, 4, %o0 2: @@ -177,7 +180,7 @@ MOVE_BIGCHUNK(o1, o0, 0x40, o2, o3, o4, o5, g2, g3, g4, g5) MOVE_BIGCHUNK(o1, o0, 0x60, o2, o3, o4, o5, g2, g3, g4, g5) 80: - EXT(5b, 80b, 50f,#) + EXT(5b, 80b, 50f) subcc %g7, 128, %g7 add %o1, 128, %o1 bne 5b @@ -204,37 +207,37 @@ MOVE_LASTCHUNK(o1, o0, 0x10, g2, g3, g4, g5) MOVE_LASTCHUNK(o1, o0, 0x00, g2, g3, g4, g5) copy_user_table_end: - EXT(copy_user_table, copy_user_table_end, 51f,#) + EXT(copy_user_table, copy_user_table_end, 51f) be copy_user_last7 andcc %g1, 4, %g0 - EX(ldd [%o1], %g2, and %g1, 0xf,#) + EX(ldd [%o1], %g2, and %g1, 0xf) add %o0, 8, %o0 add %o1, 8, %o1 - EX(st %g2, [%o0 - 0x08], and %g1, 0xf,#) - EX2(st %g3, [%o0 - 0x04], and %g1, 0xf, %g1, sub %g1, 4,#) + EX(st %g2, [%o0 - 0x08], and %g1, 0xf) + EX2(st %g3, [%o0 - 0x04], and %g1, 0xf, %g1, sub %g1, 4) copy_user_last7: be 1f andcc %g1, 2, %g0 - EX(ld [%o1], %g2, and %g1, 7,#) + EX(ld [%o1], %g2, and %g1, 7) add %o1, 4, %o1 - EX(st %g2, [%o0], and %g1, 7,#) + EX(st %g2, [%o0], and %g1, 7) add %o0, 4, %o0 1: be 1f andcc %g1, 1, %g0 - EX(lduh [%o1], %g2, and %g1, 3,#) + EX(lduh [%o1], %g2, and %g1, 3) add %o1, 2, %o1 - EX(sth %g2, [%o0], and %g1, 3,#) + EX(sth %g2, [%o0], and %g1, 3) add %o0, 2, %o0 1: be 1f nop - EX(ldub [%o1], %g2, add %g0, 1,#) - EX(stb %g2, [%o0], add %g0, 1,#) + EX(ldub [%o1], %g2, add %g0, 1) + EX(stb %g2, [%o0], add %g0, 1) 1: retl clr %o0 @@ -245,7 +248,7 @@ MOVE_BIGALIGNCHUNK(o1, o0, 0x40, o2, o3, o4, o5, g2, g3, g4, g5) MOVE_BIGALIGNCHUNK(o1, o0, 0x60, o2, o3, o4, o5, g2, g3, g4, g5) 81: - EXT(ldd_std, 81b, 52f,#) + EXT(ldd_std, 81b, 52f) subcc %g7, 128, %g7 add %o1, 128, %o1 bne ldd_std @@ -274,9 +277,9 @@ be 10f nop - EXO2(ldub [%o1], %g2,#) + EXO2(ldub [%o1], %g2) add %o1, 1, %o1 - EXO2(stb %g2, [%o0],#) + EXO2(stb %g2, [%o0]) sub %o2, 1, %o2 andcc %o2, 0xfffffff0, %o3 be short_end @@ -285,7 +288,7 @@ MOVE_HALFCHUNK(o1, o0, 0x00, g2, g3, g4, g5) MOVE_HALFCHUNK(o1, o0, 0x08, g2, g3, g4, g5) 82: - EXT(10b, 82b, 53f,#) + EXT(10b, 82b, 53f) subcc %o3, 0x10, %o3 add %o1, 0x10, %o1 bne 10b @@ -303,7 +306,7 @@ MOVE_SHORTCHUNK(o1, o0, -0x0e, g2, g3) MOVE_SHORTCHUNK(o1, o0, -0x10, g2, g3) 83: - EXT(byte_chunk, 83b, 54f,#) + EXT(byte_chunk, 83b, 54f) subcc %o3, 0x10, %o3 add %o1, 0x10, %o1 bne byte_chunk @@ -328,11 +331,11 @@ MOVE_SHORTCHUNK(o1, o0, 0x02, g2, g3) MOVE_SHORTCHUNK(o1, o0, 0x00, g2, g3) short_table_end: - EXT(84b, short_table_end, 55f,#) + EXT(84b, short_table_end, 55f) be 1f nop - EX(ldub [%o1], %g2, add %g0, 1,#) - EX(stb %g2, [%o0], add %g0, 1,#) + EX(ldub [%o1], %g2, add %g0, 1) + EX(stb %g2, [%o0], add %g0, 1) 1: retl clr %o0 @@ -344,11 +347,11 @@ be 1f andcc %o2, 4, %g0 - EXO2(ld [%o1 + 0x00], %g2,#) - EXO2(ld [%o1 + 0x04], %g3,#) + EXO2(ld [%o1 + 0x00], %g2) + EXO2(ld [%o1 + 0x04], %g3) add %o1, 8, %o1 - EXO2(st %g2, [%o0 + 0x00],#) - EX(st %g3, [%o0 + 0x04], sub %o2, 4,#) + EXO2(st %g2, [%o0 + 0x00]) + EX(st %g3, [%o0 + 0x04], sub %o2, 4) add %o0, 8, %o0 1: b copy_user_last7 diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sparc/lib/memset.S linux-2.4.23-pre8/arch/sparc/lib/memset.S --- linux-2.4.22/arch/sparc/lib/memset.S 2001-04-12 19:10:25.000000000 +0000 +++ linux-2.4.23-pre8/arch/sparc/lib/memset.S 2003-10-22 22:47:59.000000000 +0000 @@ -10,20 +10,23 @@ #include #include -#define EX(x,y,a,b,z) \ +/* Work around cpp -rob */ +#define ALLOC #alloc +#define EXECINSTR #execinstr +#define EX(x,y,a,b) \ 98: x,y; \ - .section .fixup,z##alloc,z##execinstr; \ + .section .fixup,ALLOC,EXECINSTR; \ .align 4; \ 99: ba 30f; \ a, b, %o0; \ - .section __ex_table,z##alloc; \ + .section __ex_table,ALLOC; \ .align 4; \ .word 98b, 99b; \ .text; \ .align 4 -#define EXT(start,end,handler,z) \ - .section __ex_table,z##alloc; \ +#define EXT(start,end,handler) \ + .section __ex_table,ALLOC; \ .align 4; \ .word start, 0, end, handler; \ .text; \ @@ -74,13 +77,13 @@ 3: cmp %o2, 3 be 2f - EX(stb %g3, [%o0], sub %o1, 0,#) + EX(stb %g3, [%o0], sub %o1, 0) cmp %o2, 2 be 2f - EX(stb %g3, [%o0 + 0x01], sub %o1, 1,#) + EX(stb %g3, [%o0 + 0x01], sub %o1, 1) - EX(stb %g3, [%o0 + 0x02], sub %o1, 2,#) + EX(stb %g3, [%o0 + 0x02], sub %o1, 2) 2: sub %o2, 4, %o2 add %o1, %o2, %o1 @@ -101,7 +104,7 @@ be 2f mov %g3, %g2 - EX(st %g3, [%o0], sub %o1, 0,#) + EX(st %g3, [%o0], sub %o1, 0) sub %o1, 4, %o1 add %o0, 4, %o0 2: @@ -113,7 +116,7 @@ subcc %o3, 128, %o3 ZERO_BIG_BLOCK(%o0, 0x40, %g2) 11: - EXT(10b, 11b, 20f,#) + EXT(10b, 11b, 20f) bne 10b add %o0, 128, %o0 @@ -138,17 +141,17 @@ be 1f andcc %o1, 2, %g0 - EX(st %g3, [%o0], and %o1, 7,#) + EX(st %g3, [%o0], and %o1, 7) add %o0, 4, %o0 1: be 1f andcc %o1, 1, %g0 - EX(sth %g3, [%o0], and %o1, 3,#) + EX(sth %g3, [%o0], and %o1, 3) add %o0, 2, %o0 1: bne,a 8f - EX(stb %g3, [%o0], and %o1, 1,#) + EX(stb %g3, [%o0], and %o1, 1) 8: retl clr %o0 @@ -161,7 +164,7 @@ add %o0, 1, %o0 subcc %o1, 1, %o1 bne,a 8b - EX(stb %g3, [%o0 - 1], add %o1, 1,#) + EX(stb %g3, [%o0 - 1], add %o1, 1) 0: retl clr %o0 diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sparc/math-emu/sfp-util.h linux-2.4.23-pre8/arch/sparc/math-emu/sfp-util.h --- linux-2.4.22/arch/sparc/math-emu/sfp-util.h 1999-05-29 18:09:04.000000000 +0000 +++ linux-2.4.23-pre8/arch/sparc/math-emu/sfp-util.h 2003-10-22 22:49:53.000000000 +0000 @@ -4,8 +4,8 @@ #include #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ - __asm__ ("addcc %r4,%5,%1 - addx %r2,%3,%0" \ + __asm__ ("addcc %r4,%5,%1\n\t" \ + "addx %r2,%3,%0\n" \ : "=r" ((USItype)(sh)), \ "=&r" ((USItype)(sl)) \ : "%rJ" ((USItype)(ah)), \ @@ -14,8 +14,8 @@ "rI" ((USItype)(bl)) \ : "cc") #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ - __asm__ ("subcc %r4,%5,%1 - subx %r2,%3,%0" \ + __asm__ ("subcc %r4,%5,%1\n\t" \ + "subx %r2,%3,%0\n" \ : "=r" ((USItype)(sh)), \ "=&r" ((USItype)(sl)) \ : "rJ" ((USItype)(ah)), \ @@ -25,46 +25,46 @@ : "cc") #define umul_ppmm(w1, w0, u, v) \ - __asm__ ("! Inlined umul_ppmm - wr %%g0,%2,%%y ! SPARC has 0-3 delay insn after a wr - sra %3,31,%%g2 ! Don't move this insn - and %2,%%g2,%%g2 ! Don't move this insn - andcc %%g0,0,%%g1 ! Don't move this insn - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,0,%%g1 - add %%g1,%%g2,%0 - rd %%y,%1" \ + __asm__ ("! Inlined umul_ppmm\n\t" \ + "wr %%g0,%2,%%y ! SPARC has 0-3 delay insn after a wr\n\t" \ + "sra %3,31,%%g2 ! Don't move this insn\n\t" \ + "and %2,%%g2,%%g2 ! Don't move this insn\n\t" \ + "andcc %%g0,0,%%g1 ! Don't move this insn\n\t" \ + "mulscc %%g1,%3,%%g1\n\t" \ + "mulscc %%g1,%3,%%g1\n\t" \ + "mulscc %%g1,%3,%%g1\n\t" \ + "mulscc %%g1,%3,%%g1\n\t" \ + "mulscc %%g1,%3,%%g1\n\t" \ + "mulscc %%g1,%3,%%g1\n\t" \ + "mulscc %%g1,%3,%%g1\n\t" \ + "mulscc %%g1,%3,%%g1\n\t" \ + "mulscc %%g1,%3,%%g1\n\t" \ + "mulscc %%g1,%3,%%g1\n\t" \ + "mulscc %%g1,%3,%%g1\n\t" \ + "mulscc %%g1,%3,%%g1\n\t" \ + "mulscc %%g1,%3,%%g1\n\t" \ + "mulscc %%g1,%3,%%g1\n\t" \ + "mulscc %%g1,%3,%%g1\n\t" \ + "mulscc %%g1,%3,%%g1\n\t" \ + "mulscc %%g1,%3,%%g1\n\t" \ + "mulscc %%g1,%3,%%g1\n\t" \ + "mulscc %%g1,%3,%%g1\n\t" \ + "mulscc %%g1,%3,%%g1\n\t" \ + "mulscc %%g1,%3,%%g1\n\t" \ + "mulscc %%g1,%3,%%g1\n\t" \ + "mulscc %%g1,%3,%%g1\n\t" \ + "mulscc %%g1,%3,%%g1\n\t" \ + "mulscc %%g1,%3,%%g1\n\t" \ + "mulscc %%g1,%3,%%g1\n\t" \ + "mulscc %%g1,%3,%%g1\n\t" \ + "mulscc %%g1,%3,%%g1\n\t" \ + "mulscc %%g1,%3,%%g1\n\t" \ + "mulscc %%g1,%3,%%g1\n\t" \ + "mulscc %%g1,%3,%%g1\n\t" \ + "mulscc %%g1,%3,%%g1\n\t" \ + "mulscc %%g1,0,%%g1\n\t" \ + "add %%g1,%%g2,%0\n\t" \ + "rd %%y,%1\n" \ : "=r" ((USItype)(w1)), \ "=r" ((USItype)(w0)) \ : "%rI" ((USItype)(u)), \ @@ -74,30 +74,30 @@ /* It's quite necessary to add this much assembler for the sparc. The default udiv_qrnnd (in C) is more than 10 times slower! */ #define udiv_qrnnd(q, r, n1, n0, d) \ - __asm__ ("! Inlined udiv_qrnnd - mov 32,%%g1 - subcc %1,%2,%%g0 -1: bcs 5f - addxcc %0,%0,%0 ! shift n1n0 and a q-bit in lsb - sub %1,%2,%1 ! this kills msb of n - addx %1,%1,%1 ! so this can't give carry - subcc %%g1,1,%%g1 -2: bne 1b - subcc %1,%2,%%g0 - bcs 3f - addxcc %0,%0,%0 ! shift n1n0 and a q-bit in lsb - b 3f - sub %1,%2,%1 ! this kills msb of n -4: sub %1,%2,%1 -5: addxcc %1,%1,%1 - bcc 2b - subcc %%g1,1,%%g1 -! Got carry from n. Subtract next step to cancel this carry. - bne 4b - addcc %0,%0,%0 ! shift n1n0 and a 0-bit in lsb - sub %1,%2,%1 -3: xnor %0,0,%0 - ! End of inline udiv_qrnnd" \ + __asm__ ("! Inlined udiv_qrnnd\n\t" \ + "mov 32,%%g1\n\t" \ + "subcc %1,%2,%%g0\n\t" \ + "1: bcs 5f\n\t" \ + "addxcc %0,%0,%0 ! shift n1n0 and a q-bit in lsb\n\t" \ + "sub %1,%2,%1 ! this kills msb of n\n\t" \ + "addx %1,%1,%1 ! so this can't give carry\n\t" \ + "subcc %%g1,1,%%g1\n\t" \ + "2: bne 1b\n\t" \ + "subcc %1,%2,%%g0\n\t" \ + "bcs 3f\n\t" \ + "addxcc %0,%0,%0 ! shift n1n0 and a q-bit in lsb\n\t" \ + "b 3f\n\t" \ + "sub %1,%2,%1 ! this kills msb of n\n\t" \ + "4: sub %1,%2,%1\n\t" \ + "5: addxcc %1,%1,%1\n\t" \ + "bcc 2b\n\t" \ + "subcc %%g1,1,%%g1\n\t" \ + "! Got carry from n. Subtract next step to cancel this carry.\n\t" \ + "bne 4b\n\t" \ + "addcc %0,%0,%0 ! shift n1n0 and a 0-bit in lsb\n\t" \ + "sub %1,%2,%1\n\t" \ + "3: xnor %0,0,%0\n\t" \ + "! End of inline udiv_qrnnd\n" \ : "=&r" ((USItype)(q)), \ "=&r" ((USItype)(r)) \ : "r" ((USItype)(d)), \ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sparc/mm/srmmu.c linux-2.4.23-pre8/arch/sparc/mm/srmmu.c --- linux-2.4.22/arch/sparc/mm/srmmu.c 2003-06-13 14:51:32.000000000 +0000 +++ linux-2.4.23-pre8/arch/sparc/mm/srmmu.c 2003-10-22 22:49:03.000000000 +0000 @@ -126,6 +126,9 @@ #define SRMMU_NOCACHE_BITMAP_SHIFT (PAGE_SHIFT - 4) +/* The context table is a nocache user with the biggest alignment needs. */ +#define SRMMU_NOCACHE_ALIGN_MAX (sizeof(ctxd_t)*SRMMU_MAX_CONTEXTS) + void *srmmu_nocache_pool; void *srmmu_nocache_bitmap; int srmmu_nocache_low; @@ -260,6 +263,7 @@ /* we align on physical address */ if (align) { + BUG_ON(align > SRMMU_NOCACHE_ALIGN_MAX); va_tmp = (SRMMU_NOCACHE_VADDR + (offset << SRMMU_NOCACHE_BITMAP_SHIFT)); phys_tmp = (__nocache_pa(va_tmp) + align - 1) & ~(align - 1); va_tmp = (unsigned long)__nocache_va(phys_tmp); @@ -367,7 +371,8 @@ unsigned long paddr, vaddr; unsigned long pteval; - srmmu_nocache_pool = __alloc_bootmem(srmmu_nocache_size, PAGE_SIZE, 0UL); + srmmu_nocache_pool = __alloc_bootmem(srmmu_nocache_size, + SRMMU_NOCACHE_ALIGN_MAX, 0UL); memset(srmmu_nocache_pool, 0, srmmu_nocache_size); srmmu_nocache_bitmap = __alloc_bootmem(srmmu_nocache_bitmap_size, SMP_CACHE_BYTES, 0UL); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sparc64/config.in linux-2.4.23-pre8/arch/sparc64/config.in --- linux-2.4.22/arch/sparc64/config.in 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/sparc64/config.in 2003-10-22 22:48:22.000000000 +0000 @@ -28,6 +28,10 @@ bool 'Symmetric multi-processing support' CONFIG_SMP +if [ "$CONFIG_SMP" = "y" ]; then + int 'Maximum number of CPUs (2-32)' CONFIG_NR_CPUS 32 +fi + # Identify this as a Sparc64 build define_bool CONFIG_SPARC64 y @@ -307,6 +311,8 @@ define_bool CONFIG_MCOUNT y fi +int 'Kernel messages buffer length shift (0 = default)' CONFIG_LOG_BUF_SHIFT 0 + endmenu source crypto/Config.in diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sparc64/defconfig linux-2.4.23-pre8/arch/sparc64/defconfig --- linux-2.4.22/arch/sparc64/defconfig 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/sparc64/defconfig 2003-10-22 22:48:26.000000000 +0000 @@ -21,6 +21,7 @@ CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_SMP=y +CONFIG_NR_CPUS=32 CONFIG_SPARC64=y CONFIG_HOTPLUG=y CONFIG_HAVE_DEC_LOCK=y @@ -254,6 +255,32 @@ CONFIG_IP_NF_NAT_NEEDED=y CONFIG_IP_NF_COMPAT_IPFWADM=m CONFIG_IP_NF_NAT_NEEDED=y + +# +# IP: Virtual Server Configuration +# +CONFIG_IP_VS=m +# CONFIG_IP_VS_DEBUG is not set +CONFIG_IP_VS_TAB_BITS=12 + +# +# IPVS scheduler +# +CONFIG_IP_VS_RR=m +CONFIG_IP_VS_WRR=m +CONFIG_IP_VS_LC=m +CONFIG_IP_VS_WLC=m +CONFIG_IP_VS_LBLC=m +CONFIG_IP_VS_LBLCR=m +CONFIG_IP_VS_DH=m +CONFIG_IP_VS_SH=m +CONFIG_IP_VS_SED=m +CONFIG_IP_VS_NQ=m + +# +# IPVS application helper +# +CONFIG_IP_VS_FTP=m CONFIG_IPV6=m # @@ -279,6 +306,15 @@ CONFIG_IP6_NF_MANGLE=m CONFIG_IP6_NF_TARGET_MARK=m # CONFIG_KHTTPD is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +CONFIG_IPV6_SCTP__=m +CONFIG_IP_SCTP=m +# CONFIG_SCTP_ADLER32 is not set +# CONFIG_SCTP_DBG_MSG is not set +# CONFIG_SCTP_DBG_OBJCNT is not set # CONFIG_ATM is not set CONFIG_VLAN_8021Q=m @@ -565,6 +601,7 @@ # CONFIG_AMD8111_ETH is not set CONFIG_ADAPTEC_STARFIRE=m # CONFIG_APRICOT is not set +CONFIG_B44=m # CONFIG_CS89x0 is not set CONFIG_TULIP=m # CONFIG_TULIP_MWI is not set @@ -592,7 +629,6 @@ CONFIG_SUNDANCE=m CONFIG_SUNDANCE_MMIO=y # CONFIG_TLAN is not set -# CONFIG_TC35815 is not set CONFIG_VIA_RHINE=m # CONFIG_VIA_RHINE_MMIO is not set CONFIG_WINBOND_840=m @@ -844,6 +880,8 @@ # CONFIG_MIDI_VIA82CXXX is not set # CONFIG_SOUND_OSS is not set # CONFIG_SOUND_TVMIXER is not set +CONFIG_SOUND_AD1980=m +CONFIG_SOUND_WM97XX=m # # USB support @@ -983,7 +1021,17 @@ CONFIG_USB_TIGL=m # CONFIG_USB_BRLVGER is not set CONFIG_USB_LCD=m -# CONFIG_USB_SPEEDTOUCH is not set + +# +# Support for USB gadgets +# +CONFIG_USB_GADGET=y + +# +# USB Peripheral Controller Drivers +# +# CONFIG_USB_NET2280 is not set +# CONFIG_USB_GADGET_CONTROLLER is not set # # Bluetooth support @@ -996,7 +1044,6 @@ CONFIG_BLUEZ_BNEP=m CONFIG_BLUEZ_BNEP_MC_FILTER=y CONFIG_BLUEZ_BNEP_PROTO_FILTER=y -CONFIG_BLUEZ_CMTP=m # # Bluetooth device drivers @@ -1008,6 +1055,7 @@ CONFIG_BLUEZ_HCIUART_H4=y CONFIG_BLUEZ_HCIUART_BCSP=y CONFIG_BLUEZ_HCIUART_BCSP_TXCRC=y +CONFIG_BLUEZ_HCIBFUSB=m # CONFIG_BLUEZ_HCIDTL1 is not set # CONFIG_BLUEZ_HCIBT3C is not set # CONFIG_BLUEZ_HCIBLUECARD is not set @@ -1029,6 +1077,7 @@ # CONFIG_DEBUG_BUGVERBOSE is not set # CONFIG_DEBUG_DCFLUSH is not set # CONFIG_STACK_DEBUG is not set +CONFIG_LOG_BUF_SHIFT=0 # # Cryptographic options @@ -1046,6 +1095,7 @@ CONFIG_CRYPTO_TWOFISH=m CONFIG_CRYPTO_SERPENT=m CONFIG_CRYPTO_AES=m +CONFIG_CRYPTO_CAST5=m CONFIG_CRYPTO_DEFLATE=y # CONFIG_CRYPTO_TEST is not set @@ -1055,3 +1105,4 @@ CONFIG_CRC32=y CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y +CONFIG_FW_LOADER=m diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sparc64/kernel/Makefile linux-2.4.23-pre8/arch/sparc64/kernel/Makefile --- linux-2.4.22/arch/sparc64/kernel/Makefile 2003-06-13 14:51:32.000000000 +0000 +++ linux-2.4.23-pre8/arch/sparc64/kernel/Makefile 2003-10-22 22:47:59.000000000 +0000 @@ -58,50 +58,11 @@ @echo >> asm_offsets.h @echo "#include " >> asm_offsets.h @echo >> asm_offsets.h - @echo "#ifndef CONFIG_SMP" >> asm_offsets.h - @echo >> asm_offsets.h - @echo "#include " > tmp.c - @echo "#undef CONFIG_SMP" >> tmp.c - @echo "#include " >> tmp.c - $(CPP) $(CPPFLAGS) -P tmp.c -o tmp.i - @echo "/* Automatically generated. Do not edit. */" > check_asm_data.c - @echo "#include " >> check_asm_data.c - @echo "#undef CONFIG_SMP" >> check_asm_data.c - @echo "#include " >> check_asm_data.c - @echo 'unsigned int check_asm_data[] = {' >> check_asm_data.c - $(SH) ./check_asm.sh -data task tmp.i check_asm_data.c - $(SH) ./check_asm.sh -data mm tmp.i check_asm_data.c - $(SH) ./check_asm.sh -data thread tmp.i check_asm_data.c - @echo '};' >> check_asm_data.c - $(CC) $(CPPFLAGS) $(CMODEL_CFLAG) -ffixed-g4 -S -o check_asm_data.s check_asm_data.c - @echo "/* Automatically generated. Do not edit. */" > check_asm.c - @echo 'extern int printf(const char *fmt, ...);' >>check_asm.c - @echo 'unsigned int check_asm_data[] = {' >> check_asm.c - $(SH) ./check_asm.sh -ints check_asm_data.s check_asm.c - @echo '};' >> check_asm.c - @echo 'int main(void) {' >> check_asm.c - @echo 'int i = 0;' >> check_asm.c - $(SH) ./check_asm.sh -printf task tmp.i check_asm.c - $(SH) ./check_asm.sh -printf mm tmp.i check_asm.c - $(SH) ./check_asm.sh -printf thread tmp.i check_asm.c - @echo 'return 0; }' >> check_asm.c - @rm -f tmp.[ci] check_asm_data.[cs] - $(HOSTCC) -o check_asm check_asm.c - ./check_asm >> asm_offsets.h - @rm -f check_asm check_asm.c - @echo >> asm_offsets.h - @echo "#else /* CONFIG_SMP */" >> asm_offsets.h - @echo "#ifndef CONFIG_DEBUG_SPINLOCK" >>asm_offsets.h - @echo >> asm_offsets.h @echo "#include " > tmp.c - @echo "#undef CONFIG_SMP" >> tmp.c - @echo "#define CONFIG_SMP 1" >> tmp.c @echo "#include " >> tmp.c $(CPP) $(CPPFLAGS) -P tmp.c -o tmp.i @echo "/* Automatically generated. Do not edit. */" > check_asm_data.c @echo "#include " >> check_asm_data.c - @echo "#undef CONFIG_SMP" >> check_asm_data.c - @echo "#define CONFIG_SMP 1" >> check_asm_data.c @echo "#include " >> check_asm_data.c @echo 'unsigned int check_asm_data[] = {' >> check_asm_data.c $(SH) ./check_asm.sh -data task tmp.i check_asm_data.c @@ -125,40 +86,6 @@ ./check_asm >> asm_offsets.h @rm -f check_asm check_asm.c @echo >> asm_offsets.h - @echo "#else /* CONFIG_DEBUG_SPINLOCK */" >> asm_offsets.h - @echo >> asm_offsets.h - @echo "#include " > tmp.c - $(CPP) $(CPPFLAGS) -P -DCONFIG_DEBUG_SPINLOCK tmp.c -o tmp.i - @echo "/* Automatically generated. Do not edit. */" > check_asm_data.c - @echo "#include " >> check_asm_data.c - @echo "#undef CONFIG_SMP" >> check_asm_data.c - @echo "#define CONFIG_SMP 1" >> check_asm_data.c - @echo "#include " >> check_asm_data.c - @echo 'unsigned int check_asm_data[] = {' >> check_asm_data.c - $(SH) ./check_asm.sh -data task tmp.i check_asm_data.c - $(SH) ./check_asm.sh -data mm tmp.i check_asm_data.c - $(SH) ./check_asm.sh -data thread tmp.i check_asm_data.c - @echo '};' >> check_asm_data.c - $(CC) $(CPPFLAGS) -DCONFIG_DEBUG_SPINLOCK $(CMODEL_CFLAG) -ffixed-g4 -S -o check_asm_data.s check_asm_data.c - @echo "/* Automatically generated. Do not edit. */" > check_asm.c - @echo 'extern int printf(const char *fmt, ...);' >>check_asm.c - @echo 'unsigned int check_asm_data[] = {' >> check_asm.c - $(SH) ./check_asm.sh -ints check_asm_data.s check_asm.c - @echo '};' >> check_asm.c - @echo 'int main(void) {' >> check_asm.c - @echo 'int i = 0;' >> check_asm.c - $(SH) ./check_asm.sh -printf task tmp.i check_asm.c - $(SH) ./check_asm.sh -printf mm tmp.i check_asm.c - $(SH) ./check_asm.sh -printf thread tmp.i check_asm.c - @echo 'return 0; }' >> check_asm.c - @rm -f tmp.[ci] check_asm_data.[cs] - $(HOSTCC) -o check_asm check_asm.c - ./check_asm >> asm_offsets.h - @rm -f check_asm check_asm.c - @echo "#endif /* CONFIG_DEBUG_SPINLOCK */" >> asm_offsets.h - @echo >> asm_offsets.h - @echo "#endif /* CONFIG_SMP */" >> asm_offsets.h - @echo >> asm_offsets.h @echo "#endif /* __ASM_OFFSETS_H__ */" >> asm_offsets.h @if test -r $(HPATH)/asm/asm_offsets.h; then \ if cmp -s asm_offsets.h $(HPATH)/asm/asm_offsets.h; then \ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sparc64/kernel/cpu.c linux-2.4.23-pre8/arch/sparc64/kernel/cpu.c --- linux-2.4.22/arch/sparc64/kernel/cpu.c 2002-11-28 23:53:12.000000000 +0000 +++ linux-2.4.23-pre8/arch/sparc64/kernel/cpu.c 2003-10-22 22:49:30.000000000 +0000 @@ -37,6 +37,7 @@ { 0x17, 0x13, 0, "UltraSparc IIe integrated FPU"}, { 0x3e, 0x14, 0, "UltraSparc III integrated FPU"}, { 0x3e, 0x15, 0, "UltraSparc III+ integrated FPU"}, + { 0x3e, 0x16, 0, "UltraSparc IIIi integrated FPU"}, }; #define NSPARCFPU (sizeof(linux_sparc_fpu)/sizeof(struct cpu_fp_info)) @@ -45,31 +46,25 @@ { 0x17, 0x10, "TI UltraSparc I (SpitFire)"}, { 0x22, 0x10, "TI UltraSparc I (SpitFire)"}, { 0x17, 0x11, "TI UltraSparc II (BlackBird)"}, - { 0x17, 0x12, "TI UltraSparc IIi"}, - { 0x17, 0x13, "TI UltraSparc IIe"}, + { 0x17, 0x12, "TI UltraSparc IIi (Sabre)"}, + { 0x17, 0x13, "TI UltraSparc IIe (Hummingbird)"}, { 0x3e, 0x14, "TI UltraSparc III (Cheetah)"}, { 0x3e, 0x15, "TI UltraSparc III+ (Cheetah+)"}, + { 0x3e, 0x16, "TI UltraSparc IIIi (Jalapeno)"}, }; #define NSPARCCHIPS (sizeof(linux_sparc_chips)/sizeof(struct cpu_iu_info)) -#ifdef CONFIG_SMP -char *sparc_cpu_type[64] = { "cpu-oops", "cpu-oops1", "cpu-oops2", "cpu-oops3" }; -char *sparc_fpu_type[64] = { "fpu-oops", "fpu-oops1", "fpu-oops2", "fpu-oops3" }; -#else -char *sparc_cpu_type[64] = { "cpu-oops", }; -char *sparc_fpu_type[64] = { "fpu-oops", }; -#endif +char *sparc_cpu_type = "cpu-oops"; +char *sparc_fpu_type = "fpu-oops"; unsigned int fsr_storage; void __init cpu_probe(void) { unsigned long ver, fpu_vers, manuf, impl, fprs; - int i, cpuid; + int i; - cpuid = hard_smp_processor_id(); - fprs = fprs_read(); fprs_write(FPRS_FEF); __asm__ __volatile__ ("rdpr %%ver, %0; stx %%fsr, [%1]" @@ -86,7 +81,7 @@ for (i = 0; i < NSPARCCHIPS; i++) { if (linux_sparc_chips[i].manuf == manuf) { if (linux_sparc_chips[i].impl == impl) { - sparc_cpu_type[cpuid] + sparc_cpu_type = linux_sparc_chips[i].cpu_name; break; } @@ -105,14 +100,14 @@ printk("DEBUG: manuf[%lx] impl[%lx]\n", manuf, impl); } - sparc_cpu_type[cpuid] = "Unknown CPU"; + sparc_cpu_type = "Unknown CPU"; } for (i = 0; i < NSPARCFPU; i++) { if (linux_sparc_fpu[i].manuf == manuf && linux_sparc_fpu[i].impl == impl) { if (linux_sparc_fpu[i].fpu_vers == fpu_vers) { - sparc_fpu_type[cpuid] + sparc_fpu_type = linux_sparc_fpu[i].fp_name; break; } @@ -122,6 +117,6 @@ if (i == NSPARCFPU) { printk("DEBUG: manuf[%lx] impl[%lx] fsr.vers[%lx]\n", manuf, impl, fpu_vers); - sparc_fpu_type[cpuid] = "Unknown FPU"; + sparc_fpu_type = "Unknown FPU"; } } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sparc64/kernel/entry.S linux-2.4.23-pre8/arch/sparc64/kernel/entry.S --- linux-2.4.22/arch/sparc64/kernel/entry.S 2003-06-13 14:51:32.000000000 +0000 +++ linux-2.4.23-pre8/arch/sparc64/kernel/entry.S 2003-10-22 22:47:27.000000000 +0000 @@ -911,10 +911,15 @@ sllx %g1, 63, %g2; \ or %g4, %g2, %g4; \ /* Get log entry pointer for this cpu at this trap level. */ \ + BRANCH_IF_JALAPENO(g2,g3,50f) \ ldxa [%g0] ASI_SAFARI_CONFIG, %g2; \ srlx %g2, 17, %g2; \ - and %g2, 0x3ff, %g2; \ - sllx %g2, 9, %g2; \ + ba,pt %xcc, 60f; \ + and %g2, 0x3ff, %g2; \ +50: ldxa [%g0] ASI_JBUS_CONFIG, %g2; \ + srlx %g2, 17, %g2; \ + and %g2, 0x1f, %g2; \ +60: sllx %g2, 9, %g2; \ sethi %hi(cheetah_error_log), %g3; \ ldx [%g3 + %lo(cheetah_error_log)], %g3; \ brz,pn %g3, 80f; \ @@ -1749,8 +1754,8 @@ cmp %o0, -ENOIOCTLCMD sllx %g2, 32, %g2 bgeu,pn %xcc, 1f - andcc %l0, 0x02, %l6 +80: andn %g3, %g2, %g3 /* System call success, clear Carry condition code. */ stx %g3, [%sp + PTREGS_OFF + PT_V9_TSTATE] bne,pn %icc, linux_syscall_trace2 @@ -1760,9 +1765,21 @@ stx %l2, [%sp + PTREGS_OFF + PT_V9_TNPC] 1: + /* Really a failure? Check if force_successful_syscall_return() + * was invoked. + */ + ldx [%curptr + AOFF_task_thread + AOFF_thread_flags], %l0 + andcc %l0, SPARC_FLAG_SYS_SUCCESS, %g0 + be,pt %icc, 1f + andcc %l6, 0x02, %g0 + andn %l0, SPARC_FLAG_SYS_SUCCESS, %l0 + ba,pt %xcc, 80b + stx %l0, [%curptr + AOFF_task_thread + AOFF_thread_flags] + /* System call failure, set Carry condition code. * Also, get abs(errno) to return to the process. */ +1: sub %g0, %o0, %o0 or %g3, %g2, %g3 stx %o0, [%sp + PTREGS_OFF + PT_V9_I0] diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sparc64/kernel/head.S linux-2.4.23-pre8/arch/sparc64/kernel/head.S --- linux-2.4.22/arch/sparc64/kernel/head.S 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/sparc64/kernel/head.S 2003-10-22 22:48:31.000000000 +0000 @@ -647,11 +647,18 @@ nop not_starfire: + BRANCH_IF_JALAPENO(g1,g5,is_jalapeno) BRANCH_IF_ANY_CHEETAH(g1,g5,is_cheetah) ba,pt %xcc, not_cheetah nop +is_jalapeno: + ldxa [%g0] ASI_JBUS_CONFIG, %g1 + srlx %g1, 17, %g1 + ba,pt %xcc, set_worklist + and %g1, 0x1f, %g1 ! 5bit JBUS ID + is_cheetah: ldxa [%g0] ASI_SAFARI_CONFIG, %g1 srlx %g1, 17, %g1 diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sparc64/kernel/ioctl32.c linux-2.4.23-pre8/arch/sparc64/kernel/ioctl32.c --- linux-2.4.22/arch/sparc64/kernel/ioctl32.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/sparc64/kernel/ioctl32.c 2003-10-22 22:49:34.000000000 +0000 @@ -1920,8 +1920,8 @@ __cgc_do_ptr((void **) &cgc->sense, &cgc32->sense)) return -EFAULT; - if (get_user(dir, &cgc->data_direction) || - put_user(dir, &cgc32->data_direction)) + if (get_user(dir, &cgc32->data_direction) || + put_user(dir, &cgc->data_direction)) return -EFAULT; if (copy_in_user(&cgc->quiet, &cgc32->quiet, diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sparc64/kernel/irq.c linux-2.4.23-pre8/arch/sparc64/kernel/irq.c --- linux-2.4.22/arch/sparc64/kernel/irq.c 2003-06-13 14:51:32.000000000 +0000 +++ linux-2.4.23-pre8/arch/sparc64/kernel/irq.c 2003-10-22 22:48:32.000000000 +0000 @@ -148,12 +148,24 @@ return; if (tlb_type == cheetah || tlb_type == cheetah_plus) { - /* We set it to our Safari AID. */ - __asm__ __volatile__("ldxa [%%g0] %1, %0" - : "=r" (tid) - : "i" (ASI_SAFARI_CONFIG)); - tid = ((tid & (0x3ffUL<<17)) << 9); - tid &= IMAP_AID_SAFARI; + unsigned long ver; + + __asm__ ("rdpr %%ver, %0" : "=r" (ver)); + if ((ver >> 32) == 0x003e0016) { + /* We set it to our JBUS ID. */ + __asm__ __volatile__("ldxa [%%g0] %1, %0" + : "=r" (tid) + : "i" (ASI_JBUS_CONFIG)); + tid = ((tid & (0x1fUL<<17)) << 9); + tid &= IMAP_TID_JBUS; + } else { + /* We set it to our Safari AID. */ + __asm__ __volatile__("ldxa [%%g0] %1, %0" + : "=r" (tid) + : "i" (ASI_SAFARI_CONFIG)); + tid = ((tid & (0x3ffUL<<17)) << 9); + tid &= IMAP_AID_SAFARI; + } } else if (this_is_starfire == 0) { /* We set it to our UPA MID. */ __asm__ __volatile__("ldxa [%%g0] %1, %0" diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sparc64/kernel/isa.c linux-2.4.23-pre8/arch/sparc64/kernel/isa.c --- linux-2.4.22/arch/sparc64/kernel/isa.c 2001-11-13 17:16:05.000000000 +0000 +++ linux-2.4.23-pre8/arch/sparc64/kernel/isa.c 2003-10-22 22:48:24.000000000 +0000 @@ -20,22 +20,23 @@ printk(" [%s", isa_dev->prom_name); } -static void __init isa_dev_get_resource(struct isa_device *isa_dev) +static void __init isa_dev_get_resource(struct isa_device *isa_dev, + struct linux_prom_registers *pregs, + int pregs_size) { - struct linux_prom_registers regs[PROMREG_MAX]; unsigned long base, len; int prop_len; prop_len = prom_getproperty(isa_dev->prom_node, "reg", - (char *) regs, sizeof(regs)); + (char *) pregs, pregs_size); if (prop_len <= 0) return; /* Only the first one is interesting. */ - len = regs[0].reg_size; - base = (((unsigned long)regs[0].which_io << 32) | - (unsigned long)regs[0].phys_addr); + len = pregs[0].reg_size; + base = (((unsigned long)pregs[0].which_io << 32) | + (unsigned long)pregs[0].phys_addr); base += isa_dev->bus->parent->io_space.start; isa_dev->resource.start = base; @@ -53,6 +54,9 @@ * * The P1275 standard for ISA devices seems to also have been * totally ignored. + * + * On later systems, an interrupt-map and interrupt-map-mask scheme + * akin to EBUS is used. */ static struct { int obp_irq; @@ -67,33 +71,72 @@ { 0, 0x00 } /* end of table */ }; -static void __init isa_dev_get_irq(struct isa_device *isa_dev) +static int __init isa_dev_get_irq_using_imap(struct isa_device *isa_dev, + struct isa_bridge *isa_br, + int *interrupt, + struct linux_prom_registers *pregs) +{ + unsigned int hi, lo, irq; + int i; + + hi = pregs->which_io & isa_br->isa_intmask.phys_hi; + lo = pregs->phys_addr & isa_br->isa_intmask.phys_lo; + irq = *interrupt & isa_br->isa_intmask.interrupt; + for (i = 0; i < isa_br->num_isa_intmap; i++) { + if ((isa_br->isa_intmap[i].phys_hi == hi) && + (isa_br->isa_intmap[i].phys_lo == lo) && + (isa_br->isa_intmap[i].interrupt == irq)) { + *interrupt = isa_br->isa_intmap[i].cinterrupt; + return 0; + } + } + return -1; +} + +static void __init isa_dev_get_irq(struct isa_device *isa_dev, + struct linux_prom_registers *pregs) { int irq_prop; irq_prop = prom_getintdefault(isa_dev->prom_node, "interrupts", -1); if (irq_prop <= 0) { - isa_dev->irq = PCI_IRQ_NONE; + goto no_irq; } else { + struct pci_controller_info *pcic; + struct pci_pbm_info *pbm; int i; + if (isa_dev->bus->num_isa_intmap) { + if (!isa_dev_get_irq_using_imap(isa_dev, + isa_dev->bus, + &irq_prop, + pregs)) + goto route_irq; + } + for (i = 0; grover_irq_table[i].obp_irq != 0; i++) { if (grover_irq_table[i].obp_irq == irq_prop) { - struct pci_controller_info *pcic; - struct pci_pbm_info *pbm; int ino = grover_irq_table[i].pci_ino; - if (ino == 0) { - isa_dev->irq = PCI_IRQ_NONE; - } else { - pbm = isa_dev->bus->parent; - pcic = pbm->parent; - isa_dev->irq = pcic->irq_build(pbm, NULL, ino); - } + if (ino == 0) + goto no_irq; + + irq_prop = ino; + goto route_irq; } } + goto no_irq; + +route_irq: + pbm = isa_dev->bus->parent; + pcic = pbm->parent; + isa_dev->irq = pcic->irq_build(pbm, NULL, irq_prop); + return; } + +no_irq: + isa_dev->irq = PCI_IRQ_NONE; } static void __init isa_fill_children(struct isa_device *parent_isa_dev) @@ -105,6 +148,7 @@ printk(" ->"); while (node != 0) { + struct linux_prom_registers regs[PROMREG_MAX]; struct isa_device *isa_dev; int prop_len; @@ -138,8 +182,8 @@ if (prop_len <= 0) isa_dev->compatible[0] = '\0'; - isa_dev_get_resource(isa_dev); - isa_dev_get_irq(isa_dev); + isa_dev_get_resource(isa_dev, regs, sizeof(regs)); + isa_dev_get_irq(isa_dev, regs); report_dev(isa_dev, 1); @@ -152,6 +196,7 @@ int node = prom_getchild(isa_br->prom_node); while (node != 0) { + struct linux_prom_registers regs[PROMREG_MAX]; struct isa_device *isa_dev; int prop_len; @@ -194,8 +239,8 @@ if (prop_len <= 0) isa_dev->compatible[0] = '\0'; - isa_dev_get_resource(isa_dev); - isa_dev_get_irq(isa_dev); + isa_dev_get_resource(isa_dev, regs, sizeof(regs)); + isa_dev_get_irq(isa_dev, regs); report_dev(isa_dev, 0); @@ -260,6 +305,21 @@ isa_br->num_isa_ranges = (prop_len / sizeof(struct linux_prom_isa_ranges)); + prop_len = prom_getproperty(isa_br->prom_node, + "interrupt-map", + (char *) isa_br->isa_intmap, + sizeof(isa_br->isa_intmap)); + if (prop_len <= 0) + isa_br->num_isa_intmap = 0; + else + isa_br->num_isa_intmap = + (prop_len / sizeof(struct linux_prom_isa_intmap)); + + prop_len = prom_getproperty(isa_br->prom_node, + "interrupt-map-mask", + (char *) &(isa_br->isa_intmask), + sizeof(isa_br->isa_intmask)); + printk("isa%d:", isa_br->index); isa_fill_devices(isa_br); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sparc64/kernel/pci.c linux-2.4.23-pre8/arch/sparc64/kernel/pci.c --- linux-2.4.22/arch/sparc64/kernel/pci.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/sparc64/kernel/pci.c 2003-10-22 22:47:28.000000000 +0000 @@ -81,6 +81,8 @@ extern void sabre_init(int, char *); extern void psycho_init(int, char *); extern void schizo_init(int, char *); +extern void schizo_plus_init(int, char *); +extern void tomatillo_init(int, char *); static struct { char *model_name; @@ -92,7 +94,11 @@ { "SUNW,psycho", psycho_init }, { "pci108e,8000", psycho_init }, { "SUNW,schizo", schizo_init }, - { "pci108e,8001", schizo_init } + { "pci108e,8001", schizo_init }, + { "SUNW,schizo+", schizo_plus_init }, + { "pci108e,8002", schizo_plus_init }, + { "SUNW,tomatillo", tomatillo_init }, + { "pci108e,a801", tomatillo_init }, }; #define PCI_NUM_CONTROLLER_TYPES (sizeof(pci_controller_table) / \ sizeof(pci_controller_table[0])) diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sparc64/kernel/pci_common.c linux-2.4.23-pre8/arch/sparc64/kernel/pci_common.c --- linux-2.4.22/arch/sparc64/kernel/pci_common.c 2002-08-03 00:39:43.000000000 +0000 +++ linux-2.4.23-pre8/arch/sparc64/kernel/pci_common.c 2003-10-22 22:48:14.000000000 +0000 @@ -54,6 +54,7 @@ (pdev->vendor == PCI_VENDOR_ID_SUN) && (pdev->device == PCI_DEVICE_ID_SUN_PBM || pdev->device == PCI_DEVICE_ID_SUN_SCHIZO || + pdev->device == PCI_DEVICE_ID_SUN_TOMATILLO || pdev->device == PCI_DEVICE_ID_SUN_SABRE || pdev->device == PCI_DEVICE_ID_SUN_HUMMINGBIRD)) { *nregs = 0; @@ -699,7 +700,7 @@ struct pcidev_cookie *pcp = pdev->sysdata; struct pci_pbm_info *pbm = pcp->pbm; struct pci_controller_info *p = pbm->parent; - unsigned int portid = p->portid; + unsigned int portid = pbm->portid; unsigned int prom_irq; int prom_node = pcp->prom_node; int err; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sparc64/kernel/pci_iommu.c linux-2.4.23-pre8/arch/sparc64/kernel/pci_iommu.c --- linux-2.4.22/arch/sparc64/kernel/pci_iommu.c 2003-06-13 14:51:32.000000000 +0000 +++ linux-2.4.23-pre8/arch/sparc64/kernel/pci_iommu.c 2003-10-22 22:47:49.000000000 +0000 @@ -829,5 +829,8 @@ } } + if (device_mask >= (1UL << 32UL)) + return 0; + return (device_mask & dma_addr_mask) == dma_addr_mask; } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sparc64/kernel/pci_psycho.c linux-2.4.23-pre8/arch/sparc64/kernel/pci_psycho.c --- linux-2.4.22/arch/sparc64/kernel/pci_psycho.c 2002-08-03 00:39:43.000000000 +0000 +++ linux-2.4.23-pre8/arch/sparc64/kernel/pci_psycho.c 2003-10-22 22:49:03.000000000 +0000 @@ -388,7 +388,6 @@ struct pci_dev *pdev, unsigned int ino) { - struct pci_controller_info *p = pbm->parent; struct ino_bucket *bucket; unsigned long imap, iclr; unsigned long imap_off, iclr_off; @@ -413,11 +412,11 @@ if (PIL_RESERVED(pil)) BUG(); - imap = p->controller_regs + imap_off; + imap = pbm->controller_regs + imap_off; imap += 4; iclr_off = psycho_iclr_offset(ino); - iclr = p->controller_regs + iclr_off; + iclr = pbm->controller_regs + iclr_off; iclr += 4; if ((ino & 0x20) == 0) @@ -484,7 +483,7 @@ int is_pbm_a) { struct pci_strbuf *strbuf = &pbm->stc; - unsigned long regbase = p->controller_regs; + unsigned long regbase = p->pbm_A.controller_regs; unsigned long err_base, tag_base, line_base; u64 control; int i; @@ -679,7 +678,7 @@ psycho_write(iommu->iommu_control, control | PSYCHO_IOMMU_CTRL_DENAB); for (i = 0; i < 16; i++) { - unsigned long base = p->controller_regs; + unsigned long base = p->pbm_A.controller_regs; iommu_tag[i] = psycho_read(base + PSYCHO_IOMMU_TAG + (i * 8UL)); @@ -756,8 +755,8 @@ static void psycho_ue_intr(int irq, void *dev_id, struct pt_regs *regs) { struct pci_controller_info *p = dev_id; - unsigned long afsr_reg = p->controller_regs + PSYCHO_UE_AFSR; - unsigned long afar_reg = p->controller_regs + PSYCHO_UE_AFAR; + unsigned long afsr_reg = p->pbm_A.controller_regs + PSYCHO_UE_AFSR; + unsigned long afar_reg = p->pbm_A.controller_regs + PSYCHO_UE_AFAR; unsigned long afsr, afar, error_bits; int reported; @@ -831,8 +830,8 @@ static void psycho_ce_intr(int irq, void *dev_id, struct pt_regs *regs) { struct pci_controller_info *p = dev_id; - unsigned long afsr_reg = p->controller_regs + PSYCHO_CE_AFSR; - unsigned long afar_reg = p->controller_regs + PSYCHO_CE_AFAR; + unsigned long afsr_reg = p->pbm_A.controller_regs + PSYCHO_CE_AFSR; + unsigned long afar_reg = p->pbm_A.controller_regs + PSYCHO_CE_AFAR; unsigned long afsr, afar, error_bits; int reported; @@ -911,6 +910,42 @@ #define PSYCHO_PCI_AFAR_A 0x2018UL #define PSYCHO_PCI_AFAR_B 0x4018UL +static void psycho_pcierr_intr_other(struct pci_pbm_info *pbm, int is_pbm_a) +{ + unsigned long csr_reg, csr, csr_error_bits; + u16 stat; + + if (is_pbm_a) { + csr_reg = pbm->controller_regs + PSYCHO_PCIA_CTRL; + } else { + csr_reg = pbm->controller_regs + PSYCHO_PCIB_CTRL; + } + csr = psycho_read(csr_reg); + csr_error_bits = + csr & (PSYCHO_PCICTRL_SBH_ERR | PSYCHO_PCICTRL_SERR); + if (csr_error_bits) { + /* Clear the errors. */ + psycho_write(csr_reg, csr); + + /* Log 'em. */ + if (csr_error_bits & PSYCHO_PCICTRL_SBH_ERR) + printk("%s: PCI streaming byte hole error asserted.\n", + pbm->name); + if (csr_error_bits & PSYCHO_PCICTRL_SERR) + printk("%s: PCI SERR signal asserted.\n", pbm->name); + } + pci_read_config_word(pbm->pci_bus->self, PCI_STATUS, &stat); + if (stat & (PCI_STATUS_PARITY | + PCI_STATUS_SIG_TARGET_ABORT | + PCI_STATUS_REC_TARGET_ABORT | + PCI_STATUS_REC_MASTER_ABORT | + PCI_STATUS_SIG_SYSTEM_ERROR)) { + printk("%s: PCI bus error, PCI_STATUS[%04x]\n", + pbm->name, stat); + pci_write_config_word(pbm->pci_bus->self, PCI_STATUS, 0xffff); + } +} + static void psycho_pcierr_intr(int irq, void *dev_id, struct pt_regs *regs) { struct pci_pbm_info *pbm = dev_id; @@ -921,11 +956,11 @@ is_pbm_a = (pbm == &pbm->parent->pbm_A); if (is_pbm_a) { - afsr_reg = p->controller_regs + PSYCHO_PCI_AFSR_A; - afar_reg = p->controller_regs + PSYCHO_PCI_AFAR_A; + afsr_reg = p->pbm_A.controller_regs + PSYCHO_PCI_AFSR_A; + afar_reg = p->pbm_A.controller_regs + PSYCHO_PCI_AFAR_A; } else { - afsr_reg = p->controller_regs + PSYCHO_PCI_AFSR_B; - afar_reg = p->controller_regs + PSYCHO_PCI_AFAR_B; + afsr_reg = p->pbm_A.controller_regs + PSYCHO_PCI_AFSR_B; + afar_reg = p->pbm_A.controller_regs + PSYCHO_PCI_AFAR_B; } /* Latch error status. */ @@ -939,7 +974,7 @@ PSYCHO_PCIAFSR_SMA | PSYCHO_PCIAFSR_STA | PSYCHO_PCIAFSR_SRTRY | PSYCHO_PCIAFSR_SPERR); if (!error_bits) - return; + return psycho_pcierr_intr_other(pbm, is_pbm_a); psycho_write(afsr_reg, error_bits); /* Log the error. */ @@ -1022,8 +1057,8 @@ static void __init psycho_register_error_handlers(struct pci_controller_info *p) { struct pci_pbm_info *pbm = &p->pbm_A; /* arbitrary */ - unsigned long base = p->controller_regs; - unsigned int irq, portid = p->portid; + unsigned long base = p->pbm_A.controller_regs; + unsigned int irq, portid = pbm->portid; u64 tmp; /* Build IRQs and register handlers. */ @@ -1043,6 +1078,7 @@ prom_halt(); } + pbm = &p->pbm_A; irq = psycho_irq_build(pbm, NULL, (portid << 6) | PSYCHO_PCIERR_A_INO); if (request_irq(irq, psycho_pcierr_intr, SA_SHIRQ, "PSYCHO PCIERR", &p->pbm_A) < 0) { @@ -1051,6 +1087,7 @@ prom_halt(); } + pbm = &p->pbm_B; irq = psycho_irq_build(pbm, NULL, (portid << 6) | PSYCHO_PCIERR_B_INO); if (request_irq(irq, psycho_pcierr_intr, SA_SHIRQ, "PSYCHO PCIERR", &p->pbm_B) < 0) { @@ -1310,26 +1347,26 @@ iommu->iommu_cur_ctx = 0; /* Register addresses. */ - iommu->iommu_control = p->controller_regs + PSYCHO_IOMMU_CONTROL; - iommu->iommu_tsbbase = p->controller_regs + PSYCHO_IOMMU_TSBBASE; - iommu->iommu_flush = p->controller_regs + PSYCHO_IOMMU_FLUSH; + iommu->iommu_control = p->pbm_A.controller_regs + PSYCHO_IOMMU_CONTROL; + iommu->iommu_tsbbase = p->pbm_A.controller_regs + PSYCHO_IOMMU_TSBBASE; + iommu->iommu_flush = p->pbm_A.controller_regs + PSYCHO_IOMMU_FLUSH; /* PSYCHO's IOMMU lacks ctx flushing. */ iommu->iommu_ctxflush = 0; /* We use the main control register of PSYCHO as the write * completion register. */ - iommu->write_complete_reg = p->controller_regs + PSYCHO_CONTROL; + iommu->write_complete_reg = p->pbm_A.controller_regs + PSYCHO_CONTROL; /* * Invalidate TLB Entries. */ - control = psycho_read(p->controller_regs + PSYCHO_IOMMU_CONTROL); + control = psycho_read(p->pbm_A.controller_regs + PSYCHO_IOMMU_CONTROL); control |= PSYCHO_IOMMU_CTRL_DENAB; - psycho_write(p->controller_regs + PSYCHO_IOMMU_CONTROL, control); + psycho_write(p->pbm_A.controller_regs + PSYCHO_IOMMU_CONTROL, control); for(i = 0; i < 16; i++) { - psycho_write(p->controller_regs + PSYCHO_IOMMU_TAG + (i * 8UL), 0); - psycho_write(p->controller_regs + PSYCHO_IOMMU_DATA + (i * 8UL), 0); + psycho_write(p->pbm_A.controller_regs + PSYCHO_IOMMU_TAG + (i * 8UL), 0); + psycho_write(p->pbm_A.controller_regs + PSYCHO_IOMMU_DATA + (i * 8UL), 0); } /* Leave diag mode enabled for full-flushing done @@ -1360,16 +1397,16 @@ iommu->alloc_info[i].next = 0; } - psycho_write(p->controller_regs + PSYCHO_IOMMU_TSBBASE, __pa(tsbbase)); + psycho_write(p->pbm_A.controller_regs + PSYCHO_IOMMU_TSBBASE, __pa(tsbbase)); - control = psycho_read(p->controller_regs + PSYCHO_IOMMU_CONTROL); + control = psycho_read(p->pbm_A.controller_regs + PSYCHO_IOMMU_CONTROL); control &= ~(PSYCHO_IOMMU_CTRL_TSBSZ | PSYCHO_IOMMU_CTRL_TBWSZ); control |= (PSYCHO_IOMMU_TSBSZ_128K | PSYCHO_IOMMU_CTRL_ENAB); - psycho_write(p->controller_regs + PSYCHO_IOMMU_CONTROL, control); + psycho_write(p->pbm_A.controller_regs + PSYCHO_IOMMU_CONTROL, control); /* If necessary, hook us up for starfire IRQ translations. */ if(this_is_starfire) - p->starfire_cookie = starfire_hookup(p->portid); + p->starfire_cookie = starfire_hookup(p->pbm_A.portid); else p->starfire_cookie = NULL; } @@ -1391,28 +1428,28 @@ u64 tmp; /* PROM sets the IRQ retry value too low, increase it. */ - psycho_write(p->controller_regs + PSYCHO_IRQ_RETRY, 0xff); + psycho_write(p->pbm_A.controller_regs + PSYCHO_IRQ_RETRY, 0xff); /* Enable arbiter for all PCI slots. */ - tmp = psycho_read(p->controller_regs + PSYCHO_PCIA_CTRL); + tmp = psycho_read(p->pbm_A.controller_regs + PSYCHO_PCIA_CTRL); tmp |= PSYCHO_PCICTRL_AEN; - psycho_write(p->controller_regs + PSYCHO_PCIA_CTRL, tmp); + psycho_write(p->pbm_A.controller_regs + PSYCHO_PCIA_CTRL, tmp); - tmp = psycho_read(p->controller_regs + PSYCHO_PCIB_CTRL); + tmp = psycho_read(p->pbm_A.controller_regs + PSYCHO_PCIB_CTRL); tmp |= PSYCHO_PCICTRL_AEN; - psycho_write(p->controller_regs + PSYCHO_PCIB_CTRL, tmp); + psycho_write(p->pbm_A.controller_regs + PSYCHO_PCIB_CTRL, tmp); /* Disable DMA write / PIO read synchronization on * both PCI bus segments. * [ U2P Erratum 1243770, STP2223BGA data sheet ] */ - tmp = psycho_read(p->controller_regs + PSYCHO_PCIA_DIAG); + tmp = psycho_read(p->pbm_A.controller_regs + PSYCHO_PCIA_DIAG); tmp |= PSYCHO_PCIDIAG_DDWSYNC; - psycho_write(p->controller_regs + PSYCHO_PCIA_DIAG, tmp); + psycho_write(p->pbm_A.controller_regs + PSYCHO_PCIA_DIAG, tmp); - tmp = psycho_read(p->controller_regs + PSYCHO_PCIB_DIAG); + tmp = psycho_read(p->pbm_A.controller_regs + PSYCHO_PCIB_DIAG); tmp |= PSYCHO_PCIDIAG_DDWSYNC; - psycho_write(p->controller_regs + PSYCHO_PCIB_DIAG, tmp); + psycho_write(p->pbm_A.controller_regs + PSYCHO_PCIB_DIAG, tmp); } static void __init pbm_register_toplevel_resources(struct pci_controller_info *p, @@ -1435,7 +1472,7 @@ struct pci_pbm_info *pbm, int is_pbm_a) { - unsigned long base = p->controller_regs; + unsigned long base = pbm->controller_regs; u64 control; if (is_pbm_a) { @@ -1500,14 +1537,21 @@ if (is_pbm_a) { pbm = &p->pbm_A; pbm->pci_first_slot = 1; - pbm->io_space.start = p->controller_regs + PSYCHO_IOSPACE_A; - pbm->mem_space.start = p->controller_regs + PSYCHO_MEMSPACE_A; + pbm->io_space.start = pbm->controller_regs + PSYCHO_IOSPACE_A; + pbm->mem_space.start = pbm->controller_regs + PSYCHO_MEMSPACE_A; } else { pbm = &p->pbm_B; pbm->pci_first_slot = 2; - pbm->io_space.start = p->controller_regs + PSYCHO_IOSPACE_B; - pbm->mem_space.start = p->controller_regs + PSYCHO_MEMSPACE_B; + pbm->io_space.start = pbm->controller_regs + PSYCHO_IOSPACE_B; + pbm->mem_space.start = pbm->controller_regs + PSYCHO_MEMSPACE_B; } + + pbm->chip_type = PBM_CHIP_TYPE_PSYCHO; + pbm->chip_version = + prom_getintdefault(prom_node, "version#", 0); + pbm->chip_revision = + prom_getintdefault(prom_node, "module-revision#", 0); + pbm->io_space.end = pbm->io_space.start + PSYCHO_IOSPACE_SIZE; pbm->io_space.flags = IORESOURCE_IO; pbm->mem_space.end = pbm->mem_space.start + PSYCHO_MEMSPACE_SIZE; @@ -1575,7 +1619,7 @@ spin_lock_irqsave(&pci_controller_lock, flags); for(p = pci_controller_root; p; p = p->next) { - if (p->portid == upa_portid) { + if (p->pbm_A.portid == upa_portid) { spin_unlock_irqrestore(&pci_controller_lock, flags); is_pbm_a = (p->pbm_A.prom_node == 0); psycho_pbm_init(p, node, is_pbm_a); @@ -1603,7 +1647,8 @@ pci_controller_root = p; spin_unlock_irqrestore(&pci_controller_lock, flags); - p->portid = upa_portid; + p->pbm_A.portid = upa_portid; + p->pbm_B.portid = upa_portid; p->index = pci_num_controllers++; p->pbms_same_domain = 0; p->scan_bus = psycho_scan_bus; @@ -1620,9 +1665,10 @@ prom_halt(); } - p->controller_regs = pr_regs[2].phys_addr; + p->pbm_A.controller_regs = pr_regs[2].phys_addr; + p->pbm_B.controller_regs = pr_regs[2].phys_addr; printk("PCI: Found PSYCHO, control regs at %016lx\n", - p->controller_regs); + p->pbm_A.controller_regs); p->pbm_A.config_space = p->pbm_B.config_space = (pr_regs[2].phys_addr + PSYCHO_CONFIGSPACE); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sparc64/kernel/pci_sabre.c linux-2.4.23-pre8/arch/sparc64/kernel/pci_sabre.c --- linux-2.4.22/arch/sparc64/kernel/pci_sabre.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/sparc64/kernel/pci_sabre.c 2003-10-22 22:48:41.000000000 +0000 @@ -219,6 +219,7 @@ ((unsigned long)(REG))) static int hummingbird_p; +static struct pci_bus *sabre_root_bus; static void *sabre_pci_config_mkaddr(struct pci_pbm_info *pbm, unsigned char bus, @@ -630,7 +631,6 @@ struct pci_dev *pdev, unsigned int ino) { - struct pci_controller_info *p = pbm->parent; struct ino_bucket *bucket; unsigned long imap, iclr; unsigned long imap_off, iclr_off; @@ -655,11 +655,11 @@ if (PIL_RESERVED(pil)) BUG(); - imap = p->controller_regs + imap_off; + imap = pbm->controller_regs + imap_off; imap += 4; iclr_off = sabre_iclr_offset(ino); - iclr = p->controller_regs + iclr_off; + iclr = pbm->controller_regs + iclr_off; iclr += 4; if ((ino & 0x20) == 0) @@ -737,7 +737,7 @@ sabre_write(iommu->iommu_control, (control | SABRE_IOMMUCTRL_DENAB)); for (i = 0; i < 16; i++) { - unsigned long base = p->controller_regs; + unsigned long base = p->pbm_A.controller_regs; iommu_tag[i] = sabre_read(base + SABRE_IOMMU_TAG + (i * 8UL)); @@ -786,8 +786,8 @@ static void sabre_ue_intr(int irq, void *dev_id, struct pt_regs *regs) { struct pci_controller_info *p = dev_id; - unsigned long afsr_reg = p->controller_regs + SABRE_UE_AFSR; - unsigned long afar_reg = p->controller_regs + SABRE_UECE_AFAR; + unsigned long afsr_reg = p->pbm_A.controller_regs + SABRE_UE_AFSR; + unsigned long afar_reg = p->pbm_A.controller_regs + SABRE_UECE_AFAR; unsigned long afsr, afar, error_bits; int reported; @@ -844,8 +844,8 @@ static void sabre_ce_intr(int irq, void *dev_id, struct pt_regs *regs) { struct pci_controller_info *p = dev_id; - unsigned long afsr_reg = p->controller_regs + SABRE_CE_AFSR; - unsigned long afar_reg = p->controller_regs + SABRE_UECE_AFAR; + unsigned long afsr_reg = p->pbm_A.controller_regs + SABRE_CE_AFSR; + unsigned long afar_reg = p->pbm_A.controller_regs + SABRE_UECE_AFAR; unsigned long afsr, afar, error_bits; int reported; @@ -895,6 +895,38 @@ printk("]\n"); } +static void sabre_pcierr_intr_other(struct pci_controller_info *p) +{ + unsigned long csr_reg, csr, csr_error_bits; + u16 stat; + + csr_reg = p->pbm_A.controller_regs + SABRE_PCICTRL; + csr = sabre_read(csr_reg); + csr_error_bits = + csr & SABRE_PCICTRL_SERR; + if (csr_error_bits) { + /* Clear the errors. */ + sabre_write(csr_reg, csr); + + /* Log 'em. */ + if (csr_error_bits & SABRE_PCICTRL_SERR) + printk("SABRE%d: PCI SERR signal asserted.\n", + p->index); + } + pci_read_config_word(sabre_root_bus->self, + PCI_STATUS, &stat); + if (stat & (PCI_STATUS_PARITY | + PCI_STATUS_SIG_TARGET_ABORT | + PCI_STATUS_REC_TARGET_ABORT | + PCI_STATUS_REC_MASTER_ABORT | + PCI_STATUS_SIG_SYSTEM_ERROR)) { + printk("SABRE%d: PCI bus error, PCI_STATUS[%04x]\n", + p->index, stat); + pci_write_config_word(sabre_root_bus->self, + PCI_STATUS, 0xffff); + } +} + static void sabre_pcierr_intr(int irq, void *dev_id, struct pt_regs *regs) { struct pci_controller_info *p = dev_id; @@ -902,8 +934,8 @@ unsigned long afsr, afar, error_bits; int reported; - afsr_reg = p->controller_regs + SABRE_PIOAFSR; - afar_reg = p->controller_regs + SABRE_PIOAFAR; + afsr_reg = p->pbm_A.controller_regs + SABRE_PIOAFSR; + afar_reg = p->pbm_A.controller_regs + SABRE_PIOAFAR; /* Latch error status. */ afar = sabre_read(afar_reg); @@ -916,7 +948,7 @@ SABRE_PIOAFSR_SMA | SABRE_PIOAFSR_STA | SABRE_PIOAFSR_SRTRY | SABRE_PIOAFSR_SPERR); if (!error_bits) - return; + return sabre_pcierr_intr_other(p); sabre_write(afsr_reg, error_bits); /* Log the error. */ @@ -995,8 +1027,8 @@ static void __init sabre_register_error_handlers(struct pci_controller_info *p) { struct pci_pbm_info *pbm = &p->pbm_A; /* arbitrary */ - unsigned long base = p->controller_regs; - unsigned long irq, portid = p->portid; + unsigned long base = pbm->controller_regs; + unsigned long irq, portid = pbm->portid; u64 tmp; /* We clear the error bits in the appropriate AFSR before @@ -1044,13 +1076,12 @@ struct resource *root) { struct pci_pbm_info *pbm = pci_bus2pbm[pdev->bus->number]; - struct pci_controller_info *p = pbm->parent; unsigned long base; if (res->flags & IORESOURCE_IO) - base = p->controller_regs + SABRE_IOSPACE; + base = pbm->controller_regs + SABRE_IOSPACE; else - base = p->controller_regs + SABRE_MEMSPACE; + base = pbm->controller_regs + SABRE_MEMSPACE; res->start += base; res->end += base; @@ -1060,7 +1091,6 @@ { struct pcidev_cookie *pcp = pdev->sysdata; struct pci_pbm_info *pbm = pcp->pbm; - struct pci_controller_info *p = pbm->parent; struct resource *res; unsigned long base; u32 reg; @@ -1078,9 +1108,9 @@ is_64bit = 0; if (res->flags & IORESOURCE_IO) - base = p->controller_regs + SABRE_IOSPACE; + base = pbm->controller_regs + SABRE_IOSPACE; else { - base = p->controller_regs + SABRE_MEMSPACE; + base = pbm->controller_regs + SABRE_MEMSPACE; if ((res->flags & PCI_BASE_ADDRESS_MEM_TYPE_MASK) == PCI_BASE_ADDRESS_MEM_TYPE_64) is_64bit = 1; @@ -1197,6 +1227,8 @@ pci_fixup_host_bridge_self(sabre_bus); sabre_bus->self->sysdata = cookie; + sabre_root_bus = sabre_bus; + apb_init(p, sabre_bus); sabres_scanned = 0; @@ -1256,21 +1288,21 @@ iommu->iommu_cur_ctx = 0; /* Register addresses. */ - iommu->iommu_control = p->controller_regs + SABRE_IOMMU_CONTROL; - iommu->iommu_tsbbase = p->controller_regs + SABRE_IOMMU_TSBBASE; - iommu->iommu_flush = p->controller_regs + SABRE_IOMMU_FLUSH; - iommu->write_complete_reg = p->controller_regs + SABRE_WRSYNC; + iommu->iommu_control = p->pbm_A.controller_regs + SABRE_IOMMU_CONTROL; + iommu->iommu_tsbbase = p->pbm_A.controller_regs + SABRE_IOMMU_TSBBASE; + iommu->iommu_flush = p->pbm_A.controller_regs + SABRE_IOMMU_FLUSH; + iommu->write_complete_reg = p->pbm_A.controller_regs + SABRE_WRSYNC; /* Sabre's IOMMU lacks ctx flushing. */ iommu->iommu_ctxflush = 0; /* Invalidate TLB Entries. */ - control = sabre_read(p->controller_regs + SABRE_IOMMU_CONTROL); + control = sabre_read(p->pbm_A.controller_regs + SABRE_IOMMU_CONTROL); control |= SABRE_IOMMUCTRL_DENAB; - sabre_write(p->controller_regs + SABRE_IOMMU_CONTROL, control); + sabre_write(p->pbm_A.controller_regs + SABRE_IOMMU_CONTROL, control); for(i = 0; i < 16; i++) { - sabre_write(p->controller_regs + SABRE_IOMMU_TAG + (i * 8UL), 0); - sabre_write(p->controller_regs + SABRE_IOMMU_DATA + (i * 8UL), 0); + sabre_write(p->pbm_A.controller_regs + SABRE_IOMMU_TAG + (i * 8UL), 0); + sabre_write(p->pbm_A.controller_regs + SABRE_IOMMU_DATA + (i * 8UL), 0); } /* Leave diag mode enabled for full-flushing done @@ -1287,9 +1319,9 @@ iommu->dma_addr_mask = dma_mask; memset((char *)tsbbase, 0, PAGE_SIZE << order); - sabre_write(p->controller_regs + SABRE_IOMMU_TSBBASE, __pa(tsbbase)); + sabre_write(p->pbm_A.controller_regs + SABRE_IOMMU_TSBBASE, __pa(tsbbase)); - control = sabre_read(p->controller_regs + SABRE_IOMMU_CONTROL); + control = sabre_read(p->pbm_A.controller_regs + SABRE_IOMMU_CONTROL); control &= ~(SABRE_IOMMUCTRL_TSBSZ | SABRE_IOMMUCTRL_TBWSZ); control |= SABRE_IOMMUCTRL_ENAB; switch(tsbsize) { @@ -1306,7 +1338,7 @@ prom_halt(); break; } - sabre_write(p->controller_regs + SABRE_IOMMU_CONTROL, control); + sabre_write(p->pbm_A.controller_regs + SABRE_IOMMU_CONTROL, control); /* We start with no consistent mappings. */ iommu->lowest_consistent_map = @@ -1322,8 +1354,8 @@ struct pci_pbm_info *pbm) { char *name = pbm->name; - unsigned long ibase = p->controller_regs + SABRE_IOSPACE; - unsigned long mbase = p->controller_regs + SABRE_MEMSPACE; + unsigned long ibase = p->pbm_A.controller_regs + SABRE_IOSPACE; + unsigned long mbase = p->pbm_A.controller_regs + SABRE_MEMSPACE; unsigned int devfn; unsigned long first, last, i; u8 *addr, map; @@ -1416,6 +1448,7 @@ pbm = &p->pbm_B; else pbm = &p->pbm_A; + pbm->chip_type = PBM_CHIP_TYPE_SABRE; pbm->parent = p; pbm->prom_node = node; pbm->pci_first_slot = 1; @@ -1511,11 +1544,11 @@ pbm->io_space.name = pbm->mem_space.name = pbm->name; /* Hack up top-level resources. */ - pbm->io_space.start = p->controller_regs + SABRE_IOSPACE; + pbm->io_space.start = p->pbm_A.controller_regs + SABRE_IOSPACE; pbm->io_space.end = pbm->io_space.start + (1UL << 24) - 1UL; pbm->io_space.flags = IORESOURCE_IO; - pbm->mem_space.start = p->controller_regs + SABRE_MEMSPACE; + pbm->mem_space.start = p->pbm_A.controller_regs + SABRE_MEMSPACE; pbm->mem_space.end = pbm->mem_space.start + (unsigned long)dma_begin - 1UL; pbm->mem_space.flags = IORESOURCE_MEM; @@ -1591,7 +1624,8 @@ pci_controller_root = p; spin_unlock_irqrestore(&pci_controller_lock, flags); - p->portid = upa_portid; + p->pbm_A.portid = upa_portid; + p->pbm_B.portid = upa_portid; p->index = pci_num_controllers++; p->pbms_same_domain = 1; p->scan_bus = sabre_scan_bus; @@ -1614,30 +1648,31 @@ /* * First REG in property is base of entire SABRE register space. */ - p->controller_regs = pr_regs[0].phys_addr; - pci_dma_wsync = p->controller_regs + SABRE_WRSYNC; + p->pbm_A.controller_regs = pr_regs[0].phys_addr; + p->pbm_B.controller_regs = pr_regs[0].phys_addr; + pci_dma_wsync = p->pbm_A.controller_regs + SABRE_WRSYNC; printk("PCI: Found SABRE, main regs at %016lx, wsync at %016lx\n", - p->controller_regs, pci_dma_wsync); + p->pbm_A.controller_regs, pci_dma_wsync); /* Clear interrupts */ /* PCI first */ for (clear_irq = SABRE_ICLR_A_SLOT0; clear_irq < SABRE_ICLR_B_SLOT0 + 0x80; clear_irq += 8) - sabre_write(p->controller_regs + clear_irq, 0x0UL); + sabre_write(p->pbm_A.controller_regs + clear_irq, 0x0UL); /* Then OBIO */ for (clear_irq = SABRE_ICLR_SCSI; clear_irq < SABRE_ICLR_SCSI + 0x80; clear_irq += 8) - sabre_write(p->controller_regs + clear_irq, 0x0UL); + sabre_write(p->pbm_A.controller_regs + clear_irq, 0x0UL); /* Error interrupts are enabled later after the bus scan. */ - sabre_write(p->controller_regs + SABRE_PCICTRL, + sabre_write(p->pbm_A.controller_regs + SABRE_PCICTRL, (SABRE_PCICTRL_MRLEN | SABRE_PCICTRL_SERR | SABRE_PCICTRL_ARBPARK | SABRE_PCICTRL_AEN)); /* Now map in PCI config space for entire SABRE. */ p->pbm_A.config_space = p->pbm_B.config_space = - (p->controller_regs + SABRE_CONFIGSPACE); + (p->pbm_A.controller_regs + SABRE_CONFIGSPACE); printk("SABRE: Shared PCI config space at %016lx\n", p->pbm_A.config_space); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sparc64/kernel/pci_schizo.c linux-2.4.23-pre8/arch/sparc64/kernel/pci_schizo.c --- linux-2.4.22/arch/sparc64/kernel/pci_schizo.c 2002-11-28 23:53:12.000000000 +0000 +++ linux-2.4.23-pre8/arch/sparc64/kernel/pci_schizo.c 2003-10-22 22:47:46.000000000 +0000 @@ -1,7 +1,7 @@ /* $Id: pci_schizo.c,v 1.23.2.2 2002/03/11 07:55:24 davem Exp $ - * pci_schizo.c: SCHIZO specific PCI controller support. + * pci_schizo.c: SCHIZO/TOMATILLO specific PCI controller support. * - * Copyright (C) 2001 David S. Miller (davem@redhat.com) + * Copyright (C) 2001, 2002, 2003 David S. Miller (davem@redhat.com) */ #include @@ -45,13 +45,7 @@ * block requires more space in Schizo's address space than * they predicted, thus requiring an address space reorg when * the newer Schizo is taped out. - * - * These offsets look weird because I keep in p->controller_regs - * the second PROM register property minus 0x10000 which is the - * base of the Safari and UPA64S registers of SCHIZO. */ -#define SCHIZO_PBM_A_REGS_OFF (0x600000UL - 0x400000UL) -#define SCHIZO_PBM_B_REGS_OFF (0x700000UL - 0x400000UL) /* Streaming buffer control register. */ #define SCHIZO_STRBUF_CTRL_LPTR 0x00000000000000f0UL /* LRU Lock Pointer */ @@ -101,25 +95,21 @@ { if (!pbm) return NULL; + bus -= pbm->pci_first_busno; return (void *) (SCHIZO_CONFIG_BASE(pbm) | SCHIZO_CONFIG_ENCODE(bus, devfn, where)); } -/* 4 slots on pbm A, and 6 slots on pbm B. In both cases - * slot 0 is the SCHIZO host bridge itself. - */ +/* Just make sure the bus number is in range. */ static int schizo_out_of_range(struct pci_pbm_info *pbm, unsigned char bus, unsigned char devfn) { - return ((pbm->parent == 0) || - ((pbm == &pbm->parent->pbm_B) && - (bus == pbm->pci_first_busno) && - PCI_SLOT(devfn) > 6) || - ((pbm == &pbm->parent->pbm_A) && - (bus == pbm->pci_first_busno) && - PCI_SLOT(devfn) > 4)); + if (bus < pbm->pci_first_busno || + bus > pbm->pci_last_busno) + return 1; + return 0; } /* SCHIZO PCI configuration space accessors. */ @@ -188,6 +178,15 @@ } pci_config_read32(addr, value); + if (where == PCI_PRIMARY_BUS && + dev->hdr_type == PCI_HEADER_TYPE_BRIDGE && + *value != 0xffffffff) { + u8 *busp = ((u8 *) value) + 1; + int i; + + for (i = 0; i < 3; i++) + busp[i] += pbm->pci_first_busno; + } return PCIBIOS_SUCCESSFUL; } @@ -251,6 +250,20 @@ where); return PCIBIOS_SUCCESSFUL; } + + if (where == PCI_PRIMARY_BUS && + dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) { + u8 *busp = ((u8 *) &value) + 1; + int i; + + for (i = 0; i < 3; i++) { + if (busp[i] >= pbm->pci_first_busno) + busp[i] += pbm->pci_first_busno; + else + busp[i] = 0; + } + } + pci_config_write32(addr, value); return PCIBIOS_SUCCESSFUL; } @@ -379,16 +392,10 @@ struct pci_dev *pdev, unsigned int ino) { - struct pci_controller_info *p = pbm->parent; struct ino_bucket *bucket; - unsigned long imap, iclr, pbm_off; + unsigned long imap, iclr; unsigned long imap_off, iclr_off; - int pil; - - if (pbm == &p->pbm_A) - pbm_off = SCHIZO_PBM_A_REGS_OFF; - else - pbm_off = SCHIZO_PBM_B_REGS_OFF; + int pil, ign_fixup; ino &= PCI_IRQ_INO; imap_off = schizo_imap_offset(ino); @@ -399,11 +406,11 @@ if (PIL_RESERVED(pil)) BUG(); - imap = p->controller_regs + pbm_off + imap_off; + imap = pbm->pbm_regs + imap_off; imap += 4; iclr_off = schizo_iclr_offset(ino); - iclr = p->controller_regs + pbm_off + iclr_off; + iclr = pbm->pbm_regs + iclr_off; iclr += 4; /* On Schizo, no inofixup occurs. This is because each @@ -411,8 +418,17 @@ * there is only one IMAP register for each PCI slot even * though four different INOs can be generated by each * PCI slot. + * + * But, for JBUS variants (essentially, Tomatillo), we have + * to fixup the lowest bit of the interrupt group number. */ - bucket = __bucket(build_irq(pil, 0, iclr, imap)); + ign_fixup = 0; + if (pbm->chip_type == PBM_CHIP_TYPE_TOMATILLO) { + if (pbm->portid & 1) + ign_fixup = (1 << 6); + } + + bucket = __bucket(build_irq(pil, ign_fixup, iclr, imap)); bucket->flags |= IBF_PCI; return __irq(bucket); @@ -428,6 +444,13 @@ static unsigned long stc_tag_buf[16]; static unsigned long stc_line_buf[16]; +/* These offsets look weird because I keep in pbm->controller_regs + * the second PROM register property minus 0x10000 which is the + * base of the Safari and UPA64S registers of SCHIZO. + */ +#define SCHIZO_PBM_A_REGS_OFF (0x600000UL - 0x400000UL) +#define SCHIZO_PBM_B_REGS_OFF (0x700000UL - 0x400000UL) + static void schizo_clear_other_err_intr(int irq) { struct ino_bucket *bucket = __bucket(irq); @@ -459,19 +482,12 @@ static void __schizo_check_stc_error_pbm(struct pci_pbm_info *pbm, enum schizo_error_type type) { - struct pci_controller_info *p = pbm->parent; struct pci_strbuf *strbuf = &pbm->stc; - unsigned long regbase = p->controller_regs; + unsigned long regbase = pbm->pbm_regs; unsigned long err_base, tag_base, line_base; u64 control; - char pbm_name = (pbm == &p->pbm_A ? 'A' : 'B'); int i; - if (pbm == &p->pbm_A) - regbase += SCHIZO_PBM_A_REGS_OFF; - else - regbase += SCHIZO_PBM_B_REGS_OFF; - err_base = regbase + SCHIZO_STC_ERR; tag_base = regbase + SCHIZO_STC_TAG; line_base = regbase + SCHIZO_STC_LINE; @@ -517,8 +533,8 @@ unsigned long errval = stc_error_buf[j]; if (errval != 0) { saw_error++; - printk("SCHIZO%d: PBM-%c STC_ERR(%d)[wr(%d)rd(%d)]\n", - p->index, pbm_name, + printk("%s: STC_ERR(%d)[wr(%d)rd(%d)]\n", + pbm->name, j, (errval & SCHIZO_STCERR_WRITE) ? 1 : 0, (errval & SCHIZO_STCERR_READ) ? 1 : 0); @@ -527,8 +543,8 @@ if (saw_error != 0) { unsigned long tagval = stc_tag_buf[i]; unsigned long lineval = stc_line_buf[i]; - printk("SCHIZO%d: PBM-%c STC_TAG(%d)[PA(%016lx)VA(%08lx)V(%d)R(%d)]\n", - p->index, pbm_name, + printk("%s: STC_TAG(%d)[PA(%016lx)VA(%08lx)V(%d)R(%d)]\n", + pbm->name, i, ((tagval & SCHIZO_STCTAG_PPN) >> 19UL), (tagval & SCHIZO_STCTAG_VPN), @@ -536,9 +552,9 @@ ((tagval & SCHIZO_STCTAG_READ) ? 1 : 0)); /* XXX Should spit out per-bank error information... -DaveM */ - printk("SCHIZO%d: PBM-%c STC_LINE(%d)[LIDX(%lx)SP(%lx)LADDR(%lx)EP(%lx)" + printk("%s: STC_LINE(%d)[LIDX(%lx)SP(%lx)LADDR(%lx)EP(%lx)" "V(%d)FOFN(%d)]\n", - p->index, pbm_name, + pbm->name, i, ((lineval & SCHIZO_STCLINE_LINDX) >> 23UL), ((lineval & SCHIZO_STCLINE_SPTR) >> 13UL), @@ -574,13 +590,11 @@ static void schizo_check_iommu_error_pbm(struct pci_pbm_info *pbm, enum schizo_error_type type) { - struct pci_controller_info *p = pbm->parent; struct pci_iommu *iommu = pbm->iommu; unsigned long iommu_tag[16]; unsigned long iommu_data[16]; unsigned long flags; u64 control; - char pbm_name = (pbm == &p->pbm_A ? 'A' : 'B'); int i; spin_lock_irqsave(&iommu->lock, flags); @@ -608,8 +622,8 @@ type_string = "ECC Error"; break; }; - printk("SCHIZO%d: PBM-%c IOMMU Error, type[%s]\n", - p->index, pbm_name, type_string); + printk("%s: IOMMU Error, type[%s]\n", + pbm->name, type_string); /* Put the IOMMU into diagnostic mode and probe * it's TLB for entries with error status. @@ -624,11 +638,7 @@ schizo_write(iommu->iommu_control, control | SCHIZO_IOMMU_CTRL_DENAB); - base = p->controller_regs; - if (pbm == &p->pbm_A) - base += SCHIZO_PBM_A_REGS_OFF; - else - base += SCHIZO_PBM_B_REGS_OFF; + base = pbm->pbm_regs; for (i = 0; i < 16; i++) { iommu_tag[i] = @@ -667,22 +677,23 @@ type_string = "ECC Error"; break; }; - printk("SCHIZO%d: PBM-%c IOMMU TAG(%d)[error(%s) ctx(%x) wr(%d) str(%d) " + printk("%s: IOMMU TAG(%d)[error(%s) ctx(%x) wr(%d) str(%d) " "sz(%dK) vpg(%08lx)]\n", - p->index, pbm_name, i, type_string, + pbm->name, i, type_string, (int)((tag & SCHIZO_IOMMU_TAG_CTXT) >> 25UL), ((tag & SCHIZO_IOMMU_TAG_WRITE) ? 1 : 0), ((tag & SCHIZO_IOMMU_TAG_STREAM) ? 1 : 0), ((tag & SCHIZO_IOMMU_TAG_SIZE) ? 64 : 8), (tag & SCHIZO_IOMMU_TAG_VPAGE) << IOMMU_PAGE_SHIFT); - printk("SCHIZO%d: PBM-%c IOMMU DATA(%d)[valid(%d) cache(%d) ppg(%016lx)]\n", - p->index, pbm_name, i, + printk("%s: IOMMU DATA(%d)[valid(%d) cache(%d) ppg(%016lx)]\n", + pbm->name, i, ((data & SCHIZO_IOMMU_DATA_VALID) ? 1 : 0), ((data & SCHIZO_IOMMU_DATA_CACHE) ? 1 : 0), (data & SCHIZO_IOMMU_DATA_PPAGE) << IOMMU_PAGE_SHIFT); } } - __schizo_check_stc_error_pbm(pbm, type); + if (pbm->stc.strbuf_enabled) + __schizo_check_stc_error_pbm(pbm, type); spin_unlock_irqrestore(&iommu->lock, flags); } @@ -697,26 +708,26 @@ #define SCHIZO_UE_AFSR 0x10030UL #define SCHIZO_UE_AFAR 0x10038UL -#define SCHIZO_UEAFSR_PPIO 0x8000000000000000UL -#define SCHIZO_UEAFSR_PDRD 0x4000000000000000UL -#define SCHIZO_UEAFSR_PDWR 0x2000000000000000UL -#define SCHIZO_UEAFSR_SPIO 0x1000000000000000UL -#define SCHIZO_UEAFSR_SDMA 0x0800000000000000UL -#define SCHIZO_UEAFSR_ERRPNDG 0x0300000000000000UL -#define SCHIZO_UEAFSR_BMSK 0x000003ff00000000UL -#define SCHIZO_UEAFSR_QOFF 0x00000000c0000000UL -#define SCHIZO_UEAFSR_AID 0x000000001f000000UL -#define SCHIZO_UEAFSR_PARTIAL 0x0000000000800000UL -#define SCHIZO_UEAFSR_OWNEDIN 0x0000000000400000UL -#define SCHIZO_UEAFSR_MTAGSYND 0x00000000000f0000UL -#define SCHIZO_UEAFSR_MTAG 0x000000000000e000UL -#define SCHIZO_UEAFSR_ECCSYND 0x00000000000001ffUL +#define SCHIZO_UEAFSR_PPIO 0x8000000000000000UL /* Safari */ +#define SCHIZO_UEAFSR_PDRD 0x4000000000000000UL /* Safari/Tomatillo */ +#define SCHIZO_UEAFSR_PDWR 0x2000000000000000UL /* Safari */ +#define SCHIZO_UEAFSR_SPIO 0x1000000000000000UL /* Safari */ +#define SCHIZO_UEAFSR_SDMA 0x0800000000000000UL /* Safari/Tomatillo */ +#define SCHIZO_UEAFSR_ERRPNDG 0x0300000000000000UL /* Safari */ +#define SCHIZO_UEAFSR_BMSK 0x000003ff00000000UL /* Safari */ +#define SCHIZO_UEAFSR_QOFF 0x00000000c0000000UL /* Safari/Tomatillo */ +#define SCHIZO_UEAFSR_AID 0x000000001f000000UL /* Safari/Tomatillo */ +#define SCHIZO_UEAFSR_PARTIAL 0x0000000000800000UL /* Safari */ +#define SCHIZO_UEAFSR_OWNEDIN 0x0000000000400000UL /* Safari */ +#define SCHIZO_UEAFSR_MTAGSYND 0x00000000000f0000UL /* Safari */ +#define SCHIZO_UEAFSR_MTAG 0x000000000000e000UL /* Safari */ +#define SCHIZO_UEAFSR_ECCSYND 0x00000000000001ffUL /* Safari */ static void schizo_ue_intr(int irq, void *dev_id, struct pt_regs *regs) { struct pci_controller_info *p = dev_id; - unsigned long afsr_reg = p->controller_regs + SCHIZO_UE_AFSR; - unsigned long afar_reg = p->controller_regs + SCHIZO_UE_AFAR; + unsigned long afsr_reg = p->pbm_B.controller_regs + SCHIZO_UE_AFSR; + unsigned long afar_reg = p->pbm_B.controller_regs + SCHIZO_UE_AFAR; unsigned long afsr, afar, error_bits; int reported, limit; @@ -741,7 +752,7 @@ schizo_write(afsr_reg, error_bits); /* Log the error. */ - printk("SCHIZO%d: Uncorrectable Error, primary error type[%s]\n", + printk("PCI%d: Uncorrectable Error, primary error type[%s]\n", p->index, (((error_bits & SCHIZO_UEAFSR_PPIO) ? "PIO" : @@ -749,20 +760,20 @@ "DMA Read" : ((error_bits & SCHIZO_UEAFSR_PDWR) ? "DMA Write" : "???"))))); - printk("SCHIZO%d: bytemask[%04lx] qword_offset[%lx] SAFARI_AID[%02lx]\n", + printk("PCI%d: bytemask[%04lx] qword_offset[%lx] SAFARI_AID[%02lx]\n", p->index, (afsr & SCHIZO_UEAFSR_BMSK) >> 32UL, (afsr & SCHIZO_UEAFSR_QOFF) >> 30UL, (afsr & SCHIZO_UEAFSR_AID) >> 24UL); - printk("SCHIZO%d: partial[%d] owned_in[%d] mtag[%lx] mtag_synd[%lx] ecc_sync[%lx]\n", + printk("PCI%d: partial[%d] owned_in[%d] mtag[%lx] mtag_synd[%lx] ecc_sync[%lx]\n", p->index, (afsr & SCHIZO_UEAFSR_PARTIAL) ? 1 : 0, (afsr & SCHIZO_UEAFSR_OWNEDIN) ? 1 : 0, (afsr & SCHIZO_UEAFSR_MTAG) >> 13UL, (afsr & SCHIZO_UEAFSR_MTAGSYND) >> 16UL, (afsr & SCHIZO_UEAFSR_ECCSYND) >> 0UL); - printk("SCHIZO%d: UE AFAR [%016lx]\n", p->index, afar); - printk("SCHIZO%d: UE Secondary errors [", p->index); + printk("PCI%d: UE AFAR [%016lx]\n", p->index, afar); + printk("PCI%d: UE Secondary errors [", p->index); reported = 0; if (afsr & SCHIZO_UEAFSR_SPIO) { reported++; @@ -803,8 +814,8 @@ static void schizo_ce_intr(int irq, void *dev_id, struct pt_regs *regs) { struct pci_controller_info *p = dev_id; - unsigned long afsr_reg = p->controller_regs + SCHIZO_CE_AFSR; - unsigned long afar_reg = p->controller_regs + SCHIZO_CE_AFAR; + unsigned long afsr_reg = p->pbm_B.controller_regs + SCHIZO_CE_AFSR; + unsigned long afar_reg = p->pbm_B.controller_regs + SCHIZO_CE_AFAR; unsigned long afsr, afar, error_bits; int reported, limit; @@ -829,7 +840,7 @@ schizo_write(afsr_reg, error_bits); /* Log the error. */ - printk("SCHIZO%d: Correctable Error, primary error type[%s]\n", + printk("PCI%d: Correctable Error, primary error type[%s]\n", p->index, (((error_bits & SCHIZO_CEAFSR_PPIO) ? "PIO" : @@ -841,20 +852,20 @@ /* XXX Use syndrome and afar to print out module string just like * XXX UDB CE trap handler does... -DaveM */ - printk("SCHIZO%d: bytemask[%04lx] qword_offset[%lx] SAFARI_AID[%02lx]\n", + printk("PCI%d: bytemask[%04lx] qword_offset[%lx] SAFARI_AID[%02lx]\n", p->index, (afsr & SCHIZO_UEAFSR_BMSK) >> 32UL, (afsr & SCHIZO_UEAFSR_QOFF) >> 30UL, (afsr & SCHIZO_UEAFSR_AID) >> 24UL); - printk("SCHIZO%d: partial[%d] owned_in[%d] mtag[%lx] mtag_synd[%lx] ecc_sync[%lx]\n", + printk("PCI%d: partial[%d] owned_in[%d] mtag[%lx] mtag_synd[%lx] ecc_sync[%lx]\n", p->index, (afsr & SCHIZO_UEAFSR_PARTIAL) ? 1 : 0, (afsr & SCHIZO_UEAFSR_OWNEDIN) ? 1 : 0, (afsr & SCHIZO_UEAFSR_MTAG) >> 13UL, (afsr & SCHIZO_UEAFSR_MTAGSYND) >> 16UL, (afsr & SCHIZO_UEAFSR_ECCSYND) >> 0UL); - printk("SCHIZO%d: CE AFAR [%016lx]\n", p->index, afar); - printk("SCHIZO%d: CE Secondary errors [", p->index); + printk("PCI%d: CE AFAR [%016lx]\n", p->index, afar); + printk("PCI%d: CE Secondary errors [", p->index); reported = 0; if (afsr & SCHIZO_CEAFSR_SPIO) { reported++; @@ -874,23 +885,101 @@ #define SCHIZO_PCI_AFSR 0x2010UL #define SCHIZO_PCI_AFAR 0x2018UL -#define SCHIZO_PCIAFSR_PMA 0x8000000000000000UL -#define SCHIZO_PCIAFSR_PTA 0x4000000000000000UL -#define SCHIZO_PCIAFSR_PRTRY 0x2000000000000000UL -#define SCHIZO_PCIAFSR_PPERR 0x1000000000000000UL -#define SCHIZO_PCIAFSR_PTTO 0x0800000000000000UL -#define SCHIZO_PCIAFSR_PUNUS 0x0400000000000000UL -#define SCHIZO_PCIAFSR_SMA 0x0200000000000000UL -#define SCHIZO_PCIAFSR_STA 0x0100000000000000UL -#define SCHIZO_PCIAFSR_SRTRY 0x0080000000000000UL -#define SCHIZO_PCIAFSR_SPERR 0x0040000000000000UL -#define SCHIZO_PCIAFSR_STTO 0x0020000000000000UL -#define SCHIZO_PCIAFSR_SUNUS 0x0010000000000000UL -#define SCHIZO_PCIAFSR_BMSK 0x000003ff00000000UL -#define SCHIZO_PCIAFSR_BLK 0x0000000080000000UL -#define SCHIZO_PCIAFSR_CFG 0x0000000040000000UL -#define SCHIZO_PCIAFSR_MEM 0x0000000020000000UL -#define SCHIZO_PCIAFSR_IO 0x0000000010000000UL +#define SCHIZO_PCIAFSR_PMA 0x8000000000000000UL /* Schizo/Tomatillo */ +#define SCHIZO_PCIAFSR_PTA 0x4000000000000000UL /* Schizo/Tomatillo */ +#define SCHIZO_PCIAFSR_PRTRY 0x2000000000000000UL /* Schizo/Tomatillo */ +#define SCHIZO_PCIAFSR_PPERR 0x1000000000000000UL /* Schizo/Tomatillo */ +#define SCHIZO_PCIAFSR_PTTO 0x0800000000000000UL /* Schizo/Tomatillo */ +#define SCHIZO_PCIAFSR_PUNUS 0x0400000000000000UL /* Schizo */ +#define SCHIZO_PCIAFSR_SMA 0x0200000000000000UL /* Schizo/Tomatillo */ +#define SCHIZO_PCIAFSR_STA 0x0100000000000000UL /* Schizo/Tomatillo */ +#define SCHIZO_PCIAFSR_SRTRY 0x0080000000000000UL /* Schizo/Tomatillo */ +#define SCHIZO_PCIAFSR_SPERR 0x0040000000000000UL /* Schizo/Tomatillo */ +#define SCHIZO_PCIAFSR_STTO 0x0020000000000000UL /* Schizo/Tomatillo */ +#define SCHIZO_PCIAFSR_SUNUS 0x0010000000000000UL /* Schizo */ +#define SCHIZO_PCIAFSR_BMSK 0x000003ff00000000UL /* Schizo/Tomatillo */ +#define SCHIZO_PCIAFSR_BLK 0x0000000080000000UL /* Schizo/Tomatillo */ +#define SCHIZO_PCIAFSR_CFG 0x0000000040000000UL /* Schizo/Tomatillo */ +#define SCHIZO_PCIAFSR_MEM 0x0000000020000000UL /* Schizo/Tomatillo */ +#define SCHIZO_PCIAFSR_IO 0x0000000010000000UL /* Schizo/Tomatillo */ + +#define SCHIZO_PCI_CTRL (0x2000UL) +#define SCHIZO_PCICTRL_BUS_UNUS (1UL << 63UL) /* Safari */ +#define SCHIZO_PCICTRL_ARB_PRIO (0x1ff << 52UL) /* Tomatillo */ +#define SCHIZO_PCICTRL_ESLCK (1UL << 51UL) /* Safari */ +#define SCHIZO_PCICTRL_ERRSLOT (7UL << 48UL) /* Safari */ +#define SCHIZO_PCICTRL_TTO_ERR (1UL << 38UL) /* Safari/Tomatillo */ +#define SCHIZO_PCICTRL_RTRY_ERR (1UL << 37UL) /* Safari/Tomatillo */ +#define SCHIZO_PCICTRL_DTO_ERR (1UL << 36UL) /* Safari/Tomatillo */ +#define SCHIZO_PCICTRL_SBH_ERR (1UL << 35UL) /* Safari */ +#define SCHIZO_PCICTRL_SERR (1UL << 34UL) /* Safari/Tomatillo */ +#define SCHIZO_PCICTRL_PCISPD (1UL << 33UL) /* Safari */ +#define SCHIZO_PCICTRL_MRM_PREF (1UL << 28UL) /* Tomatillo */ +#define SCHIZO_PCICTRL_RDO_PREF (1UL << 27UL) /* Tomatillo */ +#define SCHIZO_PCICTRL_RDL_PREF (1UL << 26UL) /* Tomatillo */ +#define SCHIZO_PCICTRL_PTO (3UL << 24UL) /* Safari/Tomatillo */ +#define SCHIZO_PCICTRL_PTO_SHIFT 24UL +#define SCHIZO_PCICTRL_TRWSW (7UL << 21UL) /* Tomatillo */ +#define SCHIZO_PCICTRL_F_TGT_A (1UL << 20UL) /* Tomatillo */ +#define SCHIZO_PCICTRL_S_DTO_INT (1UL << 19UL) /* Safari */ +#define SCHIZO_PCICTRL_F_TGT_RT (1UL << 19UL) /* Tomatillo */ +#define SCHIZO_PCICTRL_SBH_INT (1UL << 18UL) /* Safari */ +#define SCHIZO_PCICTRL_T_DTO_INT (1UL << 18UL) /* Tomatillo */ +#define SCHIZO_PCICTRL_EEN (1UL << 17UL) /* Safari/Tomatillo */ +#define SCHIZO_PCICTRL_PARK (1UL << 16UL) /* Safari/Tomatillo */ +#define SCHIZO_PCICTRL_PCIRST (1UL << 8UL) /* Safari */ +#define SCHIZO_PCICTRL_ARB_S (0x3fUL << 0UL) /* Safari */ +#define SCHIZO_PCICTRL_ARB_T (0xffUL << 0UL) /* Tomatillo */ + +static void schizo_pcierr_intr_other(struct pci_pbm_info *pbm) +{ + unsigned long csr_reg, csr, csr_error_bits; + u16 stat; + + csr_reg = pbm->pbm_regs + SCHIZO_PCI_CTRL; + csr = schizo_read(csr_reg); + csr_error_bits = + csr & (SCHIZO_PCICTRL_BUS_UNUS | + SCHIZO_PCICTRL_TTO_ERR | + SCHIZO_PCICTRL_RTRY_ERR | + SCHIZO_PCICTRL_DTO_ERR | + SCHIZO_PCICTRL_SBH_ERR | + SCHIZO_PCICTRL_SERR); + if (csr_error_bits) { + /* Clear the errors. */ + schizo_write(csr_reg, csr); + + /* Log 'em. */ + if (csr_error_bits & SCHIZO_PCICTRL_BUS_UNUS) + printk("%s: Bus unusable error asserted.\n", + pbm->name); + if (csr_error_bits & SCHIZO_PCICTRL_TTO_ERR) + printk("%s: PCI TRDY# timeout error asserted.\n", + pbm->name); + if (csr_error_bits & SCHIZO_PCICTRL_RTRY_ERR) + printk("%s: PCI excessive retry error asserted.\n", + pbm->name); + if (csr_error_bits & SCHIZO_PCICTRL_DTO_ERR) + printk("%s: PCI discard timeout error asserted.\n", + pbm->name); + if (csr_error_bits & SCHIZO_PCICTRL_SBH_ERR) + printk("%s: PCI streaming byte hole error asserted.\n", + pbm->name); + if (csr_error_bits & SCHIZO_PCICTRL_SERR) + printk("%s: PCI SERR signal asserted.\n", + pbm->name); + } + pci_read_config_word(pbm->pci_bus->self, PCI_STATUS, &stat); + if (stat & (PCI_STATUS_PARITY | + PCI_STATUS_SIG_TARGET_ABORT | + PCI_STATUS_REC_TARGET_ABORT | + PCI_STATUS_REC_MASTER_ABORT | + PCI_STATUS_SIG_SYSTEM_ERROR)) { + printk("%s: PCI bus error, PCI_STATUS[%04x]\n", + pbm->name, stat); + pci_write_config_word(pbm->pci_bus->self, PCI_STATUS, 0xffff); + } +} static void schizo_pcierr_intr(int irq, void *dev_id, struct pt_regs *regs) { @@ -899,16 +988,8 @@ unsigned long afsr_reg, afar_reg, base; unsigned long afsr, afar, error_bits; int reported; - char pbm_name; - base = p->controller_regs; - if (pbm == &pbm->parent->pbm_A) { - base += SCHIZO_PBM_A_REGS_OFF; - pbm_name = 'A'; - } else { - base += SCHIZO_PBM_B_REGS_OFF; - pbm_name = 'B'; - } + base = pbm->pbm_regs; afsr_reg = base + SCHIZO_PCI_AFSR; afar_reg = base + SCHIZO_PCI_AFAR; @@ -926,12 +1007,12 @@ SCHIZO_PCIAFSR_SRTRY | SCHIZO_PCIAFSR_SPERR | SCHIZO_PCIAFSR_STTO | SCHIZO_PCIAFSR_SUNUS); if (!error_bits) - return; + return schizo_pcierr_intr_other(pbm); schizo_write(afsr_reg, error_bits); /* Log the error. */ - printk("SCHIZO%d: PBM-%c PCI Error, primary error type[%s]\n", - p->index, pbm_name, + printk("%s: PCI Error, primary error type[%s]\n", + pbm->name, (((error_bits & SCHIZO_PCIAFSR_PMA) ? "Master Abort" : ((error_bits & SCHIZO_PCIAFSR_PTA) ? @@ -944,8 +1025,8 @@ "Timeout" : ((error_bits & SCHIZO_PCIAFSR_PUNUS) ? "Bus Unusable" : "???")))))))); - printk("SCHIZO%d: PBM-%c bytemask[%04lx] was_block(%d) space(%s)\n", - p->index, pbm_name, + printk("%s: bytemask[%04lx] was_block(%d) space(%s)\n", + pbm->name, (afsr & SCHIZO_PCIAFSR_BMSK) >> 32UL, (afsr & SCHIZO_PCIAFSR_BLK) ? 1 : 0, ((afsr & SCHIZO_PCIAFSR_CFG) ? @@ -954,10 +1035,10 @@ "Memory" : ((afsr & SCHIZO_PCIAFSR_IO) ? "I/O" : "???")))); - printk("SCHIZO%d: PBM-%c PCI AFAR [%016lx]\n", - p->index, pbm_name, afar); - printk("SCHIZO%d: PBM-%c PCI Secondary errors [", - p->index, pbm_name); + printk("%s: PCI AFAR [%016lx]\n", + pbm->name, afar); + printk("%s: PCI Secondary errors [", + pbm->name); reported = 0; if (afsr & SCHIZO_PCIAFSR_SMA) { reported++; @@ -1020,24 +1101,37 @@ #define SAFARI_ERRLOG_ERROUT 0x8000000000000000UL -#define SAFARI_ERROR_BADCMD 0x4000000000000000UL -#define SAFARI_ERROR_SSMDIS 0x2000000000000000UL -#define SAFARI_ERROR_BADMA 0x1000000000000000UL -#define SAFARI_ERROR_BADMB 0x0800000000000000UL -#define SAFARI_ERROR_BADMC 0x0400000000000000UL -#define SAFARI_ERROR_CPU1PS 0x0000000000002000UL -#define SAFARI_ERROR_CPU1PB 0x0000000000001000UL -#define SAFARI_ERROR_CPU0PS 0x0000000000000800UL -#define SAFARI_ERROR_CPU0PB 0x0000000000000400UL -#define SAFARI_ERROR_CIQTO 0x0000000000000200UL -#define SAFARI_ERROR_LPQTO 0x0000000000000100UL -#define SAFARI_ERROR_SFPQTO 0x0000000000000080UL -#define SAFARI_ERROR_UFPQTO 0x0000000000000040UL -#define SAFARI_ERROR_APERR 0x0000000000000020UL -#define SAFARI_ERROR_UNMAP 0x0000000000000010UL -#define SAFARI_ERROR_BUSERR 0x0000000000000004UL -#define SAFARI_ERROR_TIMEOUT 0x0000000000000002UL -#define SAFARI_ERROR_ILL 0x0000000000000001UL +#define BUS_ERROR_BADCMD 0x4000000000000000UL /* Schizo/Tomatillo */ +#define BUS_ERROR_SSMDIS 0x2000000000000000UL /* Safari */ +#define BUS_ERROR_BADMA 0x1000000000000000UL /* Safari */ +#define BUS_ERROR_BADMB 0x0800000000000000UL /* Safari */ +#define BUS_ERROR_BADMC 0x0400000000000000UL /* Safari */ +#define BUS_ERROR_SNOOP_GR 0x0000000000200000UL /* Tomatillo */ +#define BUS_ERROR_SNOOP_PCI 0x0000000000100000UL /* Tomatillo */ +#define BUS_ERROR_SNOOP_RD 0x0000000000080000UL /* Tomatillo */ +#define BUS_ERROR_SNOOP_RDS 0x0000000000020000UL /* Tomatillo */ +#define BUS_ERROR_SNOOP_RDSA 0x0000000000010000UL /* Tomatillo */ +#define BUS_ERROR_SNOOP_OWN 0x0000000000008000UL /* Tomatillo */ +#define BUS_ERROR_SNOOP_RDO 0x0000000000004000UL /* Tomatillo */ +#define BUS_ERROR_CPU1PS 0x0000000000002000UL /* Safari */ +#define BUS_ERROR_WDATA_PERR 0x0000000000002000UL /* Tomatillo */ +#define BUS_ERROR_CPU1PB 0x0000000000001000UL /* Safari */ +#define BUS_ERROR_CTRL_PERR 0x0000000000001000UL /* Tomatillo */ +#define BUS_ERROR_CPU0PS 0x0000000000000800UL /* Safari */ +#define BUS_ERROR_SNOOP_ERR 0x0000000000000800UL /* Tomatillo */ +#define BUS_ERROR_CPU0PB 0x0000000000000400UL /* Safari */ +#define BUS_ERROR_JBUS_ILL_B 0x0000000000000400UL /* Tomatillo */ +#define BUS_ERROR_CIQTO 0x0000000000000200UL /* Safari */ +#define BUS_ERROR_LPQTO 0x0000000000000100UL /* Safari */ +#define BUS_ERROR_JBUS_ILL_C 0x0000000000000100UL /* Tomatillo */ +#define BUS_ERROR_SFPQTO 0x0000000000000080UL /* Safari */ +#define BUS_ERROR_UFPQTO 0x0000000000000040UL /* Safari */ +#define BUS_ERROR_RD_PERR 0x0000000000000040UL /* Tomatillo */ +#define BUS_ERROR_APERR 0x0000000000000020UL /* Safari/Tomatillo */ +#define BUS_ERROR_UNMAP 0x0000000000000010UL /* Safari/Tomatillo */ +#define BUS_ERROR_BUSERR 0x0000000000000004UL /* Safari/Tomatillo */ +#define BUS_ERROR_TIMEOUT 0x0000000000000002UL /* Safari/Tomatillo */ +#define BUS_ERROR_ILL 0x0000000000000001UL /* Safari */ /* We only expect UNMAP errors here. The rest of the Safari errors * are marked fatal and thus cause a system reset. @@ -1047,19 +1141,19 @@ struct pci_controller_info *p = dev_id; u64 errlog; - errlog = schizo_read(p->controller_regs + SCHIZO_SAFARI_ERRLOG); - schizo_write(p->controller_regs + SCHIZO_SAFARI_ERRLOG, + errlog = schizo_read(p->pbm_B.controller_regs + SCHIZO_SAFARI_ERRLOG); + schizo_write(p->pbm_B.controller_regs + SCHIZO_SAFARI_ERRLOG, errlog & ~(SAFARI_ERRLOG_ERROUT)); - if (!(errlog & SAFARI_ERROR_UNMAP)) { - printk("SCHIZO%d: Unexpected Safari error interrupt, errlog[%016lx]\n", + if (!(errlog & BUS_ERROR_UNMAP)) { + printk("PCI%d: Unexpected Safari/JBUS error interrupt, errlog[%016lx]\n", p->index, errlog); schizo_clear_other_err_intr(irq); return; } - printk("SCHIZO%d: Safari interrupt, UNMAPPED error, interrogating IOMMUs.\n", + printk("PCI%d: Safari/JBUS interrupt, UNMAPPED error, interrogating IOMMUs.\n", p->index); schizo_check_iommu_error(p, SAFARI_ERR); @@ -1083,131 +1177,279 @@ #define SCHIZO_PCIERR_B_INO 0x33 /* PBM B PCI bus error */ #define SCHIZO_SERR_INO 0x34 /* Safari interface error */ -#define SCHIZO_PCIA_CTRL (SCHIZO_PBM_A_REGS_OFF + 0x2000UL) -#define SCHIZO_PCIB_CTRL (SCHIZO_PBM_B_REGS_OFF + 0x2000UL) -#define SCHIZO_PCICTRL_BUS_UNUS (1UL << 63UL) -#define SCHIZO_PCICTRL_ESLCK (1UL << 51UL) -#define SCHIZO_PCICTRL_ERRSLOT (7UL << 48UL) -#define SCHIZO_PCICTRL_TTO_ERR (1UL << 38UL) -#define SCHIZO_PCICTRL_RTRY_ERR (1UL << 37UL) -#define SCHIZO_PCICTRL_DTO_ERR (1UL << 36UL) -#define SCHIZO_PCICTRL_SBH_ERR (1UL << 35UL) -#define SCHIZO_PCICTRL_SERR (1UL << 34UL) -#define SCHIZO_PCICTRL_PCISPD (1UL << 33UL) -#define SCHIZO_PCICTRL_PTO (3UL << 24UL) -#define SCHIZO_PCICTRL_DTO_INT (1UL << 19UL) -#define SCHIZO_PCICTRL_SBH_INT (1UL << 18UL) -#define SCHIZO_PCICTRL_EEN (1UL << 17UL) -#define SCHIZO_PCICTRL_PARK (1UL << 16UL) -#define SCHIZO_PCICTRL_PCIRST (1UL << 8UL) -#define SCHIZO_PCICTRL_ARB (0x3fUL << 0UL) +struct pci_pbm_info *pbm_for_ino(struct pci_controller_info *p, u32 ino) +{ + ino &= IMAP_INO; + if (p->pbm_A.ino_bitmap & (1UL << ino)) + return &p->pbm_A; + if (p->pbm_B.ino_bitmap & (1UL << ino)) + return &p->pbm_B; + prom_printf("TOMATILLO%d: No entry in ino bitmap for %d\n", + p->index, ino); + prom_halt(); + /* NOTREACHED */ + return NULL; +} + +/* How the Tomatillo IRQs are routed around is pure guesswork here. + * + * All the Tomatillo devices I see in prtconf dumps seem to have only + * a single PCI bus unit attached to it. It would seem they are seperate + * devices because their PortID (ie. JBUS ID) values are all different + * and thus the registers are mapped to totally different locations. + * + * However, two Tomatillo's look "similar" in that the only difference + * in their PortID is the lowest bit. + * + * So if we were to ignore this lower bit, it certainly looks like two + * PCI bus units of the same Tomatillo. I still have not really + * figured this out... + */ +static void __init tomatillo_register_error_handlers(struct pci_controller_info *p) +{ + struct pci_pbm_info *pbm; + unsigned int irq; + struct ino_bucket *bucket; + u64 tmp, err_mask, err_no_mask; + + /* Build IRQs and register handlers. */ + pbm = pbm_for_ino(p, SCHIZO_UE_INO); + irq = schizo_irq_build(pbm, NULL, (pbm->portid << 6) | SCHIZO_UE_INO); + if (request_irq(irq, schizo_ue_intr, + SA_SHIRQ, "TOMATILLO UE", p) < 0) { + prom_printf("%s: Cannot register UE interrupt.\n", + pbm->name); + prom_halt(); + } + bucket = __bucket(irq); + tmp = readl(bucket->imap); + upa_writel(tmp, (pbm->pbm_regs + + schizo_imap_offset(SCHIZO_UE_INO) + 4)); + + pbm = pbm_for_ino(p, SCHIZO_CE_INO); + irq = schizo_irq_build(pbm, NULL, (pbm->portid << 6) | SCHIZO_CE_INO); + if (request_irq(irq, schizo_ce_intr, + SA_SHIRQ, "TOMATILLO CE", p) < 0) { + prom_printf("%s: Cannot register CE interrupt.\n", + pbm->name); + prom_halt(); + } + bucket = __bucket(irq); + tmp = upa_readl(bucket->imap); + upa_writel(tmp, (pbm->pbm_regs + + schizo_imap_offset(SCHIZO_CE_INO) + 4)); + + pbm = pbm_for_ino(p, SCHIZO_PCIERR_A_INO); + irq = schizo_irq_build(pbm, NULL, ((pbm->portid << 6) | + SCHIZO_PCIERR_A_INO)); + if (request_irq(irq, schizo_pcierr_intr, + SA_SHIRQ, "TOMATILLO PCIERR", pbm) < 0) { + prom_printf("%s: Cannot register PBM A PciERR interrupt.\n", + pbm->name); + prom_halt(); + } + bucket = __bucket(irq); + tmp = upa_readl(bucket->imap); + upa_writel(tmp, (pbm->pbm_regs + + schizo_imap_offset(SCHIZO_PCIERR_A_INO) + 4)); + + pbm = pbm_for_ino(p, SCHIZO_PCIERR_B_INO); + irq = schizo_irq_build(pbm, NULL, ((pbm->portid << 6) | + SCHIZO_PCIERR_B_INO)); + if (request_irq(irq, schizo_pcierr_intr, + SA_SHIRQ, "TOMATILLO PCIERR", pbm) < 0) { + prom_printf("%s: Cannot register PBM B PciERR interrupt.\n", + pbm->name); + prom_halt(); + } + bucket = __bucket(irq); + tmp = upa_readl(bucket->imap); + upa_writel(tmp, (pbm->pbm_regs + + schizo_imap_offset(SCHIZO_PCIERR_B_INO) + 4)); + + pbm = pbm_for_ino(p, SCHIZO_SERR_INO); + irq = schizo_irq_build(pbm, NULL, (pbm->portid << 6) | SCHIZO_SERR_INO); + if (request_irq(irq, schizo_safarierr_intr, + SA_SHIRQ, "TOMATILLO SERR", p) < 0) { + prom_printf("%s: Cannot register SafariERR interrupt.\n", + pbm->name); + prom_halt(); + } + bucket = __bucket(irq); + tmp = upa_readl(bucket->imap); + upa_writel(tmp, (pbm->pbm_regs + + schizo_imap_offset(SCHIZO_SERR_INO) + 4)); + + /* Enable UE and CE interrupts for controller. */ + schizo_write(p->pbm_A.controller_regs + SCHIZO_ECC_CTRL, + (SCHIZO_ECCCTRL_EE | + SCHIZO_ECCCTRL_UE | + SCHIZO_ECCCTRL_CE)); + + schizo_write(p->pbm_B.controller_regs + SCHIZO_ECC_CTRL, + (SCHIZO_ECCCTRL_EE | + SCHIZO_ECCCTRL_UE | + SCHIZO_ECCCTRL_CE)); + + /* Enable PCI Error interrupts and clear error + * bits. + */ + err_mask = (SCHIZO_PCICTRL_BUS_UNUS | + SCHIZO_PCICTRL_TTO_ERR | + SCHIZO_PCICTRL_RTRY_ERR | + SCHIZO_PCICTRL_SERR | + SCHIZO_PCICTRL_EEN); + + err_no_mask = SCHIZO_PCICTRL_DTO_ERR; + + tmp = schizo_read(p->pbm_A.pbm_regs + SCHIZO_PCI_CTRL); + tmp |= err_mask; + tmp &= ~err_no_mask; + schizo_write(p->pbm_A.pbm_regs + SCHIZO_PCI_CTRL, tmp); + + tmp = schizo_read(p->pbm_B.pbm_regs + SCHIZO_PCI_CTRL); + tmp |= err_mask; + tmp &= ~err_no_mask; + schizo_write(p->pbm_B.pbm_regs + SCHIZO_PCI_CTRL, tmp); + + err_mask = (SCHIZO_PCIAFSR_PMA | SCHIZO_PCIAFSR_PTA | + SCHIZO_PCIAFSR_PRTRY | SCHIZO_PCIAFSR_PPERR | + SCHIZO_PCIAFSR_PTTO | + SCHIZO_PCIAFSR_SMA | SCHIZO_PCIAFSR_STA | + SCHIZO_PCIAFSR_SRTRY | SCHIZO_PCIAFSR_SPERR | + SCHIZO_PCIAFSR_STTO); + + schizo_write(p->pbm_A.pbm_regs + SCHIZO_PCI_AFSR, err_mask); + schizo_write(p->pbm_B.pbm_regs + SCHIZO_PCI_AFSR, err_mask); + + err_mask = (BUS_ERROR_BADCMD | BUS_ERROR_SNOOP_GR | + BUS_ERROR_SNOOP_PCI | BUS_ERROR_SNOOP_RD | + BUS_ERROR_SNOOP_RDS | BUS_ERROR_SNOOP_RDSA | + BUS_ERROR_SNOOP_OWN | BUS_ERROR_SNOOP_RDO | + BUS_ERROR_WDATA_PERR | BUS_ERROR_CTRL_PERR | + BUS_ERROR_SNOOP_ERR | BUS_ERROR_JBUS_ILL_B | + BUS_ERROR_JBUS_ILL_C | BUS_ERROR_RD_PERR | + BUS_ERROR_APERR | BUS_ERROR_UNMAP | + BUS_ERROR_BUSERR | BUS_ERROR_TIMEOUT); + + schizo_write(p->pbm_A.controller_regs + SCHIZO_SAFARI_ERRCTRL, + (SCHIZO_SAFERRCTRL_EN | err_mask)); + schizo_write(p->pbm_B.controller_regs + SCHIZO_SAFARI_ERRCTRL, + (SCHIZO_SAFERRCTRL_EN | err_mask)); + + schizo_write(p->pbm_A.controller_regs + SCHIZO_SAFARI_IRQCTRL, + (SCHIZO_SAFIRQCTRL_EN | (BUS_ERROR_UNMAP))); + schizo_write(p->pbm_B.controller_regs + SCHIZO_SAFARI_IRQCTRL, + (SCHIZO_SAFIRQCTRL_EN | (BUS_ERROR_UNMAP))); +} static void __init schizo_register_error_handlers(struct pci_controller_info *p) { - struct pci_pbm_info *pbm_a = &p->pbm_A; - struct pci_pbm_info *pbm_b = &p->pbm_B; - unsigned long base = p->controller_regs; - unsigned int irq, portid = p->portid; + struct pci_pbm_info *pbm; + unsigned int irq; struct ino_bucket *bucket; - u64 tmp; + u64 tmp, err_mask, err_no_mask; /* Build IRQs and register handlers. */ - irq = schizo_irq_build(pbm_b, NULL, (portid << 6) | SCHIZO_UE_INO); + pbm = pbm_for_ino(p, SCHIZO_UE_INO); + irq = schizo_irq_build(pbm, NULL, (pbm->portid << 6) | SCHIZO_UE_INO); if (request_irq(irq, schizo_ue_intr, SA_SHIRQ, "SCHIZO UE", p) < 0) { - prom_printf("SCHIZO%d: Cannot register UE interrupt.\n", - p->index); + prom_printf("%s: Cannot register UE interrupt.\n", + pbm->name); prom_halt(); } bucket = __bucket(irq); tmp = readl(bucket->imap); - upa_writel(tmp, (base + SCHIZO_PBM_B_REGS_OFF + schizo_imap_offset(SCHIZO_UE_INO) + 4)); + upa_writel(tmp, (pbm->pbm_regs + schizo_imap_offset(SCHIZO_UE_INO) + 4)); - irq = schizo_irq_build(pbm_b, NULL, (portid << 6) | SCHIZO_CE_INO); + pbm = pbm_for_ino(p, SCHIZO_CE_INO); + irq = schizo_irq_build(pbm, NULL, (pbm->portid << 6) | SCHIZO_CE_INO); if (request_irq(irq, schizo_ce_intr, SA_SHIRQ, "SCHIZO CE", p) < 0) { - prom_printf("SCHIZO%d: Cannot register CE interrupt.\n", - p->index); + prom_printf("%s: Cannot register CE interrupt.\n", + pbm->name); prom_halt(); } bucket = __bucket(irq); tmp = upa_readl(bucket->imap); - upa_writel(tmp, (base + SCHIZO_PBM_B_REGS_OFF + schizo_imap_offset(SCHIZO_CE_INO) + 4)); + upa_writel(tmp, (pbm->pbm_regs + schizo_imap_offset(SCHIZO_CE_INO) + 4)); - irq = schizo_irq_build(pbm_a, NULL, (portid << 6) | SCHIZO_PCIERR_A_INO); + pbm = pbm_for_ino(p, SCHIZO_PCIERR_A_INO); + irq = schizo_irq_build(pbm, NULL, (pbm->portid << 6) | SCHIZO_PCIERR_A_INO); if (request_irq(irq, schizo_pcierr_intr, - SA_SHIRQ, "SCHIZO PCIERR", pbm_a) < 0) { - prom_printf("SCHIZO%d(PBMA): Cannot register PciERR interrupt.\n", - p->index); + SA_SHIRQ, "SCHIZO PCIERR", pbm) < 0) { + prom_printf("%s: Cannot register PBM A PciERR interrupt.\n", + pbm->name); prom_halt(); } bucket = __bucket(irq); tmp = upa_readl(bucket->imap); - upa_writel(tmp, (base + SCHIZO_PBM_A_REGS_OFF + schizo_imap_offset(SCHIZO_PCIERR_A_INO) + 4)); + upa_writel(tmp, (pbm->pbm_regs + schizo_imap_offset(SCHIZO_PCIERR_A_INO) + 4)); - irq = schizo_irq_build(pbm_b, NULL, (portid << 6) | SCHIZO_PCIERR_B_INO); + pbm = pbm_for_ino(p, SCHIZO_PCIERR_B_INO); + irq = schizo_irq_build(pbm, NULL, (pbm->portid << 6) | SCHIZO_PCIERR_B_INO); if (request_irq(irq, schizo_pcierr_intr, - SA_SHIRQ, "SCHIZO PCIERR", pbm_b) < 0) { - prom_printf("SCHIZO%d(PBMB): Cannot register PciERR interrupt.\n", - p->index); + SA_SHIRQ, "SCHIZO PCIERR", &p->pbm_B) < 0) { + prom_printf("%s: Cannot register PBM B PciERR interrupt.\n", + pbm->name); prom_halt(); } bucket = __bucket(irq); tmp = upa_readl(bucket->imap); - upa_writel(tmp, (base + SCHIZO_PBM_B_REGS_OFF + schizo_imap_offset(SCHIZO_PCIERR_B_INO) + 4)); + upa_writel(tmp, (pbm->pbm_regs + schizo_imap_offset(SCHIZO_PCIERR_B_INO) + 4)); - irq = schizo_irq_build(pbm_b, NULL, (portid << 6) | SCHIZO_SERR_INO); + pbm = pbm_for_ino(p, SCHIZO_SERR_INO); + irq = schizo_irq_build(pbm, NULL, (pbm->portid << 6) | SCHIZO_SERR_INO); if (request_irq(irq, schizo_safarierr_intr, SA_SHIRQ, "SCHIZO SERR", p) < 0) { - prom_printf("SCHIZO%d(PBMB): Cannot register SafariERR interrupt.\n", - p->index); + prom_printf("%s: Cannot register SafariERR interrupt.\n", + pbm->name); prom_halt(); } bucket = __bucket(irq); tmp = upa_readl(bucket->imap); - upa_writel(tmp, (base + SCHIZO_PBM_B_REGS_OFF + schizo_imap_offset(SCHIZO_SERR_INO) + 4)); + upa_writel(tmp, (pbm->pbm_regs + schizo_imap_offset(SCHIZO_SERR_INO) + 4)); /* Enable UE and CE interrupts for controller. */ - schizo_write(base + SCHIZO_ECC_CTRL, + schizo_write(p->pbm_A.controller_regs + SCHIZO_ECC_CTRL, (SCHIZO_ECCCTRL_EE | SCHIZO_ECCCTRL_UE | SCHIZO_ECCCTRL_CE)); + err_mask = (SCHIZO_PCICTRL_BUS_UNUS | + SCHIZO_PCICTRL_ESLCK | + SCHIZO_PCICTRL_TTO_ERR | + SCHIZO_PCICTRL_RTRY_ERR | + SCHIZO_PCICTRL_SBH_ERR | + SCHIZO_PCICTRL_SERR | + SCHIZO_PCICTRL_SBH_INT | + SCHIZO_PCICTRL_EEN); + + err_no_mask = SCHIZO_PCICTRL_DTO_ERR; + /* Enable PCI Error interrupts and clear error * bits for each PBM. */ - tmp = schizo_read(base + SCHIZO_PCIA_CTRL); - tmp |= (SCHIZO_PCICTRL_BUS_UNUS | - SCHIZO_PCICTRL_ESLCK | - SCHIZO_PCICTRL_TTO_ERR | - SCHIZO_PCICTRL_RTRY_ERR | - SCHIZO_PCICTRL_DTO_ERR | - SCHIZO_PCICTRL_SBH_ERR | - SCHIZO_PCICTRL_SERR | - SCHIZO_PCICTRL_SBH_INT | - SCHIZO_PCICTRL_EEN); - schizo_write(base + SCHIZO_PCIA_CTRL, tmp); - - tmp = schizo_read(base + SCHIZO_PCIB_CTRL); - tmp |= (SCHIZO_PCICTRL_BUS_UNUS | - SCHIZO_PCICTRL_ESLCK | - SCHIZO_PCICTRL_TTO_ERR | - SCHIZO_PCICTRL_RTRY_ERR | - SCHIZO_PCICTRL_DTO_ERR | - SCHIZO_PCICTRL_SBH_ERR | - SCHIZO_PCICTRL_SERR | - SCHIZO_PCICTRL_SBH_INT | - SCHIZO_PCICTRL_EEN); - schizo_write(base + SCHIZO_PCIB_CTRL, tmp); + tmp = schizo_read(p->pbm_A.pbm_regs + SCHIZO_PCI_CTRL); + tmp |= err_mask; + tmp &= ~err_no_mask; + schizo_write(p->pbm_A.pbm_regs + SCHIZO_PCI_CTRL, tmp); - schizo_write(base + SCHIZO_PBM_A_REGS_OFF + SCHIZO_PCI_AFSR, + schizo_write(p->pbm_A.pbm_regs + SCHIZO_PCI_AFSR, (SCHIZO_PCIAFSR_PMA | SCHIZO_PCIAFSR_PTA | SCHIZO_PCIAFSR_PRTRY | SCHIZO_PCIAFSR_PPERR | SCHIZO_PCIAFSR_PTTO | SCHIZO_PCIAFSR_PUNUS | SCHIZO_PCIAFSR_SMA | SCHIZO_PCIAFSR_STA | SCHIZO_PCIAFSR_SRTRY | SCHIZO_PCIAFSR_SPERR | SCHIZO_PCIAFSR_STTO | SCHIZO_PCIAFSR_SUNUS)); - schizo_write(base + SCHIZO_PBM_B_REGS_OFF + SCHIZO_PCI_AFSR, + + tmp = schizo_read(p->pbm_B.pbm_regs + SCHIZO_PCI_CTRL); + tmp |= err_mask; + tmp &= ~err_no_mask; + schizo_write(p->pbm_B.pbm_regs + SCHIZO_PCI_CTRL, tmp); + + schizo_write(p->pbm_B.pbm_regs + SCHIZO_PCI_AFSR, (SCHIZO_PCIAFSR_PMA | SCHIZO_PCIAFSR_PTA | SCHIZO_PCIAFSR_PRTRY | SCHIZO_PCIAFSR_PPERR | SCHIZO_PCIAFSR_PTTO | SCHIZO_PCIAFSR_PUNUS | @@ -1215,9 +1457,19 @@ SCHIZO_PCIAFSR_SRTRY | SCHIZO_PCIAFSR_SPERR | SCHIZO_PCIAFSR_STTO | SCHIZO_PCIAFSR_SUNUS)); - /* Make all Safari error conditions fatal except unmapped errors - * which we make generate interrupts. + /* Make all Safari error conditions fatal except unmapped + * errors which we make generate interrupts. */ + err_mask = (BUS_ERROR_BADCMD | BUS_ERROR_SSMDIS | + BUS_ERROR_BADMA | BUS_ERROR_BADMB | + BUS_ERROR_BADMC | + BUS_ERROR_CPU1PS | BUS_ERROR_CPU1PB | + BUS_ERROR_CPU0PS | BUS_ERROR_CPU0PB | + BUS_ERROR_CIQTO | + BUS_ERROR_LPQTO | BUS_ERROR_SFPQTO | + BUS_ERROR_UFPQTO | BUS_ERROR_APERR | + BUS_ERROR_BUSERR | BUS_ERROR_TIMEOUT | + BUS_ERROR_ILL); #if 1 /* XXX Something wrong with some Excalibur systems * XXX Sun is shipping. The behavior on a 2-cpu @@ -1226,53 +1478,26 @@ * XXX their error status bits are cleared. Just * XXX ignore them for now. -DaveM */ - schizo_write(base + SCHIZO_SAFARI_ERRCTRL, - (SCHIZO_SAFERRCTRL_EN | - (SAFARI_ERROR_BADCMD | SAFARI_ERROR_SSMDIS | - SAFARI_ERROR_BADMA | SAFARI_ERROR_BADMB | - SAFARI_ERROR_BADMC | - SAFARI_ERROR_CIQTO | - SAFARI_ERROR_LPQTO | SAFARI_ERROR_SFPQTO | - SAFARI_ERROR_UFPQTO | SAFARI_ERROR_APERR | - SAFARI_ERROR_BUSERR | SAFARI_ERROR_TIMEOUT | - SAFARI_ERROR_ILL))); -#else - schizo_write(base + SCHIZO_SAFARI_ERRCTRL, - (SCHIZO_SAFERRCTRL_EN | - (SAFARI_ERROR_BADCMD | SAFARI_ERROR_SSMDIS | - SAFARI_ERROR_BADMA | SAFARI_ERROR_BADMB | - SAFARI_ERROR_BADMC | - SAFARI_ERROR_CPU1PS | SAFARI_ERROR_CPU1PB | - SAFARI_ERROR_CPU0PS | SAFARI_ERROR_CPU0PB | - SAFARI_ERROR_CIQTO | - SAFARI_ERROR_LPQTO | SAFARI_ERROR_SFPQTO | - SAFARI_ERROR_UFPQTO | SAFARI_ERROR_APERR | - SAFARI_ERROR_BUSERR | SAFARI_ERROR_TIMEOUT | - SAFARI_ERROR_ILL))); + err_mask &= ~(BUS_ERROR_CPU1PS | BUS_ERROR_CPU1PB | + BUS_ERROR_CPU0PS | BUS_ERROR_CPU0PB); #endif - schizo_write(base + SCHIZO_SAFARI_IRQCTRL, - (SCHIZO_SAFIRQCTRL_EN | (SAFARI_ERROR_UNMAP))); + schizo_write(p->pbm_A.controller_regs + SCHIZO_SAFARI_ERRCTRL, + (SCHIZO_SAFERRCTRL_EN | err_mask)); + + schizo_write(p->pbm_A.controller_regs + SCHIZO_SAFARI_IRQCTRL, + (SCHIZO_SAFIRQCTRL_EN | (BUS_ERROR_UNMAP))); } /* We have to do the config space accesses by hand, thus... */ -#define PBM_BRIDGE_BUS 0x40 -#define PBM_BRIDGE_SUBORDINATE 0x41 static void __init pbm_renumber(struct pci_pbm_info *pbm, u8 orig_busno) { - u8 *addr, busno; + u8 busno; int nbus; busno = pci_highest_busnum; nbus = pbm->pci_last_busno - pbm->pci_first_busno; - addr = schizo_pci_config_mkaddr(pbm, orig_busno, - 0, PBM_BRIDGE_BUS); - pci_config_write8(addr, busno); - addr = schizo_pci_config_mkaddr(pbm, busno, - 0, PBM_BRIDGE_SUBORDINATE); - pci_config_write8(addr, busno + nbus); - pbm->pci_first_busno = busno; pbm->pci_last_busno = busno + nbus; pci_highest_busnum = busno + nbus + 1; @@ -1282,75 +1507,8 @@ } while (nbus--); } -/* We have to do the config space accesses by hand here since - * the pci_bus2pbm array is not ready yet. - */ -static void __init pbm_pci_bridge_renumber(struct pci_pbm_info *pbm, - u8 busno) -{ - u32 devfn, l, class; - u8 hdr_type; - int is_multi = 0; - - for(devfn = 0; devfn < 0xff; ++devfn) { - u32 *dwaddr; - u8 *baddr; - - if (PCI_FUNC(devfn) != 0 && is_multi == 0) - continue; - - /* Anything there? */ - dwaddr = schizo_pci_config_mkaddr(pbm, busno, devfn, PCI_VENDOR_ID); - l = 0xffffffff; - pci_config_read32(dwaddr, &l); - if (l == 0xffffffff || l == 0x00000000 || - l == 0x0000ffff || l == 0xffff0000) { - is_multi = 0; - continue; - } - - baddr = schizo_pci_config_mkaddr(pbm, busno, devfn, PCI_HEADER_TYPE); - pci_config_read8(baddr, &hdr_type); - if (PCI_FUNC(devfn) == 0) - is_multi = hdr_type & 0x80; - - dwaddr = schizo_pci_config_mkaddr(pbm, busno, devfn, PCI_CLASS_REVISION); - class = 0xffffffff; - pci_config_read32(dwaddr, &class); - if ((class >> 16) == PCI_CLASS_BRIDGE_PCI) { - u32 buses = 0xffffffff; - - dwaddr = schizo_pci_config_mkaddr(pbm, busno, devfn, - PCI_PRIMARY_BUS); - pci_config_read32(dwaddr, &buses); - pbm_pci_bridge_renumber(pbm, (buses >> 8) & 0xff); - buses &= 0xff000000; - pci_config_write32(dwaddr, buses); - } - } -} - static void __init pbm_bridge_reconfigure(struct pci_controller_info *p) { - struct pci_pbm_info *pbm; - u8 *addr; - - /* Clear out primary/secondary/subordinate bus numbers on - * all PCI-to-PCI bridges under each PBM. The generic bus - * probing will fix them up. - */ - pbm_pci_bridge_renumber(&p->pbm_B, p->pbm_B.pci_first_busno); - pbm_pci_bridge_renumber(&p->pbm_A, p->pbm_A.pci_first_busno); - - /* Move PBM A out of the way. */ - pbm = &p->pbm_A; - addr = schizo_pci_config_mkaddr(pbm, pbm->pci_first_busno, - 0, PBM_BRIDGE_BUS); - pci_config_write8(addr, 0xff); - addr = schizo_pci_config_mkaddr(pbm, 0xff, - 0, PBM_BRIDGE_SUBORDINATE); - pci_config_write8(addr, 0xff); - /* Now we can safely renumber both PBMs. */ pbm_renumber(&p->pbm_B, p->pbm_B.pci_first_busno); pbm_renumber(&p->pbm_A, 0xff); @@ -1379,7 +1537,7 @@ struct pcidev_cookie *cookie = kmalloc(sizeof(*cookie), GFP_KERNEL); if (!cookie) { - prom_printf("SCHIZO: Critical allocation failure.\n"); + prom_printf("%s: Critical allocation failure.\n", pbm->name); prom_halt(); } @@ -1401,20 +1559,42 @@ pci_setup_busmastering(pbm, pbm->pci_bus); } -static void __init schizo_scan_bus(struct pci_controller_info *p) +static void __init __schizo_scan_bus(struct pci_controller_info *p, + int chip_type) { + if (!p->pbm_B.prom_node || !p->pbm_A.prom_node) { + printk("PCI: Only one PCI bus module of controller found.\n"); + printk("PCI: Ignoring entire controller.\n"); + return; + } + pbm_bridge_reconfigure(p); pbm_config_busmastering(&p->pbm_B); - p->pbm_B.is_66mhz_capable = 0; + p->pbm_B.is_66mhz_capable = + prom_getbool(p->pbm_B.prom_node, "66mhz-capable"); pbm_config_busmastering(&p->pbm_A); - p->pbm_A.is_66mhz_capable = 1; + p->pbm_A.is_66mhz_capable = + prom_getbool(p->pbm_A.prom_node, "66mhz-capable"); pbm_scan_bus(p, &p->pbm_B); pbm_scan_bus(p, &p->pbm_A); /* After the PCI bus scan is complete, we can register * the error interrupt handlers. */ - schizo_register_error_handlers(p); + if (chip_type == PBM_CHIP_TYPE_TOMATILLO) + tomatillo_register_error_handlers(p); + else + schizo_register_error_handlers(p); +} + +static void __init schizo_scan_bus(struct pci_controller_info *p) +{ + __schizo_scan_bus(p, PBM_CHIP_TYPE_SCHIZO); +} + +static void __init tomatillo_scan_bus(struct pci_controller_info *p) +{ + __schizo_scan_bus(p, PBM_CHIP_TYPE_TOMATILLO); } static void __init schizo_base_address_update(struct pci_dev *pdev, int resource) @@ -1470,68 +1650,72 @@ res->end += root->start; } -/* Interrogate Safari match/mask registers to figure out where - * PCI MEM, I/O, and Config space are for this PCI bus module. +/* Use ranges property to determine where PCI MEM, I/O, and Config + * space are for this PCI bus module. */ +static void schizo_determine_mem_io_space(struct pci_pbm_info *pbm) +{ + int i, saw_cfg, saw_mem, saw_io; -#define SCHIZO_PCI_A_MEM_MATCH 0x00040UL -#define SCHIZO_PCI_A_MEM_MASK 0x00048UL -#define SCHIZO_PCI_A_IO_MATCH 0x00050UL -#define SCHIZO_PCI_A_IO_MASK 0x00058UL -#define SCHIZO_PCI_B_MEM_MATCH 0x00060UL -#define SCHIZO_PCI_B_MEM_MASK 0x00068UL -#define SCHIZO_PCI_B_IO_MATCH 0x00070UL -#define SCHIZO_PCI_B_IO_MASK 0x00078UL - -static void schizo_determine_mem_io_space(struct pci_pbm_info *pbm, - int is_pbm_a, unsigned long reg_base) -{ - u64 mem_match, mem_mask; - u64 io_match; - u64 a; - - if (is_pbm_a) { - mem_match = reg_base + SCHIZO_PCI_A_MEM_MATCH; - io_match = reg_base + SCHIZO_PCI_A_IO_MATCH; - } else { - mem_match = reg_base + SCHIZO_PCI_B_MEM_MATCH; - io_match = reg_base + SCHIZO_PCI_B_IO_MATCH; - } - mem_mask = mem_match + 0x8UL; + saw_cfg = saw_mem = saw_io = 0; + for (i = 0; i < pbm->num_pbm_ranges; i++) { + struct linux_prom_pci_ranges *pr = &pbm->pbm_ranges[i]; + unsigned long a; + int type; - a = schizo_read(mem_match) & ~0x8000000000000000UL; + type = (pr->child_phys_hi >> 24) & 0x3; + a = (((unsigned long)pr->parent_phys_hi << 32UL) | + ((unsigned long)pr->parent_phys_lo << 0UL)); - /* It should be 2GB in size but the decode is set for the full - * 4GB so we have to add the 2G by hand. - */ - pbm->mem_space.start = a; - pbm->mem_space.end = a + 0x80000000; - pbm->mem_space.flags = IORESOURCE_MEM; + switch (type) { + case 0: + /* PCI config space, 16MB */ + pbm->config_space = a; + saw_cfg = 1; + break; - /* This 32MB area is divided into two pieces. The first - * 16MB is Config space, the next 16MB is I/O space. - */ + case 1: + /* 16-bit IO space, 16MB */ + pbm->io_space.start = a; + pbm->io_space.end = a + ((16UL*1024UL*1024UL) - 1UL); + pbm->io_space.flags = IORESOURCE_IO; + saw_io = 1; + break; - a = schizo_read(io_match) & ~0x8000000000000000UL; - pbm->config_space = a; - printk("SCHIZO PBM%c: Local PCI config space at %016lx\n", - (is_pbm_a ? 'A' : 'B'), pbm->config_space); + case 2: + /* 32-bit MEM space, 2GB */ + pbm->mem_space.start = a; + pbm->mem_space.end = a + (0x80000000UL - 1UL); + pbm->mem_space.flags = IORESOURCE_MEM; + saw_mem = 1; + break; + + default: + break; + }; + } - a += (16UL * 1024UL * 1024UL); - pbm->io_space.start = a; - pbm->io_space.end = a + ((16UL * 1024UL * 1024UL) - 1UL); - pbm->io_space.flags = IORESOURCE_IO; + if (!saw_cfg || !saw_io || !saw_mem) { + prom_printf("%s: Fatal error, missing %s PBM range.\n", + pbm->name, + ((!saw_cfg ? + "CFG" : + (!saw_io ? + "IO" : "MEM")))); + prom_halt(); + } + + printk("%s: PCI CFG[%lx] IO[%lx] MEM[%lx]\n", + pbm->name, + pbm->config_space, + pbm->io_space.start, + pbm->mem_space.start); } static void __init pbm_register_toplevel_resources(struct pci_controller_info *p, struct pci_pbm_info *pbm) { - char *name = pbm->name; - - sprintf(name, "SCHIZO%d PBM%c", - p->index, - (pbm == &p->pbm_A ? 'A' : 'B')); - pbm->io_space.name = pbm->mem_space.name = name; + pbm->io_space.name = pbm->mem_space.name = pbm->name; request_resource(&ioport_resource, &pbm->io_space); request_resource(&iomem_resource, &pbm->mem_space); @@ -1539,40 +1723,29 @@ &pbm->mem_space); } -#define SCHIZO_STRBUF_CONTROL_A (SCHIZO_PBM_A_REGS_OFF + 0x02800UL) -#define SCHIZO_STRBUF_FLUSH_A (SCHIZO_PBM_A_REGS_OFF + 0x02808UL) -#define SCHIZO_STRBUF_FSYNC_A (SCHIZO_PBM_A_REGS_OFF + 0x02810UL) -#define SCHIZO_STRBUF_CTXFLUSH_A (SCHIZO_PBM_A_REGS_OFF + 0x02818UL) -#define SCHIZO_STRBUF_CTXMATCH_A (SCHIZO_PBM_A_REGS_OFF + 0x10000UL) - -#define SCHIZO_STRBUF_CONTROL_B (SCHIZO_PBM_B_REGS_OFF + 0x02800UL) -#define SCHIZO_STRBUF_FLUSH_B (SCHIZO_PBM_B_REGS_OFF + 0x02808UL) -#define SCHIZO_STRBUF_FSYNC_B (SCHIZO_PBM_B_REGS_OFF + 0x02810UL) -#define SCHIZO_STRBUF_CTXFLUSH_B (SCHIZO_PBM_B_REGS_OFF + 0x02818UL) -#define SCHIZO_STRBUF_CTXMATCH_B (SCHIZO_PBM_B_REGS_OFF + 0x10000UL) - -static void schizo_pbm_strbuf_init(struct pci_controller_info *p, - struct pci_pbm_info *pbm, - int is_pbm_a) +#define SCHIZO_STRBUF_CONTROL (0x02800UL) +#define SCHIZO_STRBUF_FLUSH (0x02808UL) +#define SCHIZO_STRBUF_FSYNC (0x02810UL) +#define SCHIZO_STRBUF_CTXFLUSH (0x02818UL) +#define SCHIZO_STRBUF_CTXMATCH (0x10000UL) + +static void schizo_pbm_strbuf_init(struct pci_pbm_info *pbm) { - unsigned long base = p->controller_regs; + unsigned long base = pbm->pbm_regs; u64 control; - /* SCHIZO has context flushing. */ - if (is_pbm_a) { - pbm->stc.strbuf_control = base + SCHIZO_STRBUF_CONTROL_A; - pbm->stc.strbuf_pflush = base + SCHIZO_STRBUF_FLUSH_A; - pbm->stc.strbuf_fsync = base + SCHIZO_STRBUF_FSYNC_A; - pbm->stc.strbuf_ctxflush = base + SCHIZO_STRBUF_CTXFLUSH_A; - pbm->stc.strbuf_ctxmatch_base = base + SCHIZO_STRBUF_CTXMATCH_A; - } else { - pbm->stc.strbuf_control = base + SCHIZO_STRBUF_CONTROL_B; - pbm->stc.strbuf_pflush = base + SCHIZO_STRBUF_FLUSH_B; - pbm->stc.strbuf_fsync = base + SCHIZO_STRBUF_FSYNC_B; - pbm->stc.strbuf_ctxflush = base + SCHIZO_STRBUF_CTXFLUSH_B; - pbm->stc.strbuf_ctxmatch_base = base + SCHIZO_STRBUF_CTXMATCH_B; + if (pbm->chip_type == PBM_CHIP_TYPE_TOMATILLO) { + /* TOMATILLO lacks streaming cache. */ + return; } + /* SCHIZO has context flushing. */ + pbm->stc.strbuf_control = base + SCHIZO_STRBUF_CONTROL; + pbm->stc.strbuf_pflush = base + SCHIZO_STRBUF_FLUSH; + pbm->stc.strbuf_fsync = base + SCHIZO_STRBUF_FSYNC; + pbm->stc.strbuf_ctxflush = base + SCHIZO_STRBUF_CTXFLUSH; + pbm->stc.strbuf_ctxmatch_base = base + SCHIZO_STRBUF_CTXMATCH; + pbm->stc.strbuf_flushflag = (volatile unsigned long *) ((((unsigned long)&pbm->stc.__flushflag_buf[0]) + 63UL) @@ -1594,48 +1767,63 @@ pbm->stc.strbuf_enabled = 1; } -#define SCHIZO_IOMMU_CONTROL_A (SCHIZO_PBM_A_REGS_OFF + 0x00200UL) -#define SCHIZO_IOMMU_TSBBASE_A (SCHIZO_PBM_A_REGS_OFF + 0x00208UL) -#define SCHIZO_IOMMU_FLUSH_A (SCHIZO_PBM_A_REGS_OFF + 0x00210UL) -#define SCHIZO_IOMMU_CTXFLUSH_A (SCHIZO_PBM_A_REGS_OFF + 0x00218UL) -#define SCHIZO_IOMMU_TAG_A (SCHIZO_PBM_A_REGS_OFF + 0x0a580UL) -#define SCHIZO_IOMMU_DATA_A (SCHIZO_PBM_A_REGS_OFF + 0x0a600UL) -#define SCHIZO_IOMMU_CONTROL_B (SCHIZO_PBM_B_REGS_OFF + 0x00200UL) -#define SCHIZO_IOMMU_TSBBASE_B (SCHIZO_PBM_B_REGS_OFF + 0x00208UL) -#define SCHIZO_IOMMU_FLUSH_B (SCHIZO_PBM_B_REGS_OFF + 0x00210UL) -#define SCHIZO_IOMMU_CTXFLUSH_B (SCHIZO_PBM_B_REGS_OFF + 0x00218UL) -#define SCHIZO_IOMMU_TAG_B (SCHIZO_PBM_B_REGS_OFF + 0x0a580UL) -#define SCHIZO_IOMMU_DATA_B (SCHIZO_PBM_B_REGS_OFF + 0x0a600UL) - -static void schizo_pbm_iommu_init(struct pci_controller_info *p, - struct pci_pbm_info *pbm, - int is_pbm_a) +#define SCHIZO_IOMMU_CONTROL (0x00200UL) +#define SCHIZO_IOMMU_TSBBASE (0x00208UL) +#define SCHIZO_IOMMU_FLUSH (0x00210UL) +#define SCHIZO_IOMMU_CTXFLUSH (0x00218UL) + +static void schizo_pbm_iommu_init(struct pci_pbm_info *pbm) { struct pci_iommu *iommu = pbm->iommu; - unsigned long tsbbase, i, tagbase, database; + unsigned long tsbbase, i, tagbase, database, order; + u32 vdma[2], dma_mask; u64 control; + int err, tsbsize; + + err = prom_getproperty(pbm->prom_node, "virtual-dma", + (char *)&vdma[0], sizeof(vdma)); + if (err == 0 || err == -1) { + /* No property, use default values. */ + vdma[0] = 0xc0000000; + vdma[1] = 0x40000000; + } + + dma_mask = vdma[0]; + switch (vdma[1]) { + case 0x20000000: + dma_mask |= 0x1fffffff; + tsbsize = 64; + break; + + case 0x40000000: + dma_mask |= 0x3fffffff; + tsbsize = 128; + break; + + case 0x80000000: + dma_mask |= 0x7fffffff; + tsbsize = 128; + break; + + default: + prom_printf("SCHIZO: strange virtual-dma size.\n"); + prom_halt(); + }; /* Setup initial software IOMMU state. */ spin_lock_init(&iommu->lock); iommu->iommu_cur_ctx = 0; /* Register addresses, SCHIZO has iommu ctx flushing. */ - if (is_pbm_a) { - iommu->iommu_control = p->controller_regs + SCHIZO_IOMMU_CONTROL_A; - iommu->iommu_tsbbase = p->controller_regs + SCHIZO_IOMMU_TSBBASE_A; - iommu->iommu_flush = p->controller_regs + SCHIZO_IOMMU_FLUSH_A; - iommu->iommu_ctxflush = p->controller_regs + SCHIZO_IOMMU_CTXFLUSH_A; - } else { - iommu->iommu_control = p->controller_regs + SCHIZO_IOMMU_CONTROL_B; - iommu->iommu_tsbbase = p->controller_regs + SCHIZO_IOMMU_TSBBASE_B; - iommu->iommu_flush = p->controller_regs + SCHIZO_IOMMU_FLUSH_B; - iommu->iommu_ctxflush = p->controller_regs + SCHIZO_IOMMU_CTXFLUSH_B; - } + iommu->iommu_control = pbm->pbm_regs + SCHIZO_IOMMU_CONTROL; + iommu->iommu_tsbbase = pbm->pbm_regs + SCHIZO_IOMMU_TSBBASE; + iommu->iommu_flush = pbm->pbm_regs + SCHIZO_IOMMU_FLUSH; + iommu->iommu_ctxflush = pbm->pbm_regs + SCHIZO_IOMMU_CTXFLUSH; /* We use the main control/status register of SCHIZO as the write * completion register. */ - iommu->write_complete_reg = p->controller_regs + 0x10000UL; + iommu->write_complete_reg = pbm->controller_regs + 0x10000UL; /* * Invalidate TLB Entries. @@ -1644,13 +1832,11 @@ control |= SCHIZO_IOMMU_CTRL_DENAB; schizo_write(iommu->iommu_control, control); - if (is_pbm_a) - tagbase = SCHIZO_IOMMU_TAG_A, database = SCHIZO_IOMMU_DATA_A; - else - tagbase = SCHIZO_IOMMU_TAG_B, database = SCHIZO_IOMMU_DATA_B; + tagbase = SCHIZO_IOMMU_TAG, database = SCHIZO_IOMMU_DATA; + for(i = 0; i < 16; i++) { - schizo_write(p->controller_regs + tagbase + (i * 8UL), 0); - schizo_write(p->controller_regs + database + (i * 8UL), 0); + schizo_write(pbm->pbm_regs + tagbase + (i * 8UL), 0); + schizo_write(pbm->pbm_regs + database + (i * 8UL), 0); } /* Leave diag mode enabled for full-flushing done @@ -1661,16 +1847,32 @@ * table (128K ioptes * 8 bytes per iopte). This is * page order 7 on UltraSparc. */ - tsbbase = __get_free_pages(GFP_KERNEL, get_order(IO_TSB_SIZE)); + order = get_order(tsbsize * 8 * 1024); + tsbbase = __get_free_pages(GFP_KERNEL, order); if (!tsbbase) { - prom_printf("SCHIZO_IOMMU: Error, gfp(tsb) failed.\n"); + prom_printf("%s: Error, gfp(tsb) failed.\n", pbm->name); prom_halt(); } + iommu->page_table = (iopte_t *)tsbbase; - iommu->page_table_sz_bits = 17; - iommu->page_table_map_base = 0xc0000000; - iommu->dma_addr_mask = 0xffffffff; - memset((char *)tsbbase, 0, IO_TSB_SIZE); + iommu->page_table_map_base = vdma[0]; + iommu->dma_addr_mask = dma_mask; + memset((char *)tsbbase, 0, PAGE_SIZE << order); + + switch (tsbsize) { + case 64: + iommu->page_table_sz_bits = 16; + break; + + case 128: + iommu->page_table_sz_bits = 17; + break; + + default: + prom_printf("iommu_init: Illegal TSB size %d\n", tsbsize); + prom_halt(); + break; + }; /* We start with no consistent mappings. */ iommu->lowest_consistent_map = @@ -1685,28 +1887,194 @@ control = schizo_read(iommu->iommu_control); control &= ~(SCHIZO_IOMMU_CTRL_TSBSZ | SCHIZO_IOMMU_CTRL_TBWSZ); - control |= (SCHIZO_IOMMU_TSBSZ_128K | SCHIZO_IOMMU_CTRL_ENAB); + switch (tsbsize) { + case 64: + control |= SCHIZO_IOMMU_TSBSZ_64K; + break; + case 128: + control |= SCHIZO_IOMMU_TSBSZ_128K; + break; + }; + + control |= SCHIZO_IOMMU_CTRL_ENAB; schizo_write(iommu->iommu_control, control); } -static void schizo_pbm_init(struct pci_controller_info *p, - int prom_node, int is_pbm_a) +#define SCHIZO_PCI_IRQ_RETRY (0x1a00UL) +#define SCHIZO_IRQ_RETRY_INF 0xffUL + +#define SCHIZO_PCI_DIAG (0x2020UL) +#define SCHIZO_PCIDIAG_D_BADECC (1UL << 10UL) /* Disable BAD ECC errors (Schizo) */ +#define SCHIZO_PCIDIAG_D_BYPASS (1UL << 9UL) /* Disable MMU bypass mode (Schizo/Tomatillo) */ +#define SCHIZO_PCIDIAG_D_TTO (1UL << 8UL) /* Disable TTO errors (Schizo/Tomatillo) */ +#define SCHIZO_PCIDIAG_D_RTRYARB (1UL << 7UL) /* Disable retry arbitration (Schizo) */ +#define SCHIZO_PCIDIAG_D_RETRY (1UL << 6UL) /* Disable retry limit (Schizo/Tomatillo) */ +#define SCHIZO_PCIDIAG_D_INTSYNC (1UL << 5UL) /* Disable interrupt/DMA synch (Schizo/Tomatillo) */ +#define SCHIZO_PCIDIAG_I_DMA_PARITY (1UL << 3UL) /* Invert DMA parity (Schizo/Tomatillo) */ +#define SCHIZO_PCIDIAG_I_PIOD_PARITY (1UL << 2UL) /* Invert PIO data parity (Schizo/Tomatillo) */ +#define SCHIZO_PCIDIAG_I_PIOA_PARITY (1UL << 1UL) /* Invert PIO address parity (Schizo/Tomatillo) */ + +#define TOMATILLO_PCI_IOC_CSR (0x2248UL) +#define TOMATILLO_IOC_PART_WPENAB 0x0000000000080000UL +#define TOMATILLO_IOC_RDMULT_PENAB 0x0000000000040000UL +#define TOMATILLO_IOC_RDONE_PENAB 0x0000000000020000UL +#define TOMATILLO_IOC_RDLINE_PENAB 0x0000000000010000UL +#define TOMATILLO_IOC_RDMULT_PLEN 0x000000000000c000UL +#define TOMATILLO_IOC_RDMULT_PLEN_SHIFT 14UL +#define TOMATILLO_IOC_RDONE_PLEN 0x0000000000003000UL +#define TOMATILLO_IOC_RDONE_PLEN_SHIFT 12UL +#define TOMATILLO_IOC_RDLINE_PLEN 0x0000000000000c00UL +#define TOMATILLO_IOC_RDLINE_PLEN_SHIFT 10UL +#define TOMATILLO_IOC_PREF_OFF 0x00000000000003f8UL +#define TOMATILLO_IOC_PREF_OFF_SHIFT 3UL +#define TOMATILLO_IOC_RDMULT_CPENAB 0x0000000000000004UL +#define TOMATILLO_IOC_RDONE_CPENAB 0x0000000000000002UL +#define TOMATILLO_IOC_RDLINE_CPENAB 0x0000000000000001UL + +#define TOMATILLO_PCI_IOC_TDIAG (0x2250UL) +#define TOMATILLO_PCI_IOC_DDIAG (0x2290UL) + +static void __init schizo_pbm_hw_init(struct pci_pbm_info *pbm) { + u64 tmp; + + /* Set IRQ retry to infinity. */ + schizo_write(pbm->pbm_regs + SCHIZO_PCI_IRQ_RETRY, + SCHIZO_IRQ_RETRY_INF); + + /* Enable arbiter for all PCI slots. Also, disable PCI interval + * timer so that DTO (Discard TimeOuts) are not reported because + * some Schizo revisions report them erroneously. + */ + tmp = schizo_read(pbm->pbm_regs + SCHIZO_PCI_CTRL); + if (pbm->chip_type == PBM_CHIP_TYPE_SCHIZO_PLUS && + pbm->chip_version == 0x5 && + pbm->chip_revision == 0x1) + tmp |= 0x0f; + else + tmp |= 0xff; + + tmp &= ~SCHIZO_PCICTRL_PTO; + if (pbm->chip_type == PBM_CHIP_TYPE_TOMATILLO && + pbm->chip_version == 0x2) + tmp |= 0x3UL << SCHIZO_PCICTRL_PTO_SHIFT; + else + tmp |= 0x1UL << SCHIZO_PCICTRL_PTO_SHIFT; + + if (!prom_getbool(pbm->prom_node, "no-bus-parking")) + tmp |= SCHIZO_PCICTRL_PARK; + + if (pbm->chip_type == PBM_CHIP_TYPE_TOMATILLO) + tmp |= SCHIZO_PCICTRL_MRM_PREF; + + schizo_write(pbm->pbm_regs + SCHIZO_PCI_CTRL, tmp); + + tmp = schizo_read(pbm->pbm_regs + SCHIZO_PCI_DIAG); + tmp &= ~(SCHIZO_PCIDIAG_D_RTRYARB | + SCHIZO_PCIDIAG_D_RETRY | + SCHIZO_PCIDIAG_D_INTSYNC); + schizo_write(pbm->pbm_regs + SCHIZO_PCI_DIAG, tmp); + + if (pbm->chip_type == PBM_CHIP_TYPE_TOMATILLO) { + /* Clear prefetch lengths to workaround a bug in + * Jalapeno... + */ + tmp = (TOMATILLO_IOC_PART_WPENAB | + (1 << TOMATILLO_IOC_PREF_OFF_SHIFT) | + TOMATILLO_IOC_RDMULT_CPENAB | + TOMATILLO_IOC_RDONE_CPENAB | + TOMATILLO_IOC_RDLINE_CPENAB); + + schizo_write(pbm->pbm_regs + TOMATILLO_PCI_IOC_CSR, + tmp); + } +} + +static void __init schizo_pbm_init(struct pci_controller_info *p, + int prom_node, u32 portid, + int chip_type) +{ + struct linux_prom64_registers pr_regs[4]; unsigned int busrange[2]; struct pci_pbm_info *pbm; + const char *chipset_name; + u32 ino_bitmap[2]; + int is_pbm_a; int err; + switch (chip_type) { + case PBM_CHIP_TYPE_TOMATILLO: + chipset_name = "TOMATILLO"; + break; + + case PBM_CHIP_TYPE_SCHIZO_PLUS: + chipset_name = "SCHIZO+"; + break; + + case PBM_CHIP_TYPE_SCHIZO: + default: + chipset_name = "SCHIZO"; + break; + }; + + /* For SCHIZO, three OBP regs: + * 1) PBM controller regs + * 2) Schizo front-end controller regs (same for both PBMs) + * 3) PBM PCI config space + * + * For TOMATILLO, four OBP regs: + * 1) PBM controller regs + * 2) Tomatillo front-end controller regs + * 3) PBM PCI config space + * 4) Ichip regs + */ + err = prom_getproperty(prom_node, "reg", + (char *)&pr_regs[0], + sizeof(pr_regs)); + if (err == 0 || err == -1) { + prom_printf("%s: Fatal error, no reg property.\n", + chipset_name); + prom_halt(); + } + + is_pbm_a = ((pr_regs[0].phys_addr & 0x00700000) == 0x00600000); + if (is_pbm_a) pbm = &p->pbm_A; else pbm = &p->pbm_B; - schizo_determine_mem_io_space(pbm, is_pbm_a, p->controller_regs); - pbm_register_toplevel_resources(p, pbm); - + pbm->portid = portid; pbm->parent = p; pbm->prom_node = prom_node; pbm->pci_first_slot = 1; + + pbm->chip_type = chip_type; + pbm->chip_version = + prom_getintdefault(prom_node, "version#", 0); + pbm->chip_revision = + prom_getintdefault(prom_node, "module-revision#", 0); + + pbm->pbm_regs = pr_regs[0].phys_addr; + pbm->controller_regs = pr_regs[1].phys_addr - 0x10000UL; + + sprintf(pbm->name, + (chip_type == PBM_CHIP_TYPE_TOMATILLO ? + "TOMATILLO%d PBM%c" : + "SCHIZO%d PBM%c"), + p->index, + (pbm == &p->pbm_A ? 'A' : 'B')); + + printk("%s: ver[%x:%x], portid %x, " + "cregs[%lx] pregs[%lx]\n", + pbm->name, + pbm->chip_version, pbm->chip_revision, + pbm->portid, + pbm->controller_regs, + pbm->pbm_regs); + + schizo_pbm_hw_init(pbm); + prom_getstring(prom_node, "name", pbm->prom_name, sizeof(pbm->prom_name)); @@ -1714,11 +2082,17 @@ err = prom_getproperty(prom_node, "ranges", (char *) pbm->pbm_ranges, sizeof(pbm->pbm_ranges)); - if (err != -1) - pbm->num_pbm_ranges = - (err / sizeof(struct linux_prom_pci_ranges)); - else - pbm->num_pbm_ranges = 0; + if (err == 0 || err == -1) { + prom_printf("%s: Fatal error, no ranges property.\n", + pbm->name); + prom_halt(); + } + + pbm->num_pbm_ranges = + (err / sizeof(struct linux_prom_pci_ranges)); + + schizo_determine_mem_io_space(pbm); + pbm_register_toplevel_resources(p, pbm); err = prom_getproperty(prom_node, "interrupt-map", (char *)pbm->pbm_intmap, @@ -1729,8 +2103,8 @@ (char *)&pbm->pbm_intmask, sizeof(pbm->pbm_intmask)); if (err == -1) { - prom_printf("SCHIZO-PBM: Fatal error, no " - "interrupt-map-mask.\n"); + prom_printf("%s: Fatal error, no " + "interrupt-map-mask.\n", pbm->name); prom_halt(); } } else { @@ -1738,95 +2112,65 @@ memset(&pbm->pbm_intmask, 0, sizeof(pbm->pbm_intmask)); } + err = prom_getproperty(prom_node, "ino-bitmap", + (char *) &ino_bitmap[0], + sizeof(ino_bitmap)); + if (err == 0 || err == -1) { + prom_printf("%s: Fatal error, no ino-bitmap.\n", pbm->name); + prom_halt(); + } + pbm->ino_bitmap = (((u64)ino_bitmap[1] << 32UL) | + ((u64)ino_bitmap[0] << 0UL)); + err = prom_getproperty(prom_node, "bus-range", (char *)&busrange[0], sizeof(busrange)); if (err == 0 || err == -1) { - prom_printf("SCHIZO-PBM: Fatal error, no bus-range.\n"); + prom_printf("%s: Fatal error, no bus-range.\n", pbm->name); prom_halt(); } pbm->pci_first_busno = busrange[0]; pbm->pci_last_busno = busrange[1]; - schizo_pbm_iommu_init(p, pbm, is_pbm_a); - schizo_pbm_strbuf_init(p, pbm, is_pbm_a); + schizo_pbm_iommu_init(pbm); + schizo_pbm_strbuf_init(pbm); } -#define SCHIZO_PCIA_IRQ_RETRY (SCHIZO_PBM_A_REGS_OFF + 0x1a00UL) -#define SCHIZO_PCIB_IRQ_RETRY (SCHIZO_PBM_B_REGS_OFF + 0x1a00UL) -#define SCHIZO_IRQ_RETRY_INF 0xffUL - -#define SCHIZO_PCIA_DIAG (SCHIZO_PBM_A_REGS_OFF + 0x2020UL) -#define SCHIZO_PCIB_DIAG (SCHIZO_PBM_B_REGS_OFF + 0x2020UL) -#define SCHIZO_PCIDIAG_D_BADECC (1UL << 10UL) /* Disable BAD ECC errors */ -#define SCHIZO_PCIDIAG_D_BYPASS (1UL << 9UL) /* Disable MMU bypass mode */ -#define SCHIZO_PCIDIAG_D_TTO (1UL << 8UL) /* Disable TTO errors */ -#define SCHIZO_PCIDIAG_D_RTRYARB (1UL << 7UL) /* Disable retry arbitration */ -#define SCHIZO_PCIDIAG_D_RETRY (1UL << 6UL) /* Disable retry limit */ -#define SCHIZO_PCIDIAG_D_INTSYNC (1UL << 5UL) /* Disable interrupt/DMA synch */ -#define SCHIZO_PCIDIAG_I_DMA_PARITY (1UL << 3UL) /* Invert DMA parity */ -#define SCHIZO_PCIDIAG_I_PIOD_PARITY (1UL << 2UL) /* Invert PIO data parity */ -#define SCHIZO_PCIDIAG_I_PIOA_PARITY (1UL << 1U)L /* Invert PIO address parity */ - -static void schizo_controller_hwinit(struct pci_controller_info *p) +static inline int portid_compare(u32 x, u32 y, int chip_type) { - unsigned long pbm_a_base, pbm_b_base; - u64 tmp; - - pbm_a_base = p->controller_regs + SCHIZO_PBM_A_REGS_OFF; - pbm_b_base = p->controller_regs + SCHIZO_PBM_B_REGS_OFF; - - /* Set IRQ retry to infinity. */ - schizo_write(p->controller_regs + SCHIZO_PCIA_IRQ_RETRY, - SCHIZO_IRQ_RETRY_INF); - schizo_write(p->controller_regs + SCHIZO_PCIB_IRQ_RETRY, - SCHIZO_IRQ_RETRY_INF); - - /* Enable arbiter for all PCI slots. Also, disable PCI interval - * timer so that DTO (Discard TimeOuts) are not reported because - * some Schizo revisions report them erroneously. - */ - - tmp = schizo_read(p->controller_regs + SCHIZO_PCIA_CTRL); - tmp |= SCHIZO_PCICTRL_ARB; - tmp &= ~SCHIZO_PCICTRL_PTO; - schizo_write(p->controller_regs + SCHIZO_PCIA_CTRL, tmp); - - tmp = schizo_read(p->controller_regs + SCHIZO_PCIB_CTRL); - tmp |= SCHIZO_PCICTRL_ARB; - tmp &= ~SCHIZO_PCICTRL_PTO; - schizo_write(p->controller_regs + SCHIZO_PCIB_CTRL, tmp); - - /* Disable TTO error reporting (won't happen anyway since we - * disabled the PCI interval timer above) and retry arbitration - * (can cause hangs in some Schizo revisions). - */ - tmp = schizo_read(p->controller_regs + SCHIZO_PCIA_DIAG); - tmp |= (SCHIZO_PCIDIAG_D_TTO | SCHIZO_PCIDIAG_D_RTRYARB); - schizo_write(p->controller_regs + SCHIZO_PCIA_DIAG, tmp); - - tmp = schizo_read(p->controller_regs + SCHIZO_PCIB_DIAG); - tmp |= (SCHIZO_PCIDIAG_D_TTO | SCHIZO_PCIDIAG_D_RTRYARB); - schizo_write(p->controller_regs + SCHIZO_PCIB_DIAG, tmp); + if (chip_type == PBM_CHIP_TYPE_TOMATILLO) { + if (x == (y ^ 1)) + return 1; + return 0; + } + return (x == y); } -void __init schizo_init(int node, char *model_name) +static void __init __schizo_init(int node, char *model_name, int chip_type) { - struct linux_prom64_registers pr_regs[3]; struct pci_controller_info *p; struct pci_iommu *iommu; unsigned long flags; + int is_pbm_a; u32 portid; - int is_pbm_a, err; portid = prom_getintdefault(node, "portid", 0xff); spin_lock_irqsave(&pci_controller_lock, flags); for(p = pci_controller_root; p; p = p->next) { - if (p->portid == portid) { + struct pci_pbm_info *pbm; + + if (p->pbm_A.prom_node && p->pbm_B.prom_node) + continue; + + pbm = (p->pbm_A.prom_node ? + &p->pbm_A : + &p->pbm_B); + + if (portid_compare(pbm->portid, portid, chip_type)) { spin_unlock_irqrestore(&pci_controller_lock, flags); is_pbm_a = (p->pbm_A.prom_node == 0); - schizo_pbm_init(p, node, is_pbm_a); + schizo_pbm_init(p, node, portid, chip_type); return; } } @@ -1860,38 +2204,33 @@ pci_controller_root = p; spin_unlock_irqrestore(&pci_controller_lock, flags); - p->portid = portid; p->index = pci_num_controllers++; p->pbms_same_domain = 0; - p->scan_bus = schizo_scan_bus; + p->scan_bus = (chip_type == PBM_CHIP_TYPE_TOMATILLO ? + tomatillo_scan_bus : + schizo_scan_bus); p->irq_build = schizo_irq_build; p->base_address_update = schizo_base_address_update; p->resource_adjust = schizo_resource_adjust; p->pci_ops = &schizo_ops; - /* Three OBP regs: - * 1) PBM controller regs - * 2) Schizo front-end controller regs (same for both PBMs) - * 3) PBM PCI config space - */ - err = prom_getproperty(node, "reg", - (char *)&pr_regs[0], - sizeof(pr_regs)); - if (err == 0 || err == -1) { - prom_printf("SCHIZO: Fatal error, no reg property.\n"); - prom_halt(); - } - - p->controller_regs = pr_regs[1].phys_addr - 0x10000UL; - printk("PCI: Found SCHIZO, control regs at %016lx\n", - p->controller_regs); - /* Like PSYCHO we have a 2GB aligned area for memory space. */ pci_memspace_mask = 0x7fffffffUL; - /* Init core controller. */ - schizo_controller_hwinit(p); + schizo_pbm_init(p, node, portid, chip_type); +} - is_pbm_a = ((pr_regs[0].phys_addr & 0x00700000) == 0x00600000); - schizo_pbm_init(p, node, is_pbm_a); +void __init schizo_init(int node, char *model_name) +{ + __schizo_init(node, model_name, PBM_CHIP_TYPE_SCHIZO); +} + +void __init schizo_plus_init(int node, char *model_name) +{ + __schizo_init(node, model_name, PBM_CHIP_TYPE_SCHIZO_PLUS); +} + +void __init tomatillo_init(int node, char *model_name) +{ + __schizo_init(node, model_name, PBM_CHIP_TYPE_TOMATILLO); } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sparc64/kernel/setup.c linux-2.4.23-pre8/arch/sparc64/kernel/setup.c --- linux-2.4.22/arch/sparc64/kernel/setup.c 2002-11-28 23:53:12.000000000 +0000 +++ linux-2.4.23-pre8/arch/sparc64/kernel/setup.c 2003-10-22 22:48:26.000000000 +0000 @@ -604,8 +604,8 @@ /* BUFFER is PAGE_SIZE bytes long. */ -extern char *sparc_cpu_type[]; -extern char *sparc_fpu_type[]; +extern char *sparc_cpu_type; +extern char *sparc_fpu_type; extern void smp_info(struct seq_file *); extern void smp_bogo(struct seq_file *); @@ -617,8 +617,6 @@ static int show_cpuinfo(struct seq_file *m, void *__unused) { - int cpuid = smp_processor_id(); - seq_printf(m, "cpu\t\t: %s\n" "fpu\t\t: %s\n" @@ -632,8 +630,8 @@ "Cpu0ClkTck\t: %016lx\n" #endif , - sparc_cpu_type[cpuid], - sparc_fpu_type[cpuid], + sparc_cpu_type, + sparc_fpu_type, prom_rev, prom_prev >> 16, (prom_prev >> 8) & 0xff, diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sparc64/kernel/smp.c linux-2.4.23-pre8/arch/sparc64/kernel/smp.c --- linux-2.4.22/arch/sparc64/kernel/smp.c 2003-06-13 14:51:32.000000000 +0000 +++ linux-2.4.23-pre8/arch/sparc64/kernel/smp.c 2003-10-22 22:47:28.000000000 +0000 @@ -133,7 +133,6 @@ static volatile unsigned long callin_flag = 0; extern void inherit_locked_prom_mappings(int save_p); -extern void cpu_probe(void); void __init smp_callin(void) { @@ -153,8 +152,6 @@ __flush_cache_all(); __flush_tlb_all(); - cpu_probe(); - smp_setup_percpu_timer(); __sti(); @@ -537,12 +534,19 @@ #endif static void cheetah_xcall_deliver(u64 data0, u64 data1, u64 data2, unsigned long mask) { - u64 pstate; - int nack_busy_id; + u64 pstate, ver; + int nack_busy_id, is_jalapeno; if (!mask) return; + /* Unfortunately, someone at Sun had the brilliant idea to make the + * busy/nack fields hard-coded by ITID number for this Ultra-III + * derivative processor. + */ + __asm__ ("rdpr %%ver, %0" : "=r" (ver)); + is_jalapeno = ((ver >> 32) == 0x003e0016); + __asm__ __volatile__("rdpr %%pstate, %0" : "=r" (pstate)); retry: @@ -567,11 +571,13 @@ if (mask & (1UL << i)) { u64 target = (i << 14) | 0x70; - target |= (nack_busy_id++ << 24); + if (!is_jalapeno) + target |= (nack_busy_id << 24); __asm__ __volatile__("stxa %%g0, [%0] %1\n\t" "membar #Sync\n\t" : /* no outputs */ : "r" (target), "i" (ASI_INTR_W)); + nack_busy_id++; ncpus--; } } @@ -618,7 +624,14 @@ */ for (i = 0; i < NR_CPUS; i++) { if (mask & (1UL << i)) { - if ((dispatch_stat & (0x2 << this_busy_nack)) == 0) + u64 check_mask; + + if (is_jalapeno) + check_mask = (0x2UL << (2*i)); + else + check_mask = (0x2UL << + this_busy_nack); + if ((dispatch_stat & check_mask) == 0) mask &= ~(1UL << i); this_busy_nack += 2; } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sparc64/kernel/sys_sparc32.c linux-2.4.23-pre8/arch/sparc64/kernel/sys_sparc32.c --- linux-2.4.22/arch/sparc64/kernel/sys_sparc32.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/sparc64/kernel/sys_sparc32.c 2003-10-22 22:49:07.000000000 +0000 @@ -415,7 +415,7 @@ * * This is really horribly ugly. */ -#define IPCOP_MASK(__x) (1UL << (__x)) +#define IPCOP_MASK(__x) (1UL << ((__x)&~IPC_64)) static int do_sys32_semctl(int first, int second, int third, void *uptr) { union semun fourth; @@ -427,7 +427,7 @@ err = -EFAULT; if (get_user (pad, (u32 *)uptr)) goto out; - if(third == SETVAL) + if ((third & ~IPC_64) == SETVAL) fourth.val = (int)pad; else fourth.__pad = (void *)A(pad); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sparc64/kernel/sys_sunos32.c linux-2.4.23-pre8/arch/sparc64/kernel/sys_sunos32.c --- linux-2.4.22/arch/sparc64/kernel/sys_sunos32.c 2002-11-28 23:53:12.000000000 +0000 +++ linux-2.4.23-pre8/arch/sparc64/kernel/sys_sunos32.c 2003-10-22 22:49:05.000000000 +0000 @@ -157,7 +157,7 @@ * fool it, but this should catch most mistakes. */ freepages = atomic_read(&buffermem_pages) >> PAGE_SHIFT; - freepages += atomic_read(&page_cache_size); + freepages += page_cache_size; freepages >>= 1; freepages += nr_free_pages(); freepages += nr_swap_pages; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sparc64/kernel/time.c linux-2.4.23-pre8/arch/sparc64/kernel/time.c --- linux-2.4.22/arch/sparc64/kernel/time.c 2003-06-13 14:51:32.000000000 +0000 +++ linux-2.4.23-pre8/arch/sparc64/kernel/time.c 2003-10-22 22:48:56.000000000 +0000 @@ -775,6 +775,7 @@ strcmp(model, "mk48t08") && strcmp(model, "mk48t59") && strcmp(model, "m5819") && + strcmp(model, "m5819p") && strcmp(model, "ds1287")) { if (cbus != NULL) { prom_printf("clock_probe: Central bus lacks timer chip.\n"); @@ -833,7 +834,8 @@ } if (!strcmp(model, "ds1287") || - !strcmp(model, "m5819")) { + !strcmp(model, "m5819") || + !strcmp(model, "m5819p")) { ds1287_regs = edev->resource[0].start; } else { mstk48t59_regs = edev->resource[0].start; @@ -853,7 +855,8 @@ prom_halt(); } if (!strcmp(model, "ds1287") || - !strcmp(model, "m5819")) { + !strcmp(model, "m5819") || + !strcmp(model, "m5819p")) { ds1287_regs = isadev->resource.start; } else { mstk48t59_regs = isadev->resource.start; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sparc64/kernel/traps.c linux-2.4.23-pre8/arch/sparc64/kernel/traps.c --- linux-2.4.22/arch/sparc64/kernel/traps.c 2003-06-13 14:51:32.000000000 +0000 +++ linux-2.4.23-pre8/arch/sparc64/kernel/traps.c 2003-10-22 22:49:48.000000000 +0000 @@ -401,6 +401,179 @@ }; #define CHAFSR_INVALID ((u64)-1L) +/* This table is ordered in priority of errors and matches the + * AFAR overwrite policy as well. + */ + +struct afsr_error_table { + unsigned long mask; + const char *name; +}; + +static const char CHAFSR_PERR_msg[] = + "System interface protocol error"; +static const char CHAFSR_IERR_msg[] = + "Internal processor error"; +static const char CHAFSR_ISAP_msg[] = + "System request parity error on incoming addresss"; +static const char CHAFSR_UCU_msg[] = + "Uncorrectable E-cache ECC error for ifetch/data"; +static const char CHAFSR_UCC_msg[] = + "SW Correctable E-cache ECC error for ifetch/data"; +static const char CHAFSR_UE_msg[] = + "Uncorrectable system bus data ECC error for read"; +static const char CHAFSR_EDU_msg[] = + "Uncorrectable E-cache ECC error for stmerge/blkld"; +static const char CHAFSR_EMU_msg[] = + "Uncorrectable system bus MTAG error"; +static const char CHAFSR_WDU_msg[] = + "Uncorrectable E-cache ECC error for writeback"; +static const char CHAFSR_CPU_msg[] = + "Uncorrectable ECC error for copyout"; +static const char CHAFSR_CE_msg[] = + "HW corrected system bus data ECC error for read"; +static const char CHAFSR_EDC_msg[] = + "HW corrected E-cache ECC error for stmerge/blkld"; +static const char CHAFSR_EMC_msg[] = + "HW corrected system bus MTAG ECC error"; +static const char CHAFSR_WDC_msg[] = + "HW corrected E-cache ECC error for writeback"; +static const char CHAFSR_CPC_msg[] = + "HW corrected ECC error for copyout"; +static const char CHAFSR_TO_msg[] = + "Unmapped error from system bus"; +static const char CHAFSR_BERR_msg[] = + "Bus error response from system bus"; +static const char CHAFSR_IVC_msg[] = + "HW corrected system bus data ECC error for ivec read"; +static const char CHAFSR_IVU_msg[] = + "Uncorrectable system bus data ECC error for ivec read"; +static struct afsr_error_table __cheetah_error_table[] = { + { CHAFSR_PERR, CHAFSR_PERR_msg }, + { CHAFSR_IERR, CHAFSR_IERR_msg }, + { CHAFSR_ISAP, CHAFSR_ISAP_msg }, + { CHAFSR_UCU, CHAFSR_UCU_msg }, + { CHAFSR_UCC, CHAFSR_UCC_msg }, + { CHAFSR_UE, CHAFSR_UE_msg }, + { CHAFSR_EDU, CHAFSR_EDU_msg }, + { CHAFSR_EMU, CHAFSR_EMU_msg }, + { CHAFSR_WDU, CHAFSR_WDU_msg }, + { CHAFSR_CPU, CHAFSR_CPU_msg }, + { CHAFSR_CE, CHAFSR_CE_msg }, + { CHAFSR_EDC, CHAFSR_EDC_msg }, + { CHAFSR_EMC, CHAFSR_EMC_msg }, + { CHAFSR_WDC, CHAFSR_WDC_msg }, + { CHAFSR_CPC, CHAFSR_CPC_msg }, + { CHAFSR_TO, CHAFSR_TO_msg }, + { CHAFSR_BERR, CHAFSR_BERR_msg }, + /* These two do not update the AFAR. */ + { CHAFSR_IVC, CHAFSR_IVC_msg }, + { CHAFSR_IVU, CHAFSR_IVU_msg }, + { 0, NULL }, +}; +static const char CHPAFSR_DTO_msg[] = + "System bus unmapped error for prefetch/storequeue-read"; +static const char CHPAFSR_DBERR_msg[] = + "System bus error for prefetch/storequeue-read"; +static const char CHPAFSR_THCE_msg[] = + "Hardware corrected E-cache Tag ECC error"; +static const char CHPAFSR_TSCE_msg[] = + "SW handled correctable E-cache Tag ECC error"; +static const char CHPAFSR_TUE_msg[] = + "Uncorrectable E-cache Tag ECC error"; +static const char CHPAFSR_DUE_msg[] = + "System bus uncorrectable data ECC error due to prefetch/store-fill"; +static struct afsr_error_table __cheetah_plus_error_table[] = { + { CHAFSR_PERR, CHAFSR_PERR_msg }, + { CHAFSR_IERR, CHAFSR_IERR_msg }, + { CHAFSR_ISAP, CHAFSR_ISAP_msg }, + { CHAFSR_UCU, CHAFSR_UCU_msg }, + { CHAFSR_UCC, CHAFSR_UCC_msg }, + { CHAFSR_UE, CHAFSR_UE_msg }, + { CHAFSR_EDU, CHAFSR_EDU_msg }, + { CHAFSR_EMU, CHAFSR_EMU_msg }, + { CHAFSR_WDU, CHAFSR_WDU_msg }, + { CHAFSR_CPU, CHAFSR_CPU_msg }, + { CHAFSR_CE, CHAFSR_CE_msg }, + { CHAFSR_EDC, CHAFSR_EDC_msg }, + { CHAFSR_EMC, CHAFSR_EMC_msg }, + { CHAFSR_WDC, CHAFSR_WDC_msg }, + { CHAFSR_CPC, CHAFSR_CPC_msg }, + { CHAFSR_TO, CHAFSR_TO_msg }, + { CHAFSR_BERR, CHAFSR_BERR_msg }, + { CHPAFSR_DTO, CHPAFSR_DTO_msg }, + { CHPAFSR_DBERR, CHPAFSR_DBERR_msg }, + { CHPAFSR_THCE, CHPAFSR_THCE_msg }, + { CHPAFSR_TSCE, CHPAFSR_TSCE_msg }, + { CHPAFSR_TUE, CHPAFSR_TUE_msg }, + { CHPAFSR_DUE, CHPAFSR_DUE_msg }, + /* These two do not update the AFAR. */ + { CHAFSR_IVC, CHAFSR_IVC_msg }, + { CHAFSR_IVU, CHAFSR_IVU_msg }, + { 0, NULL }, +}; +static const char JPAFSR_JETO_msg[] = + "System interface protocol error, hw timeout caused"; +static const char JPAFSR_SCE_msg[] = + "Parity error on system snoop results"; +static const char JPAFSR_JEIC_msg[] = + "System interface protocol error, illegal command detected"; +static const char JPAFSR_JEIT_msg[] = + "System interface protocol error, illegal ADTYPE detected"; +static const char JPAFSR_OM_msg[] = + "Out of range memory error has occurred"; +static const char JPAFSR_ETP_msg[] = + "Parity error on L2 cache tag SRAM"; +static const char JPAFSR_UMS_msg[] = + "Error due to unsupported store"; +static const char JPAFSR_RUE_msg[] = + "Uncorrectable ECC error from remote cache/memory"; +static const char JPAFSR_RCE_msg[] = + "Correctable ECC error from remote cache/memory"; +static const char JPAFSR_BP_msg[] = + "JBUS parity error on returned read data"; +static const char JPAFSR_WBP_msg[] = + "JBUS parity error on data for writeback or block store"; +static const char JPAFSR_FRC_msg[] = + "Foreign read to DRAM incurring correctable ECC error"; +static const char JPAFSR_FRU_msg[] = + "Foreign read to DRAM incurring uncorrectable ECC error"; +static struct afsr_error_table __jalapeno_error_table[] = { + { JPAFSR_JETO, JPAFSR_JETO_msg }, + { JPAFSR_SCE, JPAFSR_SCE_msg }, + { JPAFSR_JEIC, JPAFSR_JEIC_msg }, + { JPAFSR_JEIT, JPAFSR_JEIT_msg }, + { CHAFSR_PERR, CHAFSR_PERR_msg }, + { CHAFSR_IERR, CHAFSR_IERR_msg }, + { CHAFSR_ISAP, CHAFSR_ISAP_msg }, + { CHAFSR_UCU, CHAFSR_UCU_msg }, + { CHAFSR_UCC, CHAFSR_UCC_msg }, + { CHAFSR_UE, CHAFSR_UE_msg }, + { CHAFSR_EDU, CHAFSR_EDU_msg }, + { JPAFSR_OM, JPAFSR_OM_msg }, + { CHAFSR_WDU, CHAFSR_WDU_msg }, + { CHAFSR_CPU, CHAFSR_CPU_msg }, + { CHAFSR_CE, CHAFSR_CE_msg }, + { CHAFSR_EDC, CHAFSR_EDC_msg }, + { JPAFSR_ETP, JPAFSR_ETP_msg }, + { CHAFSR_WDC, CHAFSR_WDC_msg }, + { CHAFSR_CPC, CHAFSR_CPC_msg }, + { CHAFSR_TO, CHAFSR_TO_msg }, + { CHAFSR_BERR, CHAFSR_BERR_msg }, + { JPAFSR_UMS, JPAFSR_UMS_msg }, + { JPAFSR_RUE, JPAFSR_RUE_msg }, + { JPAFSR_RCE, JPAFSR_RCE_msg }, + { JPAFSR_BP, JPAFSR_BP_msg }, + { JPAFSR_WBP, JPAFSR_WBP_msg }, + { JPAFSR_FRC, JPAFSR_FRC_msg }, + { JPAFSR_FRU, JPAFSR_FRU_msg }, + /* These two do not update the AFAR. */ + { CHAFSR_IVU, CHAFSR_IVU_msg }, + { 0, NULL }, +}; +static struct afsr_error_table *cheetah_error_table; +static unsigned long cheetah_afsr_errors; + /* This is allocated at boot time based upon the largest hardware * cpu ID in the system. We allocate two entries per cpu, one for * TL==0 logging and one for TL >= 1 logging. @@ -436,7 +609,7 @@ void cheetah_ecache_flush_init(void) { - unsigned long largest_size, smallest_linesize, order; + unsigned long largest_size, smallest_linesize, order, ver; char type[16]; int node, highest_cpu, i; @@ -522,6 +695,18 @@ for (i = 0; i < 2 * highest_cpu; i++) cheetah_error_log[i].afsr = CHAFSR_INVALID; + __asm__ ("rdpr %%ver, %0" : "=r" (ver)); + if ((ver >> 32) == 0x003e0016) { + cheetah_error_table = &__jalapeno_error_table[0]; + cheetah_afsr_errors = JPAFSR_ERRORS; + } else if ((ver >> 32) == 0x003e0015) { + cheetah_error_table = &__cheetah_plus_error_table[0]; + cheetah_afsr_errors = CHPAFSR_ERRORS; + } else { + cheetah_error_table = &__cheetah_error_table[0]; + cheetah_afsr_errors = CHAFSR_ERRORS; + } + /* Now patch trap tables. */ memcpy(tl0_fecc, cheetah_fecc_trap_vector, (8 * 4)); memcpy(tl1_fecc, cheetah_fecc_trap_vector_tl1, (8 * 4)); @@ -720,36 +905,6 @@ NONE, NONE }; -/* This table is ordered in priority of errors and matches the - * AFAR overwrite policy as well. - */ -static struct { - unsigned long mask; - char *name; -} cheetah_error_table[] = { - { CHAFSR_PERR, "System interface protocol error" }, - { CHAFSR_IERR, "Internal processor error" }, - { CHAFSR_ISAP, "System request parity error on incoming addresss" }, - { CHAFSR_UCU, "Uncorrectable E-cache ECC error for ifetch/data" }, - { CHAFSR_UCC, "SW Correctable E-cache ECC error for ifetch/data" }, - { CHAFSR_UE, "Uncorrectable system bus data ECC error for read" }, - { CHAFSR_EDU, "Uncorrectable E-cache ECC error for stmerge/blkld" }, - { CHAFSR_EMU, "Uncorrectable system bus MTAG error" }, - { CHAFSR_WDU, "Uncorrectable E-cache ECC error for writeback" }, - { CHAFSR_CPU, "Uncorrectable ECC error for copyout" }, - { CHAFSR_CE, "HW corrected system bus data ECC error for read" }, - { CHAFSR_EDC, "HW corrected E-cache ECC error for stmerge/blkld" }, - { CHAFSR_EMC, "HW corrected system bus MTAG ECC error" }, - { CHAFSR_WDC, "HW corrected E-cache ECC error for writeback" }, - { CHAFSR_CPC, "HW corrected ECC error for copyout" }, - { CHAFSR_TO, "Unmapped error from system bus" }, - { CHAFSR_BERR, "Bus error response from system bus" }, - /* These two do not update the AFAR. */ - { CHAFSR_IVC, "HW corrected system bus data ECC error for ivec read" }, - { CHAFSR_IVU, "Uncorrectable system bus data ECC error for ivec read" }, - { 0, NULL } -}; - /* Return the highest priority error conditon mentioned. */ static __inline__ unsigned long cheetah_get_hipri(unsigned long afsr) { @@ -763,7 +918,7 @@ return tmp; } -static char *cheetah_get_string(unsigned long bit) +static const char *cheetah_get_string(unsigned long bit) { int i; @@ -876,7 +1031,7 @@ info->ecache_data[2], info->ecache_data[3]); - afsr = (afsr & ~hipri) & CHAFSR_ERRORS; + afsr = (afsr & ~hipri) & cheetah_afsr_errors; while (afsr != 0UL) { unsigned long bit = cheetah_get_hipri(afsr); @@ -899,7 +1054,7 @@ __asm__ __volatile__("ldxa [%%g0] %1, %0\n\t" : "=r" (afsr) : "i" (ASI_AFSR)); - if ((afsr & CHAFSR_ERRORS) != 0) { + if ((afsr & cheetah_afsr_errors) != 0) { if (logp != NULL) { __asm__ __volatile__("ldxa [%%g0] %1, %0\n\t" : "=r" (afar) @@ -1125,12 +1280,12 @@ flush_all = flush_line = 0; if ((afsr & CHAFSR_EDC) != 0UL) { - if ((afsr & CHAFSR_ERRORS) == CHAFSR_EDC) + if ((afsr & cheetah_afsr_errors) == CHAFSR_EDC) flush_line = 1; else flush_all = 1; } else if ((afsr & CHAFSR_CPC) != 0UL) { - if ((afsr & CHAFSR_ERRORS) == CHAFSR_CPC) + if ((afsr & cheetah_afsr_errors) == CHAFSR_CPC) flush_line = 1; else flush_all = 1; @@ -1253,12 +1408,12 @@ flush_all = flush_line = 0; if ((afsr & CHAFSR_EDU) != 0UL) { - if ((afsr & CHAFSR_ERRORS) == CHAFSR_EDU) + if ((afsr & cheetah_afsr_errors) == CHAFSR_EDU) flush_line = 1; else flush_all = 1; } else if ((afsr & CHAFSR_BERR) != 0UL) { - if ((afsr & CHAFSR_ERRORS) == CHAFSR_BERR) + if ((afsr & cheetah_afsr_errors) == CHAFSR_BERR) flush_line = 1; else flush_all = 1; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/sparc64/kernel/unaligned.c linux-2.4.23-pre8/arch/sparc64/kernel/unaligned.c --- linux-2.4.22/arch/sparc64/kernel/unaligned.c 2001-04-12 19:10:25.000000000 +0000 +++ linux-2.4.23-pre8/arch/sparc64/kernel/unaligned.c 2003-10-22 22:48:26.000000000 +0000 @@ -479,7 +479,9 @@ extern void do_fpother(struct pt_regs *regs); extern void do_privact(struct pt_regs *regs); -extern void data_access_exception(struct pt_regs *regs); +extern void data_access_exception(struct pt_regs *regs, + unsigned long sfsr, + unsigned long sfar); int handle_ldf_stq(u32 insn, struct pt_regs *regs) { @@ -522,14 +524,14 @@ break; } default: - data_access_exception(regs); + data_access_exception(regs, 0, addr); return 1; } if (put_user (first >> 32, (u32 *)addr) || __put_user ((u32)first, (u32 *)(addr + 4)) || __put_user (second >> 32, (u32 *)(addr + 8)) || __put_user ((u32)second, (u32 *)(addr + 12))) { - data_access_exception(regs); + data_access_exception(regs, 0, addr); return 1; } } else { @@ -542,7 +544,7 @@ do_privact(regs); return 1; } else if (asi > ASI_SNFL) { - data_access_exception(regs); + data_access_exception(regs, 0, addr); return 1; } switch (insn & 0x180000) { @@ -559,7 +561,7 @@ err |= __get_user (data[i], (u32 *)(addr + 4*i)); } if (err && !(asi & 0x2 /* NF */)) { - data_access_exception(regs); + data_access_exception(regs, 0, addr); return 1; } if (asi & 0x8) /* Little */ { @@ -662,7 +664,7 @@ *(u64 *)(f->regs + freg) = value; current->thread.fpsaved[0] |= flag; } else { -daex: data_access_exception(regs); +daex: data_access_exception(regs, sfsr, sfar); return; } advance(regs); @@ -706,7 +708,7 @@ __put_user ((u32)value, (u32 *)(sfar + 4))) goto daex; } else { -daex: data_access_exception(regs); +daex: data_access_exception(regs, sfsr, sfar); return; } advance(regs); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/Makefile linux-2.4.23-pre8/arch/x86_64/Makefile --- linux-2.4.22/arch/x86_64/Makefile 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/Makefile 2003-10-22 22:49:21.000000000 +0000 @@ -19,7 +19,7 @@ # 20010105 Andi Kleen, add IA32 compiler. # ....and later removed it again.... # -# $Id: Makefile,v 1.33 2003/05/12 14:36:34 ak Exp $ +# $Id: Makefile,v 1.34 2003/09/25 02:50:05 ak Exp $ # # early bootup linking needs 32bit. You can either use real 32bit tools @@ -38,6 +38,8 @@ LDFLAGS=-e stext LINKFLAGS =-T $(TOPDIR)/arch/x86_64/vmlinux.lds $(LDFLAGS) +check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then echo "$(1)"; else echo "$(2)"; fi) + CFLAGS += -mno-red-zone CFLAGS += -mcmodel=kernel CFLAGS += -pipe @@ -51,9 +53,7 @@ ifneq ($(CONFIG_X86_REMOTE_DEBUG),y) CFLAGS += -fno-asynchronous-unwind-tables endif - -# prevent gcc from keeping the stack 16 byte aligned (FIXME) -#CFLAGS += -mpreferred-stack-boundary=2 +CFLAGS += $(call check_gcc,-fno-unit-at-a-time,) HEAD := arch/x86_64/kernel/head.o arch/x86_64/kernel/head64.o arch/x86_64/kernel/init_task.o diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/boot/setup.S linux-2.4.23-pre8/arch/x86_64/boot/setup.S --- linux-2.4.22/arch/x86_64/boot/setup.S 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/boot/setup.S 2003-10-22 22:49:11.000000000 +0000 @@ -524,7 +524,7 @@ cmpw $0, %cs:realmode_swtch jz rmodeswtch_normal - lcall %cs:realmode_swtch + lcall *%cs:realmode_swtch jmp rmodeswtch_end diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/config.in linux-2.4.23-pre8/arch/x86_64/config.in --- linux-2.4.22/arch/x86_64/config.in 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/config.in 2003-10-22 22:49:12.000000000 +0000 @@ -10,7 +10,7 @@ define_bool CONFIG_ISA n define_bool CONFIG_SBUS n -define_bool CONFIG_UID16 y +define_bool CONFIG_UID16 n define_bool CONFIG_RWSEM_GENERIC_SPINLOCK y define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM n define_bool CONFIG_X86_CMPXCHG y @@ -66,6 +66,7 @@ define_bool CONFIG_X86_UP_IOAPIC y else define_bool CONFIG_HAVE_DEC_LOCK y + int 'Maximum number of CPUs (2-8)' CONFIG_NR_CPUS 4 fi bool 'Machine check support' CONFIG_MCE @@ -244,6 +245,9 @@ bool ' IOMMU leak tracing' CONFIG_IOMMU_LEAK bool ' Probalistic stack overflow check' CONFIG_DEBUG_STACKOVERFLOW fi + +int 'Kernel messages buffer length shift (0 = default)' CONFIG_LOG_BUF_SHIFT 0 + endmenu source lib/Config.in diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/defconfig linux-2.4.23-pre8/arch/x86_64/defconfig --- linux-2.4.22/arch/x86_64/defconfig 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/defconfig 2003-10-22 22:48:54.000000000 +0000 @@ -40,12 +40,15 @@ CONFIG_X86_IO_APIC=y CONFIG_X86_LOCAL_APIC=y CONFIG_MTRR=y -# CONFIG_SMP is not set +CONFIG_SMP=y CONFIG_HPET_TIMER=y CONFIG_GART_IOMMU=y -CONFIG_X86_UP_IOAPIC=y +CONFIG_HAVE_DEC_LOCK=y +CONFIG_NR_CPUS=4 CONFIG_MCE=y -# CONFIG_K8_NUMA is not set +CONFIG_K8_NUMA=y +CONFIG_DISCONTIGMEM=y +CONFIG_NUMA=y # # General setup @@ -88,6 +91,7 @@ # CONFIG_ACPI_ASUS is not set # CONFIG_ACPI_TOSHIBA is not set CONFIG_ACPI_DEBUG=y +# CONFIG_ACPI_RELAXED_AML is not set # # Memory Technology Devices (MTD) @@ -108,6 +112,7 @@ # CONFIG_BLK_CPQ_DA is not set # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_CISS_SCSI_TAPE is not set +# CONFIG_CISS_MONITOR_THREAD is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set CONFIG_BLK_DEV_LOOP=y @@ -306,6 +311,9 @@ CONFIG_AIC7XXX_RESET_DELAY_MS=15000 # CONFIG_AIC7XXX_PROBE_EISA_VL is not set # CONFIG_AIC7XXX_BUILD_FIRMWARE is not set +# CONFIG_AIC7XXX_DEBUG_ENABLE is not set +CONFIG_AIC7XXX_DEBUG_MASK=0 +# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set # CONFIG_SCSI_AIC79XX is not set # CONFIG_SCSI_ADVANSYS is not set # CONFIG_SCSI_IN2000 is not set @@ -350,8 +358,9 @@ # # Fusion MPT device support # -# CONFIG_FUSION is not set -# CONFIG_FUSION_BOOT is not set +CONFIG_FUSION=y +CONFIG_FUSION_BOOT=y +CONFIG_FUSION_MAX_SGE=40 # CONFIG_FUSION_ISENSE is not set # CONFIG_FUSION_CTL is not set # CONFIG_FUSION_LAN is not set @@ -516,6 +525,7 @@ # CONFIG_SCx200_GPIO is not set # CONFIG_AMD_RNG is not set # CONFIG_INTEL_RNG is not set +CONFIG_HW_RANDOM=y # CONFIG_AMD_PM768 is not set # CONFIG_NVRAM is not set # CONFIG_RTC is not set @@ -528,7 +538,7 @@ # # CONFIG_FTAPE is not set CONFIG_AGP=y -CONFIG_AGP_AMD_8151=y +CONFIG_AGP_AMD_K8=y CONFIG_AGP_INTEL=y CONFIG_AGP_I810=y CONFIG_AGP_VIA=y @@ -536,6 +546,12 @@ CONFIG_AGP_SIS=y CONFIG_AGP_ALI=y CONFIG_AGP_SWORKS=y +CONFIG_AGP_NVIDIA=y +# CONFIG_AGP_ATI is not set + +# +# Direct Rendering Manager (XFree86 DRI support) +# # CONFIG_DRM is not set # CONFIG_MWAVE is not set @@ -548,6 +564,7 @@ # File systems # # CONFIG_QUOTA is not set +# CONFIG_QFMT_V2 is not set CONFIG_AUTOFS_FS=y # CONFIG_AUTOFS4_FS is not set CONFIG_REISERFS_FS=y @@ -557,6 +574,7 @@ # CONFIG_ADFS_FS_RW is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set # CONFIG_BEFS_FS is not set # CONFIG_BEFS_DEBUG is not set # CONFIG_BFS_FS is not set @@ -598,6 +616,7 @@ # CONFIG_UDF_RW is not set # CONFIG_UFS_FS is not set # CONFIG_UFS_FS_WRITE is not set +# CONFIG_SIMICSFS is not set # # Network File Systems @@ -606,6 +625,7 @@ # CONFIG_INTERMEZZO_FS is not set CONFIG_NFS_FS=y CONFIG_NFS_V3=y +# CONFIG_NFS_DIRECTIO is not set # CONFIG_ROOT_NFS is not set CONFIG_NFSD=y CONFIG_NFSD_V3=y @@ -703,17 +723,23 @@ # CONFIG_BLUEZ is not set # +# Cryptographic options +# +# CONFIG_CRYPTO is not set + +# # Kernel hacking # CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SLAB is not set +CONFIG_DEBUG_SLAB=y CONFIG_MAGIC_SYSRQ=y -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_CHECKING is not set +CONFIG_DEBUG_SPINLOCK=y +CONFIG_CHECKING=y # CONFIG_INIT_DEBUG is not set -# CONFIG_IOMMU_DEBUG is not set +CONFIG_IOMMU_DEBUG=y CONFIG_IOMMU_LEAK=y # CONFIG_DEBUG_STACKOVERFLOW is not set +CONFIG_LOG_BUF_SHIFT=17 # # Library routines diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/ia32/ia32_binfmt.c linux-2.4.23-pre8/arch/x86_64/ia32/ia32_binfmt.c --- linux-2.4.22/arch/x86_64/ia32/ia32_binfmt.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/ia32/ia32_binfmt.c 2003-10-22 22:47:38.000000000 +0000 @@ -28,7 +28,6 @@ #define ELF_NAME "elf/i386" -#define IA32_PAGE_OFFSET ((current->personality & ADDR_LIMIT_3GB) ? 0xc0000000 : 0xFFFFe000) #define IA32_STACK_TOP IA32_PAGE_OFFSET #define ELF_ET_DYN_BASE (IA32_PAGE_OFFSET/3 + 0x1000000) diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/ia32/ia32_ioctl.c linux-2.4.23-pre8/arch/x86_64/ia32/ia32_ioctl.c --- linux-2.4.22/arch/x86_64/ia32/ia32_ioctl.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/ia32/ia32_ioctl.c 2003-10-22 22:49:21.000000000 +0000 @@ -1,4 +1,4 @@ -/* $Id: ia32_ioctl.c,v 1.34 2003/05/08 06:34:01 ak Exp $ +/* $Id: ia32_ioctl.c,v 1.37 2003/08/20 11:00:23 ak Exp $ * ioctl32.c: Conversion between 32bit and 64bit native ioctls. * * Copyright (C) 1997-2000 Jakub Jelinek (jakub@redhat.com) @@ -2472,6 +2472,9 @@ mm_segment_t old_fs; void *karg = &u; + if (!capable(CAP_SYS_ADMIN)) + return -EACCES; + switch (cmd) { case VG_STATUS: v = kmalloc(sizeof(vg_t), GFP_KERNEL); @@ -3535,6 +3538,7 @@ COMPATIBLE_IOCTL(TIOCGPTN) COMPATIBLE_IOCTL(TIOCSPTLCK) COMPATIBLE_IOCTL(TIOCSERGETLSR) +COMPATIBLE_IOCTL(FIOQSIZE) /* Big F */ COMPATIBLE_IOCTL(FBIOGET_VSCREENINFO) COMPATIBLE_IOCTL(FBIOPUT_VSCREENINFO) @@ -4416,6 +4420,9 @@ struct ioctl_trans *t; unsigned long hash = ioctl32_hash(cmd); + if (handler == NULL) + handler = (void *)sys_ioctl; + lock_kernel(); for (t = (struct ioctl_trans *)ioctl32_hash_table[hash]; t; @@ -4555,7 +4562,7 @@ "cmd(%08x){%s} arg(%08x) on %s\n", current->comm, current->pid, (int)fd, (unsigned int)cmd, buf, (unsigned int)arg, - IS_ERR(fn) ? "???" : fn); + fn); if (path) free_page((unsigned long)path); } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/ia32/ia32_signal.c linux-2.4.23-pre8/arch/x86_64/ia32/ia32_signal.c --- linux-2.4.22/arch/x86_64/ia32/ia32_signal.c 2003-06-13 14:51:32.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/ia32/ia32_signal.c 2003-10-22 22:48:39.000000000 +0000 @@ -7,7 +7,7 @@ * 2000-06-20 Pentium III FXSR, SSE support by Gareth Hughes * 2000-12-* x86-64 compatibility mode signal handling by Andi Kleen * - * $Id: ia32_signal.c,v 1.31 2003/03/12 08:22:12 ak Exp $ + * $Id: ia32_signal.c,v 1.32 2003/09/06 18:10:44 ak Exp $ */ #include @@ -78,6 +78,10 @@ default: err |= __put_user(from->si_uid, &to->si_uid); break; + case __SI_POLL >> 16: + err |= __put_user(from->si_band, &to->si_band); + err |= __put_user(from->si_fd, &to->si_fd); + break; /* case __SI_RT: This is not generated by the kernel as of now. */ } return err; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/ia32/ia32entry.S linux-2.4.23-pre8/arch/x86_64/ia32/ia32entry.S --- linux-2.4.22/arch/x86_64/ia32/ia32entry.S 2003-06-13 14:51:32.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/ia32/ia32entry.S 2003-10-22 22:48:12.000000000 +0000 @@ -3,7 +3,7 @@ * * Copyright 2000,2001 Andi Kleen, SuSE Labs. * - * $Id: ia32entry.S,v 1.40 2003/04/03 09:46:54 ak Exp $ + * $Id: ia32entry.S,v 1.41 2003/09/22 04:25:53 ak Exp $ */ #include @@ -256,10 +256,10 @@ .quad sys32_adjtimex .quad sys32_mprotect /* 125 */ .quad sys32_sigprocmask - .quad sys32_module_warning /* create_module */ - .quad sys32_module_warning /* init_module */ - .quad sys32_module_warning /* delete module */ - .quad sys32_module_warning /* 130 get_kernel_syms */ + .quad sys32_create_module + .quad sys32_init_module + .quad sys32_delete_module + .quad sys32_get_kernel_syms /* 130 */ .quad ni_syscall /* quotactl */ .quad sys_getpgid .quad sys_fchdir @@ -296,7 +296,7 @@ .quad sys_setresuid16 .quad sys_getresuid16 /* 165 */ .quad sys32_vm86_warning /* vm86 */ - .quad quiet_ni_syscall /* query_module */ + .quad sys32_query_module .quad sys_poll .quad sys32_nfsservctl .quad sys_setresgid16 /* 170 */ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/ia32/ipc32.c linux-2.4.23-pre8/arch/x86_64/ia32/ipc32.c --- linux-2.4.22/arch/x86_64/ia32/ipc32.c 2003-06-13 14:51:32.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/ia32/ipc32.c 2003-10-22 22:48:56.000000000 +0000 @@ -16,6 +16,8 @@ #include +extern int sem_ctls[]; + /* * sys32_ipc() is the de-multiplexer for the SysV IPC calls in 32bit emulation.. * @@ -163,6 +165,7 @@ #define SEMOP 1 #define SEMGET 2 #define SEMCTL 3 +#define SEMTIMEDOP 4 #define MSGSND 11 #define MSGRCV 12 #define MSGGET 13 @@ -638,7 +641,27 @@ switch (call) { case SEMOP: /* struct sembuf is the same on 32 and 64bit :)) */ - return sys_semop(first, (struct sembuf *)AA(ptr), second); + return sys_semtimedop(first, (struct sembuf *)AA(ptr), second, NULL); + case SEMTIMEDOP: { + int err; + mm_segment_t oldfs = get_fs(); + struct timespec32 *ts32 = (struct timespec32 *)AA(fifth); + struct timespec ts; + if ((unsigned)second > sem_ctls[2]) + return -EINVAL; + if (ts32) { + if (get_user(ts.tv_sec, &ts32->tv_sec) || + __get_user(ts.tv_nsec, &ts32->tv_nsec) || + verify_area(VERIFY_READ, (void *)AA(ptr), + second*sizeof(struct sembuf))) + return -EFAULT; + } + set_fs(KERNEL_DS); + err = sys_semtimedop(first, (struct sembuf *)AA(ptr), second, + ts32 ? &ts : NULL); + set_fs(oldfs); + return err; + } case SEMGET: return sys_semget(first, second, third); case SEMCTL: @@ -663,9 +686,7 @@ case SHMCTL: return shmctl32(first, second, (void *)AA(ptr)); - default: - return -EINVAL; } - return -EINVAL; + return -ENOSYS; } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/ia32/socket32.c linux-2.4.23-pre8/arch/x86_64/ia32/socket32.c --- linux-2.4.22/arch/x86_64/ia32/socket32.c 2003-06-13 14:51:32.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/ia32/socket32.c 2003-10-22 22:47:56.000000000 +0000 @@ -503,7 +503,6 @@ __u32 filter; } *fprog32 = (struct sock_fprog32 *)optval; struct sock_fprog kfprog; - unsigned int fsize; mm_segment_t old_fs; __u32 uptr; int ret; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/ia32/sys_ia32.c linux-2.4.23-pre8/arch/x86_64/ia32/sys_ia32.c --- linux-2.4.22/arch/x86_64/ia32/sys_ia32.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/ia32/sys_ia32.c 2003-10-22 22:49:30.000000000 +0000 @@ -16,7 +16,7 @@ * * This file assumes that there is a hole at the end of user address space. * - * $Id: sys_ia32.c,v 1.58 2003/05/09 17:21:17 ak Exp $ + * $Id: sys_ia32.c,v 1.62 2003/09/22 04:25:53 ak Exp $ */ #include @@ -56,6 +56,7 @@ #include #include #include +#include #include #include #include @@ -84,6 +85,10 @@ #define low2highgid(gid) ((gid) == (u16)-1) ? (gid_t)-1 : (gid_t)(gid) extern int overflowuid,overflowgid; +typedef u16 old_uid_t; +typedef u16 old_gid_t; + +#include "../../../kernel/uid16.c" static int putstat(struct stat32 *ubuf, struct stat *kbuf) @@ -93,8 +98,8 @@ __put_user (kbuf->st_ino, &ubuf->st_ino) || __put_user (kbuf->st_mode, &ubuf->st_mode) || __put_user (kbuf->st_nlink, &ubuf->st_nlink) || - __put_user (kbuf->st_uid, &ubuf->st_uid) || - __put_user (kbuf->st_gid, &ubuf->st_gid) || + __put_user (high2lowuid(kbuf->st_uid), &ubuf->st_uid) || + __put_user (high2lowgid(kbuf->st_gid), &ubuf->st_gid) || __put_user (kbuf->st_rdev, &ubuf->st_rdev) || __put_user (kbuf->st_size, &ubuf->st_size) || __put_user (kbuf->st_atime, &ubuf->st_atime) || @@ -475,7 +480,13 @@ __put_user (kbuf->f_ffree, &ubuf->f_ffree) || __put_user (kbuf->f_namelen, &ubuf->f_namelen) || __put_user (kbuf->f_fsid.val[0], &ubuf->f_fsid.val[0]) || - __put_user (kbuf->f_fsid.val[1], &ubuf->f_fsid.val[1])) + __put_user (kbuf->f_fsid.val[1], &ubuf->f_fsid.val[1]) || + __put_user (0, &ubuf->f_spare[0]) || + __put_user (0, &ubuf->f_spare[1]) || + __put_user (0, &ubuf->f_spare[2]) || + __put_user (0, &ubuf->f_spare[3]) || + __put_user (0, &ubuf->f_spare[4]) || + __put_user (0, &ubuf->f_spare[5])) return -EFAULT; return 0; } @@ -925,11 +936,6 @@ (struct timeval32 *)A(a.tvp)); } -struct timespec32 { - int tv_sec; - int tv_nsec; -}; - extern asmlinkage long sys_nanosleep(struct timespec *rqtp, struct timespec *rmtp); asmlinkage long @@ -1517,10 +1523,30 @@ struct sysinfo s; int ret; mm_segment_t old_fs = get_fs (); + int bitcount = 0; set_fs (KERNEL_DS); ret = sys_sysinfo(&s); set_fs (old_fs); + + /* Check to see if any memory value is too large for 32-bit and scale + * down if needed + */ + if ((s.totalram >> 32) || (s.totalswap >> 32)) { + while (s.mem_unit < PAGE_SIZE) { + s.mem_unit <<= 1; + bitcount++; + } + s.totalram >>= bitcount; + s.freeram >>= bitcount; + s.sharedram >>= bitcount; + s.bufferram >>= bitcount; + s.totalswap >>= bitcount; + s.freeswap >>= bitcount; + s.totalhigh >>= bitcount; + s.freehigh >>= bitcount; + } + if (verify_area(VERIFY_WRITE, info, sizeof(struct sysinfo32)) || __put_user (s.uptime, &info->uptime) || __put_user (s.loads[0], &info->loads[0]) || @@ -2534,17 +2560,422 @@ } #endif -long sys32_module_warning(void) +#ifdef CONFIG_MODULES + +extern asmlinkage unsigned long sys_create_module(const char *name_user, size_t size); + +asmlinkage unsigned long sys32_create_module(const char *name_user, __kernel_size_t32 size) { - static long warn_time = -(60*HZ); - if (time_before(warn_time + 60*HZ,jiffies) && strcmp(current->comm,"klogd")) { - printk(KERN_INFO "%s: 32bit modutils not supported on 64bit kernel\n", - current->comm); - warn_time = jiffies; + return sys_create_module(name_user, (size_t)size); +} + +extern asmlinkage int sys_init_module(const char *name_user, struct module *mod_user); + +/* Hey, when you're trying to init module, take time and prepare us a nice 64bit + * module structure, even if from 32bit modutils... Why to pollute kernel... :)) + */ +asmlinkage int sys32_init_module(const char *name_user, struct module *mod_user) +{ + return sys_init_module(name_user, mod_user); +} + +extern asmlinkage int sys_delete_module(const char *name_user); + +asmlinkage int sys32_delete_module(const char *name_user) +{ + return sys_delete_module(name_user); +} + +struct module_info32 { + u32 addr; + u32 size; + u32 flags; + s32 usecount; +}; + +/* Query various bits about modules. */ + +static inline long +get_mod_name(const char *user_name, char **buf) +{ + unsigned long page; + long retval; + + if ((unsigned long)user_name >= TASK_SIZE + && !segment_eq(get_fs (), KERNEL_DS)) + return -EFAULT; + + page = __get_free_page(GFP_KERNEL); + if (!page) + return -ENOMEM; + + retval = strncpy_from_user((char *)page, user_name, PAGE_SIZE); + if (retval > 0) { + if (retval < PAGE_SIZE) { + *buf = (char *)page; + return retval; } - return -ENOSYS ; + retval = -ENAMETOOLONG; + } else if (!retval) + retval = -EINVAL; + + free_page(page); + return retval; +} + +static inline void +put_mod_name(char *buf) +{ + free_page((unsigned long)buf); } +static __inline__ struct module *find_module(const char *name) +{ + struct module *mod; + + for (mod = module_list; mod ; mod = mod->next) { + if (mod->flags & MOD_DELETED) + continue; + if (!strcmp(mod->name, name)) + break; + } + + return mod; +} + +static int +qm_modules(char *buf, size_t bufsize, __kernel_size_t32 *ret) +{ + struct module *mod; + size_t nmod, space, len; + + nmod = space = 0; + + for (mod = module_list; mod->next != NULL; mod = mod->next, ++nmod) { + len = strlen(mod->name)+1; + if (len > bufsize) + goto calc_space_needed; + if (copy_to_user(buf, mod->name, len)) + return -EFAULT; + buf += len; + bufsize -= len; + space += len; + } + + if (put_user(nmod, ret)) + return -EFAULT; + else + return 0; + +calc_space_needed: + space += len; + while ((mod = mod->next)->next != NULL) + space += strlen(mod->name)+1; + + if (put_user(space, ret)) + return -EFAULT; + else + return -ENOSPC; +} + +static int +qm_deps(struct module *mod, char *buf, size_t bufsize, __kernel_size_t32 *ret) +{ + size_t i, space, len; + + if (mod->next == NULL) + return -EINVAL; + if (!MOD_CAN_QUERY(mod)) + return put_user(0, ret); + + space = 0; + for (i = 0; i < mod->ndeps; ++i) { + const char *dep_name = mod->deps[i].dep->name; + + len = strlen(dep_name)+1; + if (len > bufsize) + goto calc_space_needed; + if (copy_to_user(buf, dep_name, len)) + return -EFAULT; + buf += len; + bufsize -= len; + space += len; + } + + return put_user(i, ret); + +calc_space_needed: + space += len; + while (++i < mod->ndeps) + space += strlen(mod->deps[i].dep->name)+1; + + if (put_user(space, ret)) + return -EFAULT; + else + return -ENOSPC; +} + +static int +qm_refs(struct module *mod, char *buf, size_t bufsize, __kernel_size_t32 *ret) +{ + size_t nrefs, space, len; + struct module_ref *ref; + + if (mod->next == NULL) + return -EINVAL; + if (!MOD_CAN_QUERY(mod)) + if (put_user(0, ret)) + return -EFAULT; + else + return 0; + + space = 0; + for (nrefs = 0, ref = mod->refs; ref ; ++nrefs, ref = ref->next_ref) { + const char *ref_name = ref->ref->name; + + len = strlen(ref_name)+1; + if (len > bufsize) + goto calc_space_needed; + if (copy_to_user(buf, ref_name, len)) + return -EFAULT; + buf += len; + bufsize -= len; + space += len; + } + + if (put_user(nrefs, ret)) + return -EFAULT; + else + return 0; + +calc_space_needed: + space += len; + while ((ref = ref->next_ref) != NULL) + space += strlen(ref->ref->name)+1; + + if (put_user(space, ret)) + return -EFAULT; + else + return -ENOSPC; +} + +static inline int +qm_symbols(struct module *mod, char *buf, size_t bufsize, __kernel_size_t32 *ret) +{ + size_t i, space, len; + struct module_symbol *s; + char *strings; + unsigned *vals; + + if (!MOD_CAN_QUERY(mod)) + if (put_user(0, ret)) + return -EFAULT; + else + return 0; + + space = mod->nsyms * 2*sizeof(u32); + + i = len = 0; + s = mod->syms; + + if (space > bufsize) + goto calc_space_needed; + + if (!access_ok(VERIFY_WRITE, buf, space)) + return -EFAULT; + + bufsize -= space; + vals = (unsigned *)buf; + strings = buf+space; + + for (; i < mod->nsyms ; ++i, ++s, vals += 2) { + len = strlen(s->name)+1; + if (len > bufsize) + goto calc_space_needed; + + if (copy_to_user(strings, s->name, len) + || __put_user(s->value, vals+0) + || __put_user(space, vals+1)) + return -EFAULT; + + strings += len; + bufsize -= len; + space += len; + } + + if (put_user(i, ret)) + return -EFAULT; + else + return 0; + +calc_space_needed: + for (; i < mod->nsyms; ++i, ++s) + space += strlen(s->name)+1; + + if (put_user(space, ret)) + return -EFAULT; + else + return -ENOSPC; +} + +static inline int +qm_info(struct module *mod, char *buf, size_t bufsize, __kernel_size_t32 *ret) +{ + int error = 0; + + if (mod->next == NULL) + return -EINVAL; + + if (sizeof(struct module_info32) <= bufsize) { + struct module_info32 info; + info.addr = (unsigned long)mod; + info.size = mod->size; + info.flags = mod->flags; + info.usecount = + ((mod_member_present(mod, can_unload) + && mod->can_unload) + ? -1 : atomic_read(&mod->uc.usecount)); + + if (copy_to_user(buf, &info, sizeof(struct module_info32))) + return -EFAULT; + } else + error = -ENOSPC; + + if (put_user(sizeof(struct module_info32), ret)) + return -EFAULT; + + return error; +} + +asmlinkage int sys32_query_module(char *name_user, int which, char *buf, __kernel_size_t32 bufsize, u32 ret) +{ + struct module *mod; + int err; + + lock_kernel(); + if (name_user == 0) { + /* This finds "kernel_module" which is not exported. */ + for(mod = module_list; mod->next != NULL; mod = mod->next) + ; + } else { + long namelen; + char *name; + + if ((namelen = get_mod_name(name_user, &name)) < 0) { + err = namelen; + goto out; + } + err = -ENOENT; + if (namelen == 0) { + /* This finds "kernel_module" which is not exported. */ + for(mod = module_list; mod->next != NULL; mod = mod->next) + ; + } else if ((mod = find_module(name)) == NULL) { + put_mod_name(name); + goto out; + } + put_mod_name(name); + } + + switch (which) + { + case 0: + err = 0; + break; + case QM_MODULES: + err = qm_modules(buf, bufsize, (__kernel_size_t32 *)AA(ret)); + break; + case QM_DEPS: + err = qm_deps(mod, buf, bufsize, (__kernel_size_t32 *)AA(ret)); + break; + case QM_REFS: + err = qm_refs(mod, buf, bufsize, (__kernel_size_t32 *)AA(ret)); + break; + case QM_SYMBOLS: + err = qm_symbols(mod, buf, bufsize, (__kernel_size_t32 *)AA(ret)); + break; + case QM_INFO: + err = qm_info(mod, buf, bufsize, (__kernel_size_t32 *)AA(ret)); + break; + default: + err = -EINVAL; + break; + } +out: + unlock_kernel(); + return err; +} + +struct kernel_sym32 { + u32 value; + char name[60]; +}; + +extern asmlinkage int sys_get_kernel_syms(struct kernel_sym *table); + +asmlinkage int sys32_get_kernel_syms(struct kernel_sym32 *table) +{ + int len, i; + struct kernel_sym *tbl; + mm_segment_t old_fs; + + len = sys_get_kernel_syms(NULL); + if (!table) return len; + tbl = kmalloc (len * sizeof (struct kernel_sym), GFP_KERNEL); + if (!tbl) return -ENOMEM; + old_fs = get_fs(); + set_fs (KERNEL_DS); + sys_get_kernel_syms(tbl); + set_fs (old_fs); + for (i = 0; i < len; i++, table++) { + if (put_user (tbl[i].value, &table->value) || + copy_to_user (table->name, tbl[i].name, 60)) + break; + } + kfree (tbl); + return i; +} + +#else /* CONFIG_MODULES */ + +asmlinkage unsigned long +sys32_create_module(const char *name_user, size_t size) +{ + return -ENOSYS; +} + +asmlinkage int +sys32_init_module(const char *name_user, struct module *mod_user) +{ + return -ENOSYS; +} + +asmlinkage int +sys32_delete_module(const char *name_user) +{ + return -ENOSYS; +} + +asmlinkage int +sys32_query_module(const char *name_user, int which, char *buf, size_t bufsize, + size_t *ret) +{ + /* Let the program know about the new interface. Not that + it'll do them much good. */ + if (which == 0) + return 0; + + return -ENOSYS; +} + +asmlinkage int +sys32_get_kernel_syms(struct kernel_sym *table) +{ + return -ENOSYS; +} + +#endif /* CONFIG_MODULES */ + long sys32_vm86_warning(void) { static long warn_time = -(60*HZ); @@ -2565,7 +2996,7 @@ static int __init ia32_init (void) { - printk("IA32 emulation $Id: sys_ia32.c,v 1.58 2003/05/09 17:21:17 ak Exp $\n"); + printk("IA32 emulation $Id: sys_ia32.c,v 1.62 2003/09/22 04:25:53 ak Exp $\n"); ia32_exec_domain.signal_map = default_exec_domain.signal_map; ia32_exec_domain.signal_invmap = default_exec_domain.signal_invmap; register_exec_domain(&ia32_exec_domain); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/kernel/acpi.c linux-2.4.23-pre8/arch/x86_64/kernel/acpi.c --- linux-2.4.22/arch/x86_64/kernel/acpi.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/kernel/acpi.c 2003-10-22 22:49:45.000000000 +0000 @@ -44,6 +44,7 @@ #include #include +extern int acpi_disabled; #define PREFIX "ACPI: " @@ -352,6 +353,28 @@ #ifdef CONFIG_X86_LOCAL_APIC /* + * ACPI interpreter is required to complete interrupt setup, + * so if it is off, don't enumerate the io-apics with ACPI. + * If MPS is present, it will handle them, + * otherwise the system will stay in PIC mode + */ + if (acpi_disabled) { + return 1; + } + + if (!use_acpi_pci) + return 0; + + /* If "nolocalapic" is specified don't look further */ + extern int apic_disabled; + if (apic_disabled) { + printk(KERN_INFO PREFIX "Skipping Local/IO-APIC probe due to \"nolocalapic\"\n"); + return 0; + } + printk(KERN_INFO PREFIX "Parsing Local APIC info in MADT\n"); + + + /* * MADT * ---- * Parse the Multiple APIC Description Table (MADT), if exists. @@ -412,6 +435,15 @@ #ifdef CONFIG_X86_IO_APIC /* + * if "noapic" boot option, don't look for IO-APICs + */ + if (ioapic_setup_disabled()) { + printk(KERN_INFO PREFIX "Skipping IOAPIC probe " + "due to 'noapic' option.\n"); + return 1; + } + + /* * I/O APIC * -------- */ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/kernel/acpi_wakeup.S linux-2.4.23-pre8/arch/x86_64/kernel/acpi_wakeup.S --- linux-2.4.22/arch/x86_64/kernel/acpi_wakeup.S 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/kernel/acpi_wakeup.S 2003-10-22 22:48:31.000000000 +0000 @@ -209,7 +209,7 @@ movw $0x0e00 + '!', %ds:(0xb801a) movq saved_eip, %rax - jmp %rax + jmp *%rax .code32 diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/kernel/bluesmoke.c linux-2.4.23-pre8/arch/x86_64/kernel/bluesmoke.c --- linux-2.4.22/arch/x86_64/kernel/bluesmoke.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/kernel/bluesmoke.c 2003-10-22 22:49:19.000000000 +0000 @@ -186,7 +186,7 @@ [0] = "err cpu1", }; -static void check_k8_nb(void) +static void check_k8_nb(int header) { struct pci_dev *nb; nb = find_k8_nb(); @@ -198,6 +198,9 @@ pci_read_config_dword(nb, 0x4c, &statushigh); if (!(statushigh & (1<<31))) return; + if (header) + printk(KERN_ERR "CPU %d: Silent Northbridge MCE\n", smp_processor_id()); + printk(KERN_ERR "Northbridge status %08x%08x\n", statushigh,statuslow); @@ -257,9 +260,11 @@ rdmsrl(MSR_IA32_MCG_STATUS, status); if ((status & (1<<2)) == 0) { if (!regs) - check_k8_nb(); + check_k8_nb(1); return; } + printk(KERN_EMERG "CPU %d: Machine Check Exception: %016Lx\n", smp_processor_id(), status); + if (status & 1) printk(KERN_EMERG "MCG_STATUS: unrecoverable\n"); @@ -277,7 +282,7 @@ if (nbstatus & (1UL<57)) printk(KERN_EMERG "Unrecoverable condition\n"); - check_k8_nb(); + check_k8_nb(0); if (nbstatus & (1UL<<58)) { u64 adr; @@ -338,7 +343,6 @@ { u64 cap; int i; - struct pci_dev *nb; if (!test_bit(X86_FEATURE_MCE, &c->x86_capability) || !test_bit(X86_FEATURE_MCA, &c->x86_capability)) diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/kernel/e820.c linux-2.4.23-pre8/arch/x86_64/kernel/e820.c --- linux-2.4.22/arch/x86_64/kernel/e820.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/kernel/e820.c 2003-10-22 22:48:28.000000000 +0000 @@ -1,7 +1,7 @@ /* * Handle the memory map. * The functions here do the job until bootmem takes over. - * $Id: e820.c,v 1.6 2002/10/15 09:35:16 ak Exp $ + * $Id: e820.c,v 1.10 2003/09/25 03:22:05 ak Exp $ */ #include #include @@ -12,6 +12,8 @@ #include #include #include +#include +#include #include extern unsigned long table_start, table_end; @@ -488,7 +490,6 @@ mem_size = ALT_MEM_K; who = "BIOS-e801"; } - e820.nr_map = 0; add_memory_region(0, LOWMEMSIZE(), E820_RAM); add_memory_region(HIGH_MEMORY, mem_size << 10, E820_RAM); @@ -500,7 +501,6 @@ extern char command_line[], saved_command_line[]; extern int fallback_aper_order; extern int iommu_setup(char *opt); -extern int acpi_disabled; void __init parse_mem_cmdline (char ** cmdline_p) { @@ -541,6 +541,22 @@ #endif else if (!memcmp(from, "acpi=off", 8)) acpi_disabled = 1; + else if (!memcmp(from,"maxcpus=0",9)) { + disable_ioapic_setup(); + apic_disabled = 1; + } + + else if (!memcmp(from, "noapic", 6)) + disable_ioapic_setup(); + else if (!memcmp(from, "nolocalapic", 11) || !memcmp(from,"nolapic",7)) + apic_disabled = 1; + else if (!memcmp(from, "pci=noacpi", 10)) + use_acpi_pci = 0; + else if (!memcmp(from,"apic",4)) { + extern int ioapic_force; + ioapic_force = 1; + skip_ioapic_setup = 0; + } next: c = *(from++); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/kernel/head.S linux-2.4.23-pre8/arch/x86_64/kernel/head.S --- linux-2.4.22/arch/x86_64/kernel/head.S 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/kernel/head.S 2003-10-22 22:49:05.000000000 +0000 @@ -6,7 +6,7 @@ * Copyright (C) 2000 Karsten Keil * Copyright (C) 2001,2002 Andi Kleen * - * $Id: head.S,v 1.56 2003/05/12 14:38:43 ak Exp $ + * $Id: head.S,v 1.57 2003/07/11 15:58:46 ak Exp $ */ @@ -312,7 +312,8 @@ ENTRY(level3_physmem_pgt) .quad 0x0000000000105007 /* -> level2_kernel_pgt (so that __va works even before pagetable_init) */ -.org 0xb000 + .org 0xb000 +#ifdef CONFIG_ACPI_SLEEP ENTRY(wakeup_level4_pgt) .quad 0x0000000000102007 /* -> level3_ident_pgt */ .fill 255,8,0 @@ -320,6 +321,7 @@ .fill 254,8,0 /* (2^48-(2*1024*1024*1024))/(2^39) = 511 */ .quad 0x0000000000103007 /* -> level3_kernel_pgt */ +#endif .data diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/kernel/io_apic.c linux-2.4.23-pre8/arch/x86_64/kernel/io_apic.c --- linux-2.4.22/arch/x86_64/kernel/io_apic.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/kernel/io_apic.c 2003-10-22 22:48:26.000000000 +0000 @@ -165,6 +165,14 @@ struct IO_APIC_route_entry entry; unsigned long flags; + /* Check delivery_mode to be sure we're not clearing an SMI pin */ + spin_lock_irqsave(&ioapic_lock, flags); + *(((int*)&entry) + 0) = io_apic_read(apic, 0x10 + 2 * pin); + *(((int*)&entry) + 1) = io_apic_read(apic, 0x11 + 2 * pin); + spin_unlock_irqrestore(&ioapic_lock, flags); + if (entry.delivery_mode == dest_SMI) + return; + /* * Disable it in the IO-APIC irq-routing table: */ @@ -194,9 +202,11 @@ int pirq_entries [MAX_PIRQS]; int pirqs_enabled; int skip_ioapic_setup; +int ioapic_force; static int __init noioapic_setup(char *str) { + ioapic_force = 1; skip_ioapic_setup = 1; return 1; } @@ -205,12 +215,66 @@ static int __init ioapic_setup(char *str) { + ioapic_force = 1; skip_ioapic_setup = 0; return 1; } __setup("apic", ioapic_setup); +#ifndef CONFIG_SMP +#include +#include +#include + +/* Temporary Hack. Nvidia and VIA boards currently only work with IO-APIC + off. Check for an Nvidia or VIA PCI bridge and turn it off. + Use pci direct infrastructure because this runs before the PCI subsystem. + + Can be overwritten with "apic" */ +void __init check_ioapic(void) +{ + int num,slot,func; + if (ioapic_force) + return; + + /* Poor man's PCI discovery */ + for (num = 0; num < 32; num++) { + for (slot = 0; slot < 32; slot++) { + for (func = 0; func < 8; func++) { + u32 class; + u32 vendor; + class = read_pci_config(num,slot,func, + PCI_CLASS_REVISION); + if (class == 0xffffffff) + break; + + if ((class >> 16) != PCI_CLASS_BRIDGE_PCI) + continue; + + vendor = read_pci_config(num, slot, func, + PCI_VENDOR_ID); + vendor &= 0xffff; + switch (vendor) { + case PCI_VENDOR_ID_NVIDIA: + case PCI_VENDOR_ID_VIA: + printk(KERN_INFO + "PCI bridge %02x:%02x from %x found. Setting \"noapic\". Overwrite with \"apic\"\n", + num,slot,vendor); + skip_ioapic_setup = 1; + return; + } + + /* No multi-function device? */ + u8 type = read_pci_config_byte(num,slot,func, + PCI_HEADER_TYPE); + if (!(type & 0x80)) + break; + } + } + } +} +#endif static int __init ioapic_pirq_setup(char *str) { @@ -1762,7 +1826,7 @@ } -int io_apic_set_pci_routing (int ioapic, int pin, int irq) +int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level ,int active_high_low) { struct IO_APIC_route_entry entry; unsigned long flags; @@ -1785,18 +1849,21 @@ entry.dest_mode = INT_DELIVERY_MODE; entry.dest.logical.logical_dest = TARGET_CPUS; entry.mask = 1; /* Disabled (masked) */ - entry.trigger = 1; /* Level sensitive */ - entry.polarity = 1; /* Low active */ + entry.trigger = edge_level; + entry.polarity = active_high_low; add_pin_to_irq(irq, ioapic, pin); entry.vector = assign_irq_vector(irq); printk(KERN_DEBUG "IOAPIC[%d]: Set PCI routing entry (%d-%d -> 0x%x -> " - "IRQ %d)\n", ioapic, - mp_ioapics[ioapic].mpc_apicid, pin, entry.vector, irq); + "IRQ %d) Mode:%i Active:%i\n", ioapic, + mp_ioapics[ioapic].mpc_apicid, pin, entry.vector, irq, edge_level, active_high_low); - irq_desc[irq].handler = &ioapic_level_irq_type; + if (edge_level) + irq_desc[irq].handler = &ioapic_level_irq_type; + else + irq_desc[irq].handler = &ioapic_edge_irq_type; set_intr_gate(entry.vector, interrupt[irq]); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/kernel/ioport.c linux-2.4.23-pre8/arch/x86_64/kernel/ioport.c --- linux-2.4.22/arch/x86_64/kernel/ioport.c 2003-06-13 14:51:32.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/kernel/ioport.c 2003-10-22 22:48:41.000000000 +0000 @@ -19,35 +19,13 @@ /* Set EXTENT bits starting at BASE in BITMAP to value TURN_ON. */ static void set_bitmap(unsigned long *bitmap, short base, short extent, int new_value) { - unsigned long mask; - unsigned long *bitmap_base = bitmap + base / sizeof(long); - unsigned low_index = base & (BITS_PER_LONG - 1); - int length = low_index + extent; - - if (low_index != 0) { - mask = (~0UL << low_index); - if (length < 64) - mask &= ~(~0UL << length); + int i; if (new_value) - *bitmap_base++ |= mask; + for (i = base; i < base + extent; i++) + __set_bit(i, bitmap); else - *bitmap_base++ &= ~mask; - length -= 64; - } - - mask = (new_value ? ~0UL : 0UL); - while (length >= 64) { - *bitmap_base++ = mask; - length -= 64; - } - - if (length > 0) { - mask = ~(~0UL << length); - if (new_value) - *bitmap_base++ |= mask; - else - *bitmap_base++ &= ~mask; - } + for (i = base; i < base + extent; i++) + clear_bit(i, bitmap); } /* diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/kernel/irq.c linux-2.4.23-pre8/arch/x86_64/kernel/irq.c --- linux-2.4.22/arch/x86_64/kernel/irq.c 2002-11-28 23:53:12.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/kernel/irq.c 2003-10-22 22:47:59.000000000 +0000 @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -154,57 +155,56 @@ * Generic, controller-independent functions: */ -int get_irq_list(char *buf) +int show_interrupts(struct seq_file *p, void *v) { int i, j; struct irqaction * action; - char *p = buf; - p += sprintf(p, " "); + seq_printf(p, " "); for (j=0; jtypename); - p += sprintf(p, " %s", action->name); + seq_printf(p, " %14s", irq_desc[i].handler->typename); + seq_printf(p, " %s", action->name); for (action=action->next; action; action = action->next) - p += sprintf(p, ", %s", action->name); - *p++ = '\n'; + seq_printf(p, ", %s", action->name); + seq_putc(p,'\n'); } - p += sprintf(p, "NMI: "); + seq_printf(p, "NMI: "); for (j = 0; j < smp_num_cpus; j++) - p += sprintf(p, "%10u ", + seq_printf(p, "%10u ", nmi_count(cpu_logical_map(j))); - p += sprintf(p, "\n"); + seq_printf(p, "\n"); #if CONFIG_X86_LOCAL_APIC - p += sprintf(p, "LOC: "); + seq_printf(p, "LOC: "); for (j = 0; j < smp_num_cpus; j++) - p += sprintf(p, "%10u ", + seq_printf(p, "%10u ", apic_timer_irqs[cpu_logical_map(j)]); - p += sprintf(p, "\n"); + seq_printf(p, "\n"); #endif - p += sprintf(p, "ERR: %10u\n", atomic_read(&irq_err_count)); + seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count)); #ifdef CONFIG_X86_IO_APIC #ifdef APIC_MISMATCH_DEBUG - p += sprintf(p, "MIS: %10u\n", atomic_read(&irq_mis_count)); + seq_printf(p, "MIS: %10u\n", atomic_read(&irq_mis_count)); #endif #endif - return p - buf; -} + return 0; +} /* * Global interrupt locks for SMP. Allow interrupts to come in on any diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/kernel/mpparse.c linux-2.4.23-pre8/arch/x86_64/kernel/mpparse.c --- linux-2.4.22/arch/x86_64/kernel/mpparse.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/kernel/mpparse.c 2003-10-22 22:48:24.000000000 +0000 @@ -139,9 +139,12 @@ str[6] = 0; Dprintk("Bus #%d is %s\n", m->mpc_busid, str); - if (m->mpc_busid >= MAX_MP_BUSSES) { +#if MAX_MP_BUSSES < 256 + if ((long)m->mpc_busid >= MAX_MP_BUSSES) { printk(KERN_ERR "MAX_MP_BUSSES ERROR mpc_busid %d, max %d\n", m->mpc_busid, MAX_MP_BUSSES); - } else if (strncmp(str, "ISA", 3) == 0) { + } else +#endif + if (strncmp(str, "ISA", 3) == 0) { mp_bus_id_to_type[m->mpc_busid] = MP_BUS_ISA; } else if (strncmp(str, "EISA", 4) == 0) { mp_bus_id_to_type[m->mpc_busid] = MP_BUS_EISA; @@ -713,7 +716,7 @@ return i; } - printk(KERN_ERR "ERROR: Unable to locate IOAPIC for IRQ %d/n", irq); + printk(KERN_ERR "ERROR: Unable to locate IOAPIC for IRQ %d\n", irq); return -1; } @@ -756,7 +759,7 @@ mp_ioapic_routing[idx].irq_end = irq_base + io_apic_get_redir_entries(idx); - printk("IOAPIC[%d]: apic_id %d, version %d, address 0x%lx, " + printk("IOAPIC[%d]: apic_id %d, version %d, address 0x%x, " "IRQ %d-%d\n", idx, mp_ioapics[idx].mpc_apicid, mp_ioapics[idx].mpc_apicver, mp_ioapics[idx].mpc_apicaddr, mp_ioapic_routing[idx].irq_start, @@ -883,8 +886,6 @@ #ifndef CONFIG_ACPI_HT_ONLY -/* Ensure the ACPI SCI interrupt level is active low, edge-triggered */ - extern FADT_DESCRIPTOR acpi_fadt; void __init mp_config_ioapic_for_sci(int irq) @@ -893,6 +894,7 @@ int ioapic_pin; struct acpi_table_madt* madt; struct acpi_table_int_src_ovr *entry = NULL; + acpi_interrupt_flags flags; void *madt_end; acpi_status status; @@ -911,23 +913,42 @@ while ((void *) entry < madt_end) { if (entry->header.type == ACPI_MADT_INT_SRC_OVR && - acpi_fadt.sci_int == entry->global_irq) - return; + acpi_fadt.sci_int == entry->bus_irq) + goto found; entry = (struct acpi_table_int_src_ovr *) ((unsigned long) entry + entry->header.length); } } + /* + * Although the ACPI spec says that the SCI should be level/low + * don't reprogram it unless there is an explicit MADT OVR entry + * instructing us to do so -- otherwise we break Tyan boards which + * have the SCI wired edge/high but no MADT OVR. + */ + return; + +found: + /* + * See the note at the end of ACPI 2.0b section + * 5.2.10.8 for what this is about. + */ + flags = entry->flags; + acpi_fadt.sci_int = entry->global_irq; + irq = entry->global_irq; ioapic = mp_find_ioapic(irq); ioapic_pin = irq - mp_ioapic_routing[ioapic].irq_start; - io_apic_set_pci_routing(ioapic, ioapic_pin, irq); + io_apic_set_pci_routing(ioapic, ioapic_pin, irq, + (flags.trigger >> 1) , (flags.polarity >> 1)); } #endif /*CONFIG_ACPI_HT_ONLY*/ +int acpi_tolerant; + #ifdef CONFIG_ACPI_PCI void __init mp_parse_prt (void) @@ -939,6 +960,8 @@ int ioapic_pin = 0; int irq = 0; int idx, bit = 0; + int edge_level = 0; + int active_high_low = 0; /* * Parsing through the PCI Interrupt Routing Table (PRT) and program @@ -949,13 +972,23 @@ /* Need to get irq for dynamic entry */ if (entry->link.handle) { - irq = acpi_pci_link_get_irq(entry->link.handle, entry->link.index); + irq = acpi_pci_link_get_irq(entry->link.handle, entry->link.index, &edge_level, &active_high_low); if (!irq) continue; - } else + } else { + edge_level = 1; + active_high_low = 1; irq = entry->link.index; + } irq = entry->link.index; + + /* Don't set up the ACPI SCI because it's already set up */ + if (acpi_fadt.sci_int == irq) { + entry->irq = irq; /*we still need to set entry's irq*/ + continue; + } + ioapic = mp_find_ioapic(irq); if (ioapic < 0) continue; @@ -983,7 +1016,7 @@ mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<irq = irq; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/kernel/nmi.c linux-2.4.23-pre8/arch/x86_64/kernel/nmi.c --- linux-2.4.22/arch/x86_64/kernel/nmi.c 2003-06-13 14:51:32.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/kernel/nmi.c 2003-10-22 22:48:19.000000000 +0000 @@ -30,6 +30,7 @@ unsigned int nmi_watchdog = NMI_LOCAL_APIC; static unsigned int nmi_hz = HZ; unsigned int nmi_perfctr_msr; /* the MSR to reset in NMI handler */ +int panic_on_timeout; int nmi_watchdog_disabled; @@ -121,6 +122,13 @@ { int nmi; + if (!strncmp(str,"panic",5)) { + panic_on_timeout = 1; + str = strchr(str, ','); + if (!str) + return 1; + ++str; + } get_option(&str, &nmi); if (nmi >= NMI_INVALID) @@ -380,6 +388,8 @@ bust_spinlocks(1); printk("NMI Watchdog detected LOCKUP on CPU%d, eip %16lx, registers:\n", cpu, regs->rip); show_registers(regs); + if (panic_on_timeout) + panic("NMI lockup"); printk("console shuts up ...\n"); console_silent(); spin_unlock(&nmi_print_lock); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/kernel/pci-gart.c linux-2.4.23-pre8/arch/x86_64/kernel/pci-gart.c --- linux-2.4.22/arch/x86_64/kernel/pci-gart.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/kernel/pci-gart.c 2003-10-22 22:47:38.000000000 +0000 @@ -8,7 +8,7 @@ * See Documentation/DMA-mapping.txt for the interface specification. * * Copyright 2002 Andi Kleen, SuSE Labs. - * $Id: pci-gart.c,v 1.27 2003/08/05 18:25:31 ak Exp $ + * $Id: pci-gart.c,v 1.28 2003/09/19 07:01:58 ak Exp $ */ #include @@ -588,9 +588,12 @@ if (!memcmp(p, "memaper", 7)) { fallback_aper_force = 1; p += 7; - if (*p == '=' && get_option(&p, &arg)) + if (*p == '=') { + ++p; + if (get_option(&p, &arg)) fallback_aper_order = arg; } + } #ifdef CONFIG_IOMMU_LEAK if (!memcmp(p,"leak", 4)) { leak_trace = 1; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/kernel/pci-pc.c linux-2.4.23-pre8/arch/x86_64/kernel/pci-pc.c --- linux-2.4.22/arch/x86_64/kernel/pci-pc.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/kernel/pci-pc.c 2003-10-22 22:49:10.000000000 +0000 @@ -23,9 +23,11 @@ #include #include #include +#include #include "pci-x86_64.h" +int use_acpi_pci = 1; unsigned int pci_probe = PCI_PROBE_CONF1 | PCI_PROBE_CONF2; int pcibios_last_bus = -1; @@ -588,7 +590,7 @@ printk(KERN_INFO "PCI: Probing PCI hardware\n"); #ifdef CONFIG_ACPI_PCI - if (!acpi_pci_irq_init()) + if (!acpi_disabled && use_acpi_pci && !acpi_pci_irq_init()) pci_using_acpi_prt = 1; #endif if (!pci_using_acpi_prt) { @@ -661,7 +663,7 @@ return err; #ifdef CONFIG_ACPI_PCI - if (pci_using_acpi_prt) { + if (use_acpi_pci && pci_using_acpi_prt) { acpi_pci_irq_enable(dev); return 0; } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/kernel/pci-x86_64.c linux-2.4.23-pre8/arch/x86_64/kernel/pci-x86_64.c --- linux-2.4.22/arch/x86_64/kernel/pci-x86_64.c 2003-06-13 14:51:32.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/kernel/pci-x86_64.c 2003-10-22 22:49:09.000000000 +0000 @@ -294,6 +294,17 @@ } } +void __init pcibios_set_cacheline_size(void) +{ + struct cpuinfo_x86 *c = &boot_cpu_data; + + pci_cache_line_size = 32 >> 2; + if (c->x86 >= 6 && c->x86_vendor == X86_VENDOR_AMD) + pci_cache_line_size = 64 >> 2; /* K7 & K8 */ + else if (c->x86 > 6 && c->x86_vendor == X86_VENDOR_INTEL) + pci_cache_line_size = 128 >> 2; /* P4 */ +} + void __init pcibios_resource_survey(void) { DBG("PCI: Allocating resources\n"); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/kernel/pci-x86_64.h linux-2.4.23-pre8/arch/x86_64/kernel/pci-x86_64.h --- linux-2.4.22/arch/x86_64/kernel/pci-x86_64.h 2003-06-13 14:51:32.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/kernel/pci-x86_64.h 2003-10-22 22:47:36.000000000 +0000 @@ -27,8 +27,10 @@ /* pci-i386.c */ extern unsigned int pcibios_max_latency; +extern u8 pci_cache_line_size; void pcibios_resource_survey(void); +void pcibios_set_cacheline_size(void); int pcibios_enable_resources(struct pci_dev *, int mask); /* pci-pc.c */ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/kernel/process.c linux-2.4.23-pre8/arch/x86_64/kernel/process.c --- linux-2.4.22/arch/x86_64/kernel/process.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/kernel/process.c 2003-10-22 22:48:34.000000000 +0000 @@ -9,7 +9,7 @@ * X86-64 port * Andi Kleen. * - * $Id: process.c,v 1.70 2003/06/09 05:18:21 ak Exp $ + * $Id: process.c,v 1.74 2003/08/13 13:43:16 ak Exp $ */ /* @@ -168,7 +168,7 @@ static int reboot_mode = 0; /* reboot=b[ios] | t[riple] | k[bd] [, [w]arm | [c]old] - bios Use the CPU reboto vector for warm reset + bios Use the CPU reboot vector for warm reset warm Don't set the cold reboot flag cold Set the cold reboto flag triple Force a triple fault (init) @@ -227,7 +227,7 @@ [target] "b" (WARMBOOT_TRAMP)); } -static inline void kb_wait(void) +static void kb_wait(void) { int i; @@ -252,6 +252,7 @@ /* AP calling this. Just halt */ if (cpuid != boot_cpu_id) { + printk("CPU %d SMP halt\n", cpuid); for (;;) asm("hlt"); } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/kernel/setup.c linux-2.4.23-pre8/arch/x86_64/kernel/setup.c --- linux-2.4.22/arch/x86_64/kernel/setup.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/kernel/setup.c 2003-10-22 22:48:00.000000000 +0000 @@ -48,7 +48,7 @@ #include #include -int acpi_disabled __initdata = 0; +int acpi_disabled = 0; /* * Machine setup.. @@ -295,6 +295,11 @@ #endif paging_init(); +#if !defined(CONFIG_SMP) && defined(CONFIG_X86_IO_APIC) + extern void check_ioapic(void); + check_ioapic(); +#endif + #ifdef CONFIG_ACPI_BOOT /* * Parse the ACPI tables for possible boot-time SMP configuration. @@ -377,7 +382,10 @@ c->x86_cache_size=(ecx>>24)+(edx>>24); if (n >= 0x80000006) { printk(KERN_INFO "CPU: L2 Cache: %dK (%d bytes/line/%d way)\n", - ecx_2>>16, ecx_2&0xFF, (ecx_2>>12)&0xf); + ecx_2>>16, ecx_2&0xFF, + /* use bits[15:13] as power of 2 for # of ways */ + 1 << ((ecx>>13) & 0x7) + /* Direct and Full associative L2 are very unlikely */); c->x86_cache_size = ecx_2 >> 16; c->x86_tlbsize = ((ebx>>16)&0xff) + ((ebx_2>>16)&0xfff) + (ebx&0xff) + ((ebx_2)&0xfff); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/kernel/setup64.c linux-2.4.23-pre8/arch/x86_64/kernel/setup64.c --- linux-2.4.22/arch/x86_64/kernel/setup64.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/kernel/setup64.c 2003-10-22 22:49:41.000000000 +0000 @@ -3,7 +3,7 @@ * Copyright (C) 1995 Linus Torvalds * Copyright 2001, 2002 SuSE Labs / Andi Kleen. * See setup.c for older changelog. - * $Id: setup64.c,v 1.23 2003/05/16 14:22:27 ak Exp $ + * $Id: setup64.c,v 1.25 2003/07/11 15:58:47 ak Exp $ */ #include #include diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/kernel/signal.c linux-2.4.23-pre8/arch/x86_64/kernel/signal.c --- linux-2.4.22/arch/x86_64/kernel/signal.c 2003-06-13 14:51:32.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/kernel/signal.c 2003-10-22 22:49:10.000000000 +0000 @@ -8,7 +8,7 @@ * 2000-06-20 Pentium III FXSR, SSE support by Gareth Hughes * 2000-2001 x86-64 support by Andi Kleen * - * $Id: signal.c,v 1.42 2003/02/24 21:06:02 ak Exp $ + * $Id: signal.c,v 1.43 2003/09/06 18:10:44 ak Exp $ */ #include @@ -71,6 +71,10 @@ default: err |= __put_user(from->si_uid, &to->si_uid); break; + case __SI_POLL >> 16: + err |= __put_user(from->si_band, &to->si_band); + err |= __put_user(from->si_fd, &to->si_fd); + break; /* case __SI_RT: This is not generated by the kernel as of now. */ } return err; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/kernel/smpboot.c linux-2.4.23-pre8/arch/x86_64/kernel/smpboot.c --- linux-2.4.22/arch/x86_64/kernel/smpboot.c 2003-06-13 14:51:32.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/kernel/smpboot.c 2003-10-22 22:49:19.000000000 +0000 @@ -50,6 +50,7 @@ #include #include #include +#include /* Setup configured maximum number of CPUs to activate */ static int max_cpus = -1; @@ -863,7 +864,7 @@ * If we couldnt find an SMP configuration at boot time, * get out of here now! */ - if (!smp_found_config) { + if (!smp_found_config && !acpi_lapic) { printk(KERN_NOTICE "SMP motherboard not detected.\n"); io_apic_irqs = 0; cpu_online_map = phys_cpu_present_map = 1; @@ -907,10 +908,8 @@ if (!max_cpus) { smp_found_config = 0; printk(KERN_INFO "SMP mode deactivated, forcing use of dummy APIC emulation.\n"); - io_apic_irqs = 0; cpu_online_map = phys_cpu_present_map = 1; smp_num_cpus = 1; - apic_disabled = 1; goto smp_done; } @@ -1012,6 +1011,9 @@ if (cpu_has_tsc && cpucount) synchronize_tsc_bp(); + if (nmi_watchdog != 0) + check_nmi_watchdog(); + smp_done: zap_low_mappings(); time_init_smp(); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/kernel/suspend.c linux-2.4.23-pre8/arch/x86_64/kernel/suspend.c --- linux-2.4.22/arch/x86_64/kernel/suspend.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/kernel/suspend.c 2003-10-22 22:48:20.000000000 +0000 @@ -5,6 +5,9 @@ * * Copyright (c) 2002 Pavel Machek * Copyright (c) 2001 Patrick Mochel + * + * AK currently useless for 24 because the core ACPI code doesn't support S3. + * and most of the infrastructure is missing. */ #include diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/kernel/sys_x86_64.c linux-2.4.23-pre8/arch/x86_64/kernel/sys_x86_64.c --- linux-2.4.22/arch/x86_64/kernel/sys_x86_64.c 2003-06-13 14:51:32.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/kernel/sys_x86_64.c 2003-10-22 22:47:38.000000000 +0000 @@ -128,3 +128,17 @@ unsigned long raddr; return sys_shmat(shmid,shmaddr,shmflg,&raddr) ?: raddr; } + +asmlinkage long sys_time64(long * tloc) +{ + struct timeval now; + int i; + + do_gettimeofday(&now); + i = now.tv_sec; + if (tloc) { + if (put_user(i,tloc)) + i = -EFAULT; + } + return i; +} diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/kernel/traps.c linux-2.4.23-pre8/arch/x86_64/kernel/traps.c --- linux-2.4.22/arch/x86_64/kernel/traps.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/kernel/traps.c 2003-10-22 22:47:54.000000000 +0000 @@ -7,7 +7,7 @@ * Pentium III FXSR, SSE support * Gareth Hughes , May 2000 * - * $Id: traps.c,v 1.66 2003/06/09 05:18:21 ak Exp $ + * $Id: traps.c,v 1.69 2003/09/21 04:54:09 ak Exp $ */ /* @@ -81,7 +81,7 @@ struct notifier_block *die_chain; -int kstack_depth_to_print = 40; +int kstack_depth_to_print = 12; #ifdef CONFIG_KALLSYMS #include @@ -342,18 +342,25 @@ spinlock_t die_lock = SPIN_LOCK_UNLOCKED; int die_owner = -1; -void die(const char * str, struct pt_regs * regs, long err) +void __die(const char * str, struct pt_regs * regs, long err) +{ + printk(KERN_EMERG "%s: %04lx\n", str, err & 0xffff); + notify_die(DIE_OOPS, (char *)str, regs, err, 255, SIGSEGV); + show_registers(regs); + /* Execute summary in case the oops scrolled away */ + printk(KERN_EMERG "RIP "); + printk_address(regs->rip); + printk(" RSP <%016lx>\n", regs->rsp); +} + +void prepare_die(unsigned long *flags) { - unsigned long flags; int cpu; console_verbose(); bust_spinlocks(1); - handle_BUG(regs); - printk(KERN_EMERG "%s: %04lx\n", str, err & 0xffff); - notify_die(DIE_OOPS, (char *)str, regs, err, 255, SIGSEGV); cpu = safe_smp_processor_id(); /* racy, but better than risking deadlock. */ - __save_flags(flags); + __save_flags(*flags); __cli(); if (!spin_trylock(&die_lock)) { if (cpu == die_owner) @@ -362,9 +369,23 @@ spin_lock(&die_lock); } die_owner = cpu; - show_registers(regs); - bust_spinlocks(0); +} + +void exit_die(unsigned long flags) +{ + die_owner = -1; spin_unlock_irqrestore(&die_lock, flags); + __sti(); /* back scroll should work */ + bust_spinlocks(0); +} + +void die(const char * str, struct pt_regs * regs, long err) +{ + unsigned long flags; + prepare_die(&flags); + handle_BUG(regs); + __die(str, regs, err); + exit_die(flags); do_exit(SIGSEGV); } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/kernel/x8664_ksyms.c linux-2.4.23-pre8/arch/x86_64/kernel/x8664_ksyms.c --- linux-2.4.22/arch/x86_64/kernel/x8664_ksyms.c 2003-06-13 14:51:32.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/kernel/x8664_ksyms.c 2003-10-22 22:49:06.000000000 +0000 @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -222,4 +223,6 @@ #endif extern void int_ret_from_sys_call(void); -EXPORT_SYMBOL(int_ret_from_sys_call); +EXPORT_SYMBOL_NOVERS(int_ret_from_sys_call); + +EXPORT_SYMBOL(touch_nmi_watchdog); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/lib/copy_page.S linux-2.4.23-pre8/arch/x86_64/lib/copy_page.S --- linux-2.4.22/arch/x86_64/lib/copy_page.S 2003-06-13 14:51:32.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/lib/copy_page.S 2003-10-22 22:47:28.000000000 +0000 @@ -10,14 +10,8 @@ copy_page: prefetch (%rsi) prefetch 1*64(%rsi) - prefetch 2*64(%rsi) - prefetch 3*64(%rsi) - prefetch 4*64(%rsi) prefetchw (%rdi) prefetchw 1*64(%rdi) - prefetchw 2*64(%rdi) - prefetchw 3*64(%rdi) - prefetchw 4*64(%rdi) subq $3*8,%rsp movq %rbx,(%rsp) diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/lib/copy_user.S linux-2.4.23-pre8/arch/x86_64/lib/copy_user.S --- linux-2.4.22/arch/x86_64/lib/copy_user.S 2003-06-13 14:51:32.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/lib/copy_user.S 2003-10-22 22:48:36.000000000 +0000 @@ -4,7 +4,7 @@ * Functions to copy from and to user space. */ -#define FIX_ALIGNMENT 1 +/* #define FIX_ALIGNMENT 1 */ #include #include @@ -59,9 +59,8 @@ .globl copy_user_generic .p2align 4 copy_user_generic: - /* Put the first cacheline into cache. This should handle - the small movements in ioctls etc., but not penalize the bigger - filesystem data copies too much. */ + prefetch (%rsi) + prefetchw (%rdi) pushq %rbx xorl %eax,%eax /*zero for the exception handler */ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/lib/csum-copy.S linux-2.4.23-pre8/arch/x86_64/lib/csum-copy.S --- linux-2.4.22/arch/x86_64/lib/csum-copy.S 2003-06-13 14:51:32.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/lib/csum-copy.S 2003-10-22 22:49:15.000000000 +0000 @@ -56,29 +56,18 @@ .globl csum_partial_copy_generic .p2align 4 csum_partial_copy_generic: - cmpl $3*64,%edx + cmpl $2*64,%edx jle .Lignore ignore - prefetch (%rdi) - ignore prefetch 1*64(%rdi) ignore prefetch 2*64(%rdi) ignore - prefetch 3*64(%rdi) - ignore - prefetch 4*64(%rdi) - ignore prefetchw (%rsi) ignore prefetchw 1*64(%rsi) ignore - prefetchw 2*64(%rsi) - ignore - prefetchw 3*64(%rsi) - ignore - prefetchw 4*64(%rsi) .Lignore: subq $7*8,%rsp @@ -126,9 +115,6 @@ source movq 56(%rdi),%r13 - ignore 2f - prefetch 5*64(%rdi) -2: adcq %rbx,%rax adcq %r8,%rax adcq %r11,%rax @@ -158,10 +144,6 @@ dest movq %r13,56(%rsi) - ignore 3f - prefetchw 5*64(%rsi) -3: - leaq 64(%rdi),%rdi leaq 64(%rsi),%rsi diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/lib/usercopy.c linux-2.4.23-pre8/arch/x86_64/lib/usercopy.c --- linux-2.4.22/arch/x86_64/lib/usercopy.c 2003-06-13 14:51:32.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/lib/usercopy.c 2003-10-22 22:49:02.000000000 +0000 @@ -68,7 +68,7 @@ asm volatile( " testq %[size8],%[size8]\n" " jz 4f\n" - "0: movnti %[zero],(%[dst])\n" + "0: movq %[zero],(%[dst])\n" " addq %[eight],%[dst]\n" " decl %%ecx ; jnz 0b\n" "4: movq %[size1],%%rcx\n" @@ -77,7 +77,7 @@ "1: movb %b[zero],(%[dst])\n" " incq %[dst]\n" " decl %%ecx ; jnz 1b\n" - "2: sfence\n" + "2:\n" ".section .fixup,\"ax\"\n" "3: lea 0(%[size1],%[size8],8),%[size8]\n" " jmp 2b\n" diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/mm/fault.c linux-2.4.23-pre8/arch/x86_64/mm/fault.c --- linux-2.4.22/arch/x86_64/mm/fault.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/mm/fault.c 2003-10-22 22:49:50.000000000 +0000 @@ -94,6 +94,85 @@ printk("BAD\n"); } +/* Sometimes the CPU reports invalid exceptions on prefetch. + Check that here and ignore. + Opcode checker based on code by Richard Brunner */ +static int is_prefetch(struct pt_regs *regs, unsigned long addr) +{ + unsigned char *instr = (unsigned char *)(regs->rip); + int scan_more = 1; + int prefetch = 0; + unsigned char *max_instr = instr + 15; + + /* Avoid recursive faults for this common case */ + if (regs->rip == addr) + return 0; + + if (regs->cs & (1<<2)) + return 0; + + while (scan_more && instr < max_instr) { + unsigned char opcode; + unsigned char instr_hi; + unsigned char instr_lo; + + if (__get_user(opcode, instr)) + break; + + instr_hi = opcode & 0xf0; + instr_lo = opcode & 0x0f; + instr++; + + switch (instr_hi) { + case 0x20: + case 0x30: + /* Values 0x26,0x2E,0x36,0x3E are valid x86 + prefixes. In long mode, the CPU will signal + invalid opcode if some of these prefixes are + present so we will never get here anyway */ + scan_more = ((instr_lo & 7) == 0x6); + break; + + case 0x40: + /* In AMD64 long mode, 0x40 to 0x4F are valid REX prefixes + Need to figure out under what instruction mode the + instruction was issued ... */ + /* Could check the LDT for lm, but for now it's good + enough to assume that long mode only uses well known + segments or kernel. */ + scan_more = ((regs->cs & 3) == 0) || (regs->cs == __USER_CS); + break; + + case 0x60: + /* 0x64 thru 0x67 are valid prefixes in all modes. */ + scan_more = (instr_lo & 0xC) == 0x4; + break; + case 0xF0: + /* 0xF0, 0xF2, and 0xF3 are valid prefixes in all modes. */ + scan_more = !instr_lo || (instr_lo>>1) == 1; + break; + case 0x00: + /* Prefetch instruction is 0x0F0D or 0x0F18 */ + scan_more = 0; + if (__get_user(opcode, instr)) + break; + prefetch = (instr_lo == 0xF) && + (opcode == 0x0D || opcode == 0x18); + break; + default: + scan_more = 0; + break; + } + } + +#if 0 + if (prefetch) + printk("%s: prefetch caused page fault at %lx/%lx\n", current->comm, + regs->rip, addr); +#endif + return prefetch; +} + int page_fault_trace; int exception_trace = 1; @@ -156,7 +235,7 @@ * context, we must not take the fault.. */ if (in_interrupt() || !mm) - goto no_context; + goto bad_area_nosemaphore; again: down_read(&mm->mmap_sem); @@ -226,9 +305,11 @@ up_read(&mm->mmap_sem); bad_area_nosemaphore: - /* User mode accesses just cause a SIGSEGV */ if (error_code & 4) { + if (is_prefetch(regs, address)) + return; + if (exception_trace && !(tsk->ptrace & PT_PTRACED) && (tsk->sig->action[SIGSEGV-1].sa.sa_handler == SIG_IGN || (tsk->sig->action[SIGSEGV-1].sa.sa_handler == SIG_DFL))) @@ -260,40 +341,27 @@ return; } + if (is_prefetch(regs, address)) + return; + /* * Oops. The kernel tried to access some bad page. We'll have to * terminate things with extreme prejudice. */ - console_verbose(); - bust_spinlocks(1); - - int cpu = safe_smp_processor_id(); unsigned long flags; - extern int die_owner; - extern spinlock_t die_lock; - - __save_flags(flags); - __cli(); - if (!spin_trylock(&die_lock)) { - if (cpu == die_owner) - /* nested oops. should stop eventually */; - else - spin_lock(&die_lock); - } - die_owner = cpu; - + prepare_die(&flags); if (address < PAGE_SIZE) printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference"); else printk(KERN_ALERT "Unable to handle kernel paging request"); - printk(" at virtual address %016lx\n",address); - printk(" printing rip:\n"); - printk("%016lx\n", regs->rip); + printk(KERN_ALERT " at %016lx RIP: ", address); + printk_address(regs->rip); dump_pagetable(address); - die("Oops", regs, error_code); - bust_spinlocks(0); - spin_unlock_irqrestore(&die_lock, flags); + __die("Oops", regs, error_code); + /* Executive summary in case the oops scrolled away */ + printk(KERN_EMERG "CR2: %016lx\n", address); + exit_die(flags); do_exit(SIGKILL); /* @@ -315,10 +383,13 @@ do_sigbus: up_read(&mm->mmap_sem); - /* - * Send a sigbus, regardless of whether we were in kernel - * or user mode. - */ + /* Kernel mode? Handle exceptions or die */ + if (!(error_code & 4)) + goto no_context; + + if (is_prefetch(regs, address)) + return; + tsk->thread.cr2 = address; tsk->thread.error_code = error_code; tsk->thread.trap_no = 14; @@ -327,10 +398,6 @@ info.si_code = BUS_ADRERR; info.si_addr = (void *)address; force_sig_info(SIGBUS, &info, tsk); - - /* Kernel mode? Handle exceptions or die */ - if (!(error_code & 4)) - goto no_context; return; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/mm/ioremap.c linux-2.4.23-pre8/arch/x86_64/mm/ioremap.c --- linux-2.4.22/arch/x86_64/mm/ioremap.c 2003-06-13 14:51:32.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/mm/ioremap.c 2003-10-22 22:48:24.000000000 +0000 @@ -125,12 +125,12 @@ */ if (phys_addr < virt_to_phys(high_memory)) { char *t_addr, *t_end; - struct page *page; t_addr = __va(phys_addr); t_end = t_addr + (size - 1); #ifndef CONFIG_DISCONTIGMEM + struct page *page; for(page = virt_to_page(t_addr); page <= virt_to_page(t_end); page++) if(!PageReserved(page)) return NULL; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/arch/x86_64/mm/k8topology.c linux-2.4.23-pre8/arch/x86_64/mm/k8topology.c --- linux-2.4.22/arch/x86_64/mm/k8topology.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/arch/x86_64/mm/k8topology.c 2003-10-22 22:49:16.000000000 +0000 @@ -6,7 +6,7 @@ * Instead the northbridge registers are read directly. * * Copyright 2002 Andi Kleen, SuSE Labs. - * $Id: k8topology.c,v 1.7 2003/04/02 21:36:22 ak Exp $ + * $Id: k8topology.c,v 1.11 2003/09/12 01:55:37 ak Exp $ */ #include #include @@ -20,6 +20,8 @@ #include #include +#define Dprintk(x...) + int memnode_shift; u8 memnodemap[NODEMAPSIZE]; @@ -110,6 +112,9 @@ limit = read_pci_config(0, nb, 1, 0x44 + i*8); nodeid = limit & 3; + if ((base & 3) == 0) { + continue; + } if (!limit) { printk(KERN_INFO "Skipping node entry %d (base %lx)\n", i, base); continue; @@ -145,7 +150,7 @@ if (limit == base) continue; if (limit < base) { - printk(KERN_INFO"Node %d bogus settings %lx-%lx. Ignored.\n", + Dprintk(KERN_INFO"Node %d bogus settings %lx-%lx. Ignored.\n", nodeid, base, limit); continue; } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/crypto/Config.in linux-2.4.23-pre8/crypto/Config.in --- linux-2.4.22/crypto/Config.in 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/crypto/Config.in 2003-10-22 22:49:34.000000000 +0000 @@ -70,6 +70,7 @@ tristate ' Twofish cipher algorithm' CONFIG_CRYPTO_TWOFISH tristate ' Serpent cipher algorithm' CONFIG_CRYPTO_SERPENT tristate ' AES cipher algorithms' CONFIG_CRYPTO_AES + tristate ' CAST5 (CAST-128) cipher algorithm' CONFIG_CRYPTO_CAST5 if [ "$CONFIG_INET_IPCOMP" = "y" -o \ "$CONFIG_INET_IPCOMP" = "m" -o \ "$CONFIG_INET6_IPCOMP" = "y" -o \ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/crypto/Makefile linux-2.4.23-pre8/crypto/Makefile --- linux-2.4.22/crypto/Makefile 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/crypto/Makefile 2003-10-22 22:48:15.000000000 +0000 @@ -24,6 +24,7 @@ obj-$(CONFIG_CRYPTO_TWOFISH) += twofish.o obj-$(CONFIG_CRYPTO_SERPENT) += serpent.o obj-$(CONFIG_CRYPTO_AES) += aes.o +obj-$(CONFIG_CRYPTO_CAST5) += cast5.o obj-$(CONFIG_CRYPTO_DEFLATE) += deflate.o obj-$(CONFIG_CRYPTO_TEST) += tcrypt.o diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/crypto/cast5.c linux-2.4.23-pre8/crypto/cast5.c --- linux-2.4.22/crypto/cast5.c 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/crypto/cast5.c 2003-10-22 22:47:55.000000000 +0000 @@ -0,0 +1,852 @@ +/* Kernel cryptographic api. +* cast5.c - Cast5 cipher algorithm (rfc2144). +* +* Derived from GnuPG implementation of cast5. +* +* Major Changes. +* Complete conformance to rfc2144. +* Supports key size from 40 to 128 bits. +* +* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +* Copyright (C) 2003 Kartikey Mahendra Bhatt . +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of GNU General Public License as published by the Free +* Software Foundation; either version 2 of the License, or (at your option) +* any later version. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +*/ + + +#include +#include +#include +#include +#include + +#define CAST5_BLOCK_SIZE 8 +#define CAST5_MIN_KEY_SIZE 5 +#define CAST5_MAX_KEY_SIZE 16 + +struct cast5_ctx { + u32 Km[16]; + u8 Kr[16]; + int rr; /* rr?number of rounds = 16:number of rounds = 12; (rfc 2144) */ +}; + + +static const u32 s1[256] = { + 0x30fb40d4, 0x9fa0ff0b, 0x6beccd2f, 0x3f258c7a, 0x1e213f2f, + 0x9c004dd3, 0x6003e540, 0xcf9fc949, + 0xbfd4af27, 0x88bbbdb5, 0xe2034090, 0x98d09675, 0x6e63a0e0, + 0x15c361d2, 0xc2e7661d, 0x22d4ff8e, + 0x28683b6f, 0xc07fd059, 0xff2379c8, 0x775f50e2, 0x43c340d3, + 0xdf2f8656, 0x887ca41a, 0xa2d2bd2d, + 0xa1c9e0d6, 0x346c4819, 0x61b76d87, 0x22540f2f, 0x2abe32e1, + 0xaa54166b, 0x22568e3a, 0xa2d341d0, + 0x66db40c8, 0xa784392f, 0x004dff2f, 0x2db9d2de, 0x97943fac, + 0x4a97c1d8, 0x527644b7, 0xb5f437a7, + 0xb82cbaef, 0xd751d159, 0x6ff7f0ed, 0x5a097a1f, 0x827b68d0, + 0x90ecf52e, 0x22b0c054, 0xbc8e5935, + 0x4b6d2f7f, 0x50bb64a2, 0xd2664910, 0xbee5812d, 0xb7332290, + 0xe93b159f, 0xb48ee411, 0x4bff345d, + 0xfd45c240, 0xad31973f, 0xc4f6d02e, 0x55fc8165, 0xd5b1caad, + 0xa1ac2dae, 0xa2d4b76d, 0xc19b0c50, + 0x882240f2, 0x0c6e4f38, 0xa4e4bfd7, 0x4f5ba272, 0x564c1d2f, + 0xc59c5319, 0xb949e354, 0xb04669fe, + 0xb1b6ab8a, 0xc71358dd, 0x6385c545, 0x110f935d, 0x57538ad5, + 0x6a390493, 0xe63d37e0, 0x2a54f6b3, + 0x3a787d5f, 0x6276a0b5, 0x19a6fcdf, 0x7a42206a, 0x29f9d4d5, + 0xf61b1891, 0xbb72275e, 0xaa508167, + 0x38901091, 0xc6b505eb, 0x84c7cb8c, 0x2ad75a0f, 0x874a1427, + 0xa2d1936b, 0x2ad286af, 0xaa56d291, + 0xd7894360, 0x425c750d, 0x93b39e26, 0x187184c9, 0x6c00b32d, + 0x73e2bb14, 0xa0bebc3c, 0x54623779, + 0x64459eab, 0x3f328b82, 0x7718cf82, 0x59a2cea6, 0x04ee002e, + 0x89fe78e6, 0x3fab0950, 0x325ff6c2, + 0x81383f05, 0x6963c5c8, 0x76cb5ad6, 0xd49974c9, 0xca180dcf, + 0x380782d5, 0xc7fa5cf6, 0x8ac31511, + 0x35e79e13, 0x47da91d0, 0xf40f9086, 0xa7e2419e, 0x31366241, + 0x051ef495, 0xaa573b04, 0x4a805d8d, + 0x548300d0, 0x00322a3c, 0xbf64cddf, 0xba57a68e, 0x75c6372b, + 0x50afd341, 0xa7c13275, 0x915a0bf5, + 0x6b54bfab, 0x2b0b1426, 0xab4cc9d7, 0x449ccd82, 0xf7fbf265, + 0xab85c5f3, 0x1b55db94, 0xaad4e324, + 0xcfa4bd3f, 0x2deaa3e2, 0x9e204d02, 0xc8bd25ac, 0xeadf55b3, + 0xd5bd9e98, 0xe31231b2, 0x2ad5ad6c, + 0x954329de, 0xadbe4528, 0xd8710f69, 0xaa51c90f, 0xaa786bf6, + 0x22513f1e, 0xaa51a79b, 0x2ad344cc, + 0x7b5a41f0, 0xd37cfbad, 0x1b069505, 0x41ece491, 0xb4c332e6, + 0x032268d4, 0xc9600acc, 0xce387e6d, + 0xbf6bb16c, 0x6a70fb78, 0x0d03d9c9, 0xd4df39de, 0xe01063da, + 0x4736f464, 0x5ad328d8, 0xb347cc96, + 0x75bb0fc3, 0x98511bfb, 0x4ffbcc35, 0xb58bcf6a, 0xe11f0abc, + 0xbfc5fe4a, 0xa70aec10, 0xac39570a, + 0x3f04442f, 0x6188b153, 0xe0397a2e, 0x5727cb79, 0x9ceb418f, + 0x1cacd68d, 0x2ad37c96, 0x0175cb9d, + 0xc69dff09, 0xc75b65f0, 0xd9db40d8, 0xec0e7779, 0x4744ead4, + 0xb11c3274, 0xdd24cb9e, 0x7e1c54bd, + 0xf01144f9, 0xd2240eb1, 0x9675b3fd, 0xa3ac3755, 0xd47c27af, + 0x51c85f4d, 0x56907596, 0xa5bb15e6, + 0x580304f0, 0xca042cf1, 0x011a37ea, 0x8dbfaadb, 0x35ba3e4a, + 0x3526ffa0, 0xc37b4d09, 0xbc306ed9, + 0x98a52666, 0x5648f725, 0xff5e569d, 0x0ced63d0, 0x7c63b2cf, + 0x700b45e1, 0xd5ea50f1, 0x85a92872, + 0xaf1fbda7, 0xd4234870, 0xa7870bf3, 0x2d3b4d79, 0x42e04198, + 0x0cd0ede7, 0x26470db8, 0xf881814c, + 0x474d6ad7, 0x7c0c5e5c, 0xd1231959, 0x381b7298, 0xf5d2f4db, + 0xab838653, 0x6e2f1e23, 0x83719c9e, + 0xbd91e046, 0x9a56456e, 0xdc39200c, 0x20c8c571, 0x962bda1c, + 0xe1e696ff, 0xb141ab08, 0x7cca89b9, + 0x1a69e783, 0x02cc4843, 0xa2f7c579, 0x429ef47d, 0x427b169c, + 0x5ac9f049, 0xdd8f0f00, 0x5c8165bf +}; +static const u32 s2[256] = { + 0x1f201094, 0xef0ba75b, 0x69e3cf7e, 0x393f4380, 0xfe61cf7a, + 0xeec5207a, 0x55889c94, 0x72fc0651, + 0xada7ef79, 0x4e1d7235, 0xd55a63ce, 0xde0436ba, 0x99c430ef, + 0x5f0c0794, 0x18dcdb7d, 0xa1d6eff3, + 0xa0b52f7b, 0x59e83605, 0xee15b094, 0xe9ffd909, 0xdc440086, + 0xef944459, 0xba83ccb3, 0xe0c3cdfb, + 0xd1da4181, 0x3b092ab1, 0xf997f1c1, 0xa5e6cf7b, 0x01420ddb, + 0xe4e7ef5b, 0x25a1ff41, 0xe180f806, + 0x1fc41080, 0x179bee7a, 0xd37ac6a9, 0xfe5830a4, 0x98de8b7f, + 0x77e83f4e, 0x79929269, 0x24fa9f7b, + 0xe113c85b, 0xacc40083, 0xd7503525, 0xf7ea615f, 0x62143154, + 0x0d554b63, 0x5d681121, 0xc866c359, + 0x3d63cf73, 0xcee234c0, 0xd4d87e87, 0x5c672b21, 0x071f6181, + 0x39f7627f, 0x361e3084, 0xe4eb573b, + 0x602f64a4, 0xd63acd9c, 0x1bbc4635, 0x9e81032d, 0x2701f50c, + 0x99847ab4, 0xa0e3df79, 0xba6cf38c, + 0x10843094, 0x2537a95e, 0xf46f6ffe, 0xa1ff3b1f, 0x208cfb6a, + 0x8f458c74, 0xd9e0a227, 0x4ec73a34, + 0xfc884f69, 0x3e4de8df, 0xef0e0088, 0x3559648d, 0x8a45388c, + 0x1d804366, 0x721d9bfd, 0xa58684bb, + 0xe8256333, 0x844e8212, 0x128d8098, 0xfed33fb4, 0xce280ae1, + 0x27e19ba5, 0xd5a6c252, 0xe49754bd, + 0xc5d655dd, 0xeb667064, 0x77840b4d, 0xa1b6a801, 0x84db26a9, + 0xe0b56714, 0x21f043b7, 0xe5d05860, + 0x54f03084, 0x066ff472, 0xa31aa153, 0xdadc4755, 0xb5625dbf, + 0x68561be6, 0x83ca6b94, 0x2d6ed23b, + 0xeccf01db, 0xa6d3d0ba, 0xb6803d5c, 0xaf77a709, 0x33b4a34c, + 0x397bc8d6, 0x5ee22b95, 0x5f0e5304, + 0x81ed6f61, 0x20e74364, 0xb45e1378, 0xde18639b, 0x881ca122, + 0xb96726d1, 0x8049a7e8, 0x22b7da7b, + 0x5e552d25, 0x5272d237, 0x79d2951c, 0xc60d894c, 0x488cb402, + 0x1ba4fe5b, 0xa4b09f6b, 0x1ca815cf, + 0xa20c3005, 0x8871df63, 0xb9de2fcb, 0x0cc6c9e9, 0x0beeff53, + 0xe3214517, 0xb4542835, 0x9f63293c, + 0xee41e729, 0x6e1d2d7c, 0x50045286, 0x1e6685f3, 0xf33401c6, + 0x30a22c95, 0x31a70850, 0x60930f13, + 0x73f98417, 0xa1269859, 0xec645c44, 0x52c877a9, 0xcdff33a6, + 0xa02b1741, 0x7cbad9a2, 0x2180036f, + 0x50d99c08, 0xcb3f4861, 0xc26bd765, 0x64a3f6ab, 0x80342676, + 0x25a75e7b, 0xe4e6d1fc, 0x20c710e6, + 0xcdf0b680, 0x17844d3b, 0x31eef84d, 0x7e0824e4, 0x2ccb49eb, + 0x846a3bae, 0x8ff77888, 0xee5d60f6, + 0x7af75673, 0x2fdd5cdb, 0xa11631c1, 0x30f66f43, 0xb3faec54, + 0x157fd7fa, 0xef8579cc, 0xd152de58, + 0xdb2ffd5e, 0x8f32ce19, 0x306af97a, 0x02f03ef8, 0x99319ad5, + 0xc242fa0f, 0xa7e3ebb0, 0xc68e4906, + 0xb8da230c, 0x80823028, 0xdcdef3c8, 0xd35fb171, 0x088a1bc8, + 0xbec0c560, 0x61a3c9e8, 0xbca8f54d, + 0xc72feffa, 0x22822e99, 0x82c570b4, 0xd8d94e89, 0x8b1c34bc, + 0x301e16e6, 0x273be979, 0xb0ffeaa6, + 0x61d9b8c6, 0x00b24869, 0xb7ffce3f, 0x08dc283b, 0x43daf65a, + 0xf7e19798, 0x7619b72f, 0x8f1c9ba4, + 0xdc8637a0, 0x16a7d3b1, 0x9fc393b7, 0xa7136eeb, 0xc6bcc63e, + 0x1a513742, 0xef6828bc, 0x520365d6, + 0x2d6a77ab, 0x3527ed4b, 0x821fd216, 0x095c6e2e, 0xdb92f2fb, + 0x5eea29cb, 0x145892f5, 0x91584f7f, + 0x5483697b, 0x2667a8cc, 0x85196048, 0x8c4bacea, 0x833860d4, + 0x0d23e0f9, 0x6c387e8a, 0x0ae6d249, + 0xb284600c, 0xd835731d, 0xdcb1c647, 0xac4c56ea, 0x3ebd81b3, + 0x230eabb0, 0x6438bc87, 0xf0b5b1fa, + 0x8f5ea2b3, 0xfc184642, 0x0a036b7a, 0x4fb089bd, 0x649da589, + 0xa345415e, 0x5c038323, 0x3e5d3bb9, + 0x43d79572, 0x7e6dd07c, 0x06dfdf1e, 0x6c6cc4ef, 0x7160a539, + 0x73bfbe70, 0x83877605, 0x4523ecf1 +}; +static const u32 s3[256] = { + 0x8defc240, 0x25fa5d9f, 0xeb903dbf, 0xe810c907, 0x47607fff, + 0x369fe44b, 0x8c1fc644, 0xaececa90, + 0xbeb1f9bf, 0xeefbcaea, 0xe8cf1950, 0x51df07ae, 0x920e8806, + 0xf0ad0548, 0xe13c8d83, 0x927010d5, + 0x11107d9f, 0x07647db9, 0xb2e3e4d4, 0x3d4f285e, 0xb9afa820, + 0xfade82e0, 0xa067268b, 0x8272792e, + 0x553fb2c0, 0x489ae22b, 0xd4ef9794, 0x125e3fbc, 0x21fffcee, + 0x825b1bfd, 0x9255c5ed, 0x1257a240, + 0x4e1a8302, 0xbae07fff, 0x528246e7, 0x8e57140e, 0x3373f7bf, + 0x8c9f8188, 0xa6fc4ee8, 0xc982b5a5, + 0xa8c01db7, 0x579fc264, 0x67094f31, 0xf2bd3f5f, 0x40fff7c1, + 0x1fb78dfc, 0x8e6bd2c1, 0x437be59b, + 0x99b03dbf, 0xb5dbc64b, 0x638dc0e6, 0x55819d99, 0xa197c81c, + 0x4a012d6e, 0xc5884a28, 0xccc36f71, + 0xb843c213, 0x6c0743f1, 0x8309893c, 0x0feddd5f, 0x2f7fe850, + 0xd7c07f7e, 0x02507fbf, 0x5afb9a04, + 0xa747d2d0, 0x1651192e, 0xaf70bf3e, 0x58c31380, 0x5f98302e, + 0x727cc3c4, 0x0a0fb402, 0x0f7fef82, + 0x8c96fdad, 0x5d2c2aae, 0x8ee99a49, 0x50da88b8, 0x8427f4a0, + 0x1eac5790, 0x796fb449, 0x8252dc15, + 0xefbd7d9b, 0xa672597d, 0xada840d8, 0x45f54504, 0xfa5d7403, + 0xe83ec305, 0x4f91751a, 0x925669c2, + 0x23efe941, 0xa903f12e, 0x60270df2, 0x0276e4b6, 0x94fd6574, + 0x927985b2, 0x8276dbcb, 0x02778176, + 0xf8af918d, 0x4e48f79e, 0x8f616ddf, 0xe29d840e, 0x842f7d83, + 0x340ce5c8, 0x96bbb682, 0x93b4b148, + 0xef303cab, 0x984faf28, 0x779faf9b, 0x92dc560d, 0x224d1e20, + 0x8437aa88, 0x7d29dc96, 0x2756d3dc, + 0x8b907cee, 0xb51fd240, 0xe7c07ce3, 0xe566b4a1, 0xc3e9615e, + 0x3cf8209d, 0x6094d1e3, 0xcd9ca341, + 0x5c76460e, 0x00ea983b, 0xd4d67881, 0xfd47572c, 0xf76cedd9, + 0xbda8229c, 0x127dadaa, 0x438a074e, + 0x1f97c090, 0x081bdb8a, 0x93a07ebe, 0xb938ca15, 0x97b03cff, + 0x3dc2c0f8, 0x8d1ab2ec, 0x64380e51, + 0x68cc7bfb, 0xd90f2788, 0x12490181, 0x5de5ffd4, 0xdd7ef86a, + 0x76a2e214, 0xb9a40368, 0x925d958f, + 0x4b39fffa, 0xba39aee9, 0xa4ffd30b, 0xfaf7933b, 0x6d498623, + 0x193cbcfa, 0x27627545, 0x825cf47a, + 0x61bd8ba0, 0xd11e42d1, 0xcead04f4, 0x127ea392, 0x10428db7, + 0x8272a972, 0x9270c4a8, 0x127de50b, + 0x285ba1c8, 0x3c62f44f, 0x35c0eaa5, 0xe805d231, 0x428929fb, + 0xb4fcdf82, 0x4fb66a53, 0x0e7dc15b, + 0x1f081fab, 0x108618ae, 0xfcfd086d, 0xf9ff2889, 0x694bcc11, + 0x236a5cae, 0x12deca4d, 0x2c3f8cc5, + 0xd2d02dfe, 0xf8ef5896, 0xe4cf52da, 0x95155b67, 0x494a488c, + 0xb9b6a80c, 0x5c8f82bc, 0x89d36b45, + 0x3a609437, 0xec00c9a9, 0x44715253, 0x0a874b49, 0xd773bc40, + 0x7c34671c, 0x02717ef6, 0x4feb5536, + 0xa2d02fff, 0xd2bf60c4, 0xd43f03c0, 0x50b4ef6d, 0x07478cd1, + 0x006e1888, 0xa2e53f55, 0xb9e6d4bc, + 0xa2048016, 0x97573833, 0xd7207d67, 0xde0f8f3d, 0x72f87b33, + 0xabcc4f33, 0x7688c55d, 0x7b00a6b0, + 0x947b0001, 0x570075d2, 0xf9bb88f8, 0x8942019e, 0x4264a5ff, + 0x856302e0, 0x72dbd92b, 0xee971b69, + 0x6ea22fde, 0x5f08ae2b, 0xaf7a616d, 0xe5c98767, 0xcf1febd2, + 0x61efc8c2, 0xf1ac2571, 0xcc8239c2, + 0x67214cb8, 0xb1e583d1, 0xb7dc3e62, 0x7f10bdce, 0xf90a5c38, + 0x0ff0443d, 0x606e6dc6, 0x60543a49, + 0x5727c148, 0x2be98a1d, 0x8ab41738, 0x20e1be24, 0xaf96da0f, + 0x68458425, 0x99833be5, 0x600d457d, + 0x282f9350, 0x8334b362, 0xd91d1120, 0x2b6d8da0, 0x642b1e31, + 0x9c305a00, 0x52bce688, 0x1b03588a, + 0xf7baefd5, 0x4142ed9c, 0xa4315c11, 0x83323ec5, 0xdfef4636, + 0xa133c501, 0xe9d3531c, 0xee353783 +}; +static const u32 s4[256] = { + 0x9db30420, 0x1fb6e9de, 0xa7be7bef, 0xd273a298, 0x4a4f7bdb, + 0x64ad8c57, 0x85510443, 0xfa020ed1, + 0x7e287aff, 0xe60fb663, 0x095f35a1, 0x79ebf120, 0xfd059d43, + 0x6497b7b1, 0xf3641f63, 0x241e4adf, + 0x28147f5f, 0x4fa2b8cd, 0xc9430040, 0x0cc32220, 0xfdd30b30, + 0xc0a5374f, 0x1d2d00d9, 0x24147b15, + 0xee4d111a, 0x0fca5167, 0x71ff904c, 0x2d195ffe, 0x1a05645f, + 0x0c13fefe, 0x081b08ca, 0x05170121, + 0x80530100, 0xe83e5efe, 0xac9af4f8, 0x7fe72701, 0xd2b8ee5f, + 0x06df4261, 0xbb9e9b8a, 0x7293ea25, + 0xce84ffdf, 0xf5718801, 0x3dd64b04, 0xa26f263b, 0x7ed48400, + 0x547eebe6, 0x446d4ca0, 0x6cf3d6f5, + 0x2649abdf, 0xaea0c7f5, 0x36338cc1, 0x503f7e93, 0xd3772061, + 0x11b638e1, 0x72500e03, 0xf80eb2bb, + 0xabe0502e, 0xec8d77de, 0x57971e81, 0xe14f6746, 0xc9335400, + 0x6920318f, 0x081dbb99, 0xffc304a5, + 0x4d351805, 0x7f3d5ce3, 0xa6c866c6, 0x5d5bcca9, 0xdaec6fea, + 0x9f926f91, 0x9f46222f, 0x3991467d, + 0xa5bf6d8e, 0x1143c44f, 0x43958302, 0xd0214eeb, 0x022083b8, + 0x3fb6180c, 0x18f8931e, 0x281658e6, + 0x26486e3e, 0x8bd78a70, 0x7477e4c1, 0xb506e07c, 0xf32d0a25, + 0x79098b02, 0xe4eabb81, 0x28123b23, + 0x69dead38, 0x1574ca16, 0xdf871b62, 0x211c40b7, 0xa51a9ef9, + 0x0014377b, 0x041e8ac8, 0x09114003, + 0xbd59e4d2, 0xe3d156d5, 0x4fe876d5, 0x2f91a340, 0x557be8de, + 0x00eae4a7, 0x0ce5c2ec, 0x4db4bba6, + 0xe756bdff, 0xdd3369ac, 0xec17b035, 0x06572327, 0x99afc8b0, + 0x56c8c391, 0x6b65811c, 0x5e146119, + 0x6e85cb75, 0xbe07c002, 0xc2325577, 0x893ff4ec, 0x5bbfc92d, + 0xd0ec3b25, 0xb7801ab7, 0x8d6d3b24, + 0x20c763ef, 0xc366a5fc, 0x9c382880, 0x0ace3205, 0xaac9548a, + 0xeca1d7c7, 0x041afa32, 0x1d16625a, + 0x6701902c, 0x9b757a54, 0x31d477f7, 0x9126b031, 0x36cc6fdb, + 0xc70b8b46, 0xd9e66a48, 0x56e55a79, + 0x026a4ceb, 0x52437eff, 0x2f8f76b4, 0x0df980a5, 0x8674cde3, + 0xedda04eb, 0x17a9be04, 0x2c18f4df, + 0xb7747f9d, 0xab2af7b4, 0xefc34d20, 0x2e096b7c, 0x1741a254, + 0xe5b6a035, 0x213d42f6, 0x2c1c7c26, + 0x61c2f50f, 0x6552daf9, 0xd2c231f8, 0x25130f69, 0xd8167fa2, + 0x0418f2c8, 0x001a96a6, 0x0d1526ab, + 0x63315c21, 0x5e0a72ec, 0x49bafefd, 0x187908d9, 0x8d0dbd86, + 0x311170a7, 0x3e9b640c, 0xcc3e10d7, + 0xd5cad3b6, 0x0caec388, 0xf73001e1, 0x6c728aff, 0x71eae2a1, + 0x1f9af36e, 0xcfcbd12f, 0xc1de8417, + 0xac07be6b, 0xcb44a1d8, 0x8b9b0f56, 0x013988c3, 0xb1c52fca, + 0xb4be31cd, 0xd8782806, 0x12a3a4e2, + 0x6f7de532, 0x58fd7eb6, 0xd01ee900, 0x24adffc2, 0xf4990fc5, + 0x9711aac5, 0x001d7b95, 0x82e5e7d2, + 0x109873f6, 0x00613096, 0xc32d9521, 0xada121ff, 0x29908415, + 0x7fbb977f, 0xaf9eb3db, 0x29c9ed2a, + 0x5ce2a465, 0xa730f32c, 0xd0aa3fe8, 0x8a5cc091, 0xd49e2ce7, + 0x0ce454a9, 0xd60acd86, 0x015f1919, + 0x77079103, 0xdea03af6, 0x78a8565e, 0xdee356df, 0x21f05cbe, + 0x8b75e387, 0xb3c50651, 0xb8a5c3ef, + 0xd8eeb6d2, 0xe523be77, 0xc2154529, 0x2f69efdf, 0xafe67afb, + 0xf470c4b2, 0xf3e0eb5b, 0xd6cc9876, + 0x39e4460c, 0x1fda8538, 0x1987832f, 0xca007367, 0xa99144f8, + 0x296b299e, 0x492fc295, 0x9266beab, + 0xb5676e69, 0x9bd3ddda, 0xdf7e052f, 0xdb25701c, 0x1b5e51ee, + 0xf65324e6, 0x6afce36c, 0x0316cc04, + 0x8644213e, 0xb7dc59d0, 0x7965291f, 0xccd6fd43, 0x41823979, + 0x932bcdf6, 0xb657c34d, 0x4edfd282, + 0x7ae5290c, 0x3cb9536b, 0x851e20fe, 0x9833557e, 0x13ecf0b0, + 0xd3ffb372, 0x3f85c5c1, 0x0aef7ed2 +}; +static const u32 s5[256] = { + 0x7ec90c04, 0x2c6e74b9, 0x9b0e66df, 0xa6337911, 0xb86a7fff, + 0x1dd358f5, 0x44dd9d44, 0x1731167f, + 0x08fbf1fa, 0xe7f511cc, 0xd2051b00, 0x735aba00, 0x2ab722d8, + 0x386381cb, 0xacf6243a, 0x69befd7a, + 0xe6a2e77f, 0xf0c720cd, 0xc4494816, 0xccf5c180, 0x38851640, + 0x15b0a848, 0xe68b18cb, 0x4caadeff, + 0x5f480a01, 0x0412b2aa, 0x259814fc, 0x41d0efe2, 0x4e40b48d, + 0x248eb6fb, 0x8dba1cfe, 0x41a99b02, + 0x1a550a04, 0xba8f65cb, 0x7251f4e7, 0x95a51725, 0xc106ecd7, + 0x97a5980a, 0xc539b9aa, 0x4d79fe6a, + 0xf2f3f763, 0x68af8040, 0xed0c9e56, 0x11b4958b, 0xe1eb5a88, + 0x8709e6b0, 0xd7e07156, 0x4e29fea7, + 0x6366e52d, 0x02d1c000, 0xc4ac8e05, 0x9377f571, 0x0c05372a, + 0x578535f2, 0x2261be02, 0xd642a0c9, + 0xdf13a280, 0x74b55bd2, 0x682199c0, 0xd421e5ec, 0x53fb3ce8, + 0xc8adedb3, 0x28a87fc9, 0x3d959981, + 0x5c1ff900, 0xfe38d399, 0x0c4eff0b, 0x062407ea, 0xaa2f4fb1, + 0x4fb96976, 0x90c79505, 0xb0a8a774, + 0xef55a1ff, 0xe59ca2c2, 0xa6b62d27, 0xe66a4263, 0xdf65001f, + 0x0ec50966, 0xdfdd55bc, 0x29de0655, + 0x911e739a, 0x17af8975, 0x32c7911c, 0x89f89468, 0x0d01e980, + 0x524755f4, 0x03b63cc9, 0x0cc844b2, + 0xbcf3f0aa, 0x87ac36e9, 0xe53a7426, 0x01b3d82b, 0x1a9e7449, + 0x64ee2d7e, 0xcddbb1da, 0x01c94910, + 0xb868bf80, 0x0d26f3fd, 0x9342ede7, 0x04a5c284, 0x636737b6, + 0x50f5b616, 0xf24766e3, 0x8eca36c1, + 0x136e05db, 0xfef18391, 0xfb887a37, 0xd6e7f7d4, 0xc7fb7dc9, + 0x3063fcdf, 0xb6f589de, 0xec2941da, + 0x26e46695, 0xb7566419, 0xf654efc5, 0xd08d58b7, 0x48925401, + 0xc1bacb7f, 0xe5ff550f, 0xb6083049, + 0x5bb5d0e8, 0x87d72e5a, 0xab6a6ee1, 0x223a66ce, 0xc62bf3cd, + 0x9e0885f9, 0x68cb3e47, 0x086c010f, + 0xa21de820, 0xd18b69de, 0xf3f65777, 0xfa02c3f6, 0x407edac3, + 0xcbb3d550, 0x1793084d, 0xb0d70eba, + 0x0ab378d5, 0xd951fb0c, 0xded7da56, 0x4124bbe4, 0x94ca0b56, + 0x0f5755d1, 0xe0e1e56e, 0x6184b5be, + 0x580a249f, 0x94f74bc0, 0xe327888e, 0x9f7b5561, 0xc3dc0280, + 0x05687715, 0x646c6bd7, 0x44904db3, + 0x66b4f0a3, 0xc0f1648a, 0x697ed5af, 0x49e92ff6, 0x309e374f, + 0x2cb6356a, 0x85808573, 0x4991f840, + 0x76f0ae02, 0x083be84d, 0x28421c9a, 0x44489406, 0x736e4cb8, + 0xc1092910, 0x8bc95fc6, 0x7d869cf4, + 0x134f616f, 0x2e77118d, 0xb31b2be1, 0xaa90b472, 0x3ca5d717, + 0x7d161bba, 0x9cad9010, 0xaf462ba2, + 0x9fe459d2, 0x45d34559, 0xd9f2da13, 0xdbc65487, 0xf3e4f94e, + 0x176d486f, 0x097c13ea, 0x631da5c7, + 0x445f7382, 0x175683f4, 0xcdc66a97, 0x70be0288, 0xb3cdcf72, + 0x6e5dd2f3, 0x20936079, 0x459b80a5, + 0xbe60e2db, 0xa9c23101, 0xeba5315c, 0x224e42f2, 0x1c5c1572, + 0xf6721b2c, 0x1ad2fff3, 0x8c25404e, + 0x324ed72f, 0x4067b7fd, 0x0523138e, 0x5ca3bc78, 0xdc0fd66e, + 0x75922283, 0x784d6b17, 0x58ebb16e, + 0x44094f85, 0x3f481d87, 0xfcfeae7b, 0x77b5ff76, 0x8c2302bf, + 0xaaf47556, 0x5f46b02a, 0x2b092801, + 0x3d38f5f7, 0x0ca81f36, 0x52af4a8a, 0x66d5e7c0, 0xdf3b0874, + 0x95055110, 0x1b5ad7a8, 0xf61ed5ad, + 0x6cf6e479, 0x20758184, 0xd0cefa65, 0x88f7be58, 0x4a046826, + 0x0ff6f8f3, 0xa09c7f70, 0x5346aba0, + 0x5ce96c28, 0xe176eda3, 0x6bac307f, 0x376829d2, 0x85360fa9, + 0x17e3fe2a, 0x24b79767, 0xf5a96b20, + 0xd6cd2595, 0x68ff1ebf, 0x7555442c, 0xf19f06be, 0xf9e0659a, + 0xeeb9491d, 0x34010718, 0xbb30cab8, + 0xe822fe15, 0x88570983, 0x750e6249, 0xda627e55, 0x5e76ffa8, + 0xb1534546, 0x6d47de08, 0xefe9e7d4 +}; +static const u32 s6[256] = { + 0xf6fa8f9d, 0x2cac6ce1, 0x4ca34867, 0xe2337f7c, 0x95db08e7, + 0x016843b4, 0xeced5cbc, 0x325553ac, + 0xbf9f0960, 0xdfa1e2ed, 0x83f0579d, 0x63ed86b9, 0x1ab6a6b8, + 0xde5ebe39, 0xf38ff732, 0x8989b138, + 0x33f14961, 0xc01937bd, 0xf506c6da, 0xe4625e7e, 0xa308ea99, + 0x4e23e33c, 0x79cbd7cc, 0x48a14367, + 0xa3149619, 0xfec94bd5, 0xa114174a, 0xeaa01866, 0xa084db2d, + 0x09a8486f, 0xa888614a, 0x2900af98, + 0x01665991, 0xe1992863, 0xc8f30c60, 0x2e78ef3c, 0xd0d51932, + 0xcf0fec14, 0xf7ca07d2, 0xd0a82072, + 0xfd41197e, 0x9305a6b0, 0xe86be3da, 0x74bed3cd, 0x372da53c, + 0x4c7f4448, 0xdab5d440, 0x6dba0ec3, + 0x083919a7, 0x9fbaeed9, 0x49dbcfb0, 0x4e670c53, 0x5c3d9c01, + 0x64bdb941, 0x2c0e636a, 0xba7dd9cd, + 0xea6f7388, 0xe70bc762, 0x35f29adb, 0x5c4cdd8d, 0xf0d48d8c, + 0xb88153e2, 0x08a19866, 0x1ae2eac8, + 0x284caf89, 0xaa928223, 0x9334be53, 0x3b3a21bf, 0x16434be3, + 0x9aea3906, 0xefe8c36e, 0xf890cdd9, + 0x80226dae, 0xc340a4a3, 0xdf7e9c09, 0xa694a807, 0x5b7c5ecc, + 0x221db3a6, 0x9a69a02f, 0x68818a54, + 0xceb2296f, 0x53c0843a, 0xfe893655, 0x25bfe68a, 0xb4628abc, + 0xcf222ebf, 0x25ac6f48, 0xa9a99387, + 0x53bddb65, 0xe76ffbe7, 0xe967fd78, 0x0ba93563, 0x8e342bc1, + 0xe8a11be9, 0x4980740d, 0xc8087dfc, + 0x8de4bf99, 0xa11101a0, 0x7fd37975, 0xda5a26c0, 0xe81f994f, + 0x9528cd89, 0xfd339fed, 0xb87834bf, + 0x5f04456d, 0x22258698, 0xc9c4c83b, 0x2dc156be, 0x4f628daa, + 0x57f55ec5, 0xe2220abe, 0xd2916ebf, + 0x4ec75b95, 0x24f2c3c0, 0x42d15d99, 0xcd0d7fa0, 0x7b6e27ff, + 0xa8dc8af0, 0x7345c106, 0xf41e232f, + 0x35162386, 0xe6ea8926, 0x3333b094, 0x157ec6f2, 0x372b74af, + 0x692573e4, 0xe9a9d848, 0xf3160289, + 0x3a62ef1d, 0xa787e238, 0xf3a5f676, 0x74364853, 0x20951063, + 0x4576698d, 0xb6fad407, 0x592af950, + 0x36f73523, 0x4cfb6e87, 0x7da4cec0, 0x6c152daa, 0xcb0396a8, + 0xc50dfe5d, 0xfcd707ab, 0x0921c42f, + 0x89dff0bb, 0x5fe2be78, 0x448f4f33, 0x754613c9, 0x2b05d08d, + 0x48b9d585, 0xdc049441, 0xc8098f9b, + 0x7dede786, 0xc39a3373, 0x42410005, 0x6a091751, 0x0ef3c8a6, + 0x890072d6, 0x28207682, 0xa9a9f7be, + 0xbf32679d, 0xd45b5b75, 0xb353fd00, 0xcbb0e358, 0x830f220a, + 0x1f8fb214, 0xd372cf08, 0xcc3c4a13, + 0x8cf63166, 0x061c87be, 0x88c98f88, 0x6062e397, 0x47cf8e7a, + 0xb6c85283, 0x3cc2acfb, 0x3fc06976, + 0x4e8f0252, 0x64d8314d, 0xda3870e3, 0x1e665459, 0xc10908f0, + 0x513021a5, 0x6c5b68b7, 0x822f8aa0, + 0x3007cd3e, 0x74719eef, 0xdc872681, 0x073340d4, 0x7e432fd9, + 0x0c5ec241, 0x8809286c, 0xf592d891, + 0x08a930f6, 0x957ef305, 0xb7fbffbd, 0xc266e96f, 0x6fe4ac98, + 0xb173ecc0, 0xbc60b42a, 0x953498da, + 0xfba1ae12, 0x2d4bd736, 0x0f25faab, 0xa4f3fceb, 0xe2969123, + 0x257f0c3d, 0x9348af49, 0x361400bc, + 0xe8816f4a, 0x3814f200, 0xa3f94043, 0x9c7a54c2, 0xbc704f57, + 0xda41e7f9, 0xc25ad33a, 0x54f4a084, + 0xb17f5505, 0x59357cbe, 0xedbd15c8, 0x7f97c5ab, 0xba5ac7b5, + 0xb6f6deaf, 0x3a479c3a, 0x5302da25, + 0x653d7e6a, 0x54268d49, 0x51a477ea, 0x5017d55b, 0xd7d25d88, + 0x44136c76, 0x0404a8c8, 0xb8e5a121, + 0xb81a928a, 0x60ed5869, 0x97c55b96, 0xeaec991b, 0x29935913, + 0x01fdb7f1, 0x088e8dfa, 0x9ab6f6f5, + 0x3b4cbf9f, 0x4a5de3ab, 0xe6051d35, 0xa0e1d855, 0xd36b4cf1, + 0xf544edeb, 0xb0e93524, 0xbebb8fbd, + 0xa2d762cf, 0x49c92f54, 0x38b5f331, 0x7128a454, 0x48392905, + 0xa65b1db8, 0x851c97bd, 0xd675cf2f +}; +static const u32 s7[256] = { + 0x85e04019, 0x332bf567, 0x662dbfff, 0xcfc65693, 0x2a8d7f6f, + 0xab9bc912, 0xde6008a1, 0x2028da1f, + 0x0227bce7, 0x4d642916, 0x18fac300, 0x50f18b82, 0x2cb2cb11, + 0xb232e75c, 0x4b3695f2, 0xb28707de, + 0xa05fbcf6, 0xcd4181e9, 0xe150210c, 0xe24ef1bd, 0xb168c381, + 0xfde4e789, 0x5c79b0d8, 0x1e8bfd43, + 0x4d495001, 0x38be4341, 0x913cee1d, 0x92a79c3f, 0x089766be, + 0xbaeeadf4, 0x1286becf, 0xb6eacb19, + 0x2660c200, 0x7565bde4, 0x64241f7a, 0x8248dca9, 0xc3b3ad66, + 0x28136086, 0x0bd8dfa8, 0x356d1cf2, + 0x107789be, 0xb3b2e9ce, 0x0502aa8f, 0x0bc0351e, 0x166bf52a, + 0xeb12ff82, 0xe3486911, 0xd34d7516, + 0x4e7b3aff, 0x5f43671b, 0x9cf6e037, 0x4981ac83, 0x334266ce, + 0x8c9341b7, 0xd0d854c0, 0xcb3a6c88, + 0x47bc2829, 0x4725ba37, 0xa66ad22b, 0x7ad61f1e, 0x0c5cbafa, + 0x4437f107, 0xb6e79962, 0x42d2d816, + 0x0a961288, 0xe1a5c06e, 0x13749e67, 0x72fc081a, 0xb1d139f7, + 0xf9583745, 0xcf19df58, 0xbec3f756, + 0xc06eba30, 0x07211b24, 0x45c28829, 0xc95e317f, 0xbc8ec511, + 0x38bc46e9, 0xc6e6fa14, 0xbae8584a, + 0xad4ebc46, 0x468f508b, 0x7829435f, 0xf124183b, 0x821dba9f, + 0xaff60ff4, 0xea2c4e6d, 0x16e39264, + 0x92544a8b, 0x009b4fc3, 0xaba68ced, 0x9ac96f78, 0x06a5b79a, + 0xb2856e6e, 0x1aec3ca9, 0xbe838688, + 0x0e0804e9, 0x55f1be56, 0xe7e5363b, 0xb3a1f25d, 0xf7debb85, + 0x61fe033c, 0x16746233, 0x3c034c28, + 0xda6d0c74, 0x79aac56c, 0x3ce4e1ad, 0x51f0c802, 0x98f8f35a, + 0x1626a49f, 0xeed82b29, 0x1d382fe3, + 0x0c4fb99a, 0xbb325778, 0x3ec6d97b, 0x6e77a6a9, 0xcb658b5c, + 0xd45230c7, 0x2bd1408b, 0x60c03eb7, + 0xb9068d78, 0xa33754f4, 0xf430c87d, 0xc8a71302, 0xb96d8c32, + 0xebd4e7be, 0xbe8b9d2d, 0x7979fb06, + 0xe7225308, 0x8b75cf77, 0x11ef8da4, 0xe083c858, 0x8d6b786f, + 0x5a6317a6, 0xfa5cf7a0, 0x5dda0033, + 0xf28ebfb0, 0xf5b9c310, 0xa0eac280, 0x08b9767a, 0xa3d9d2b0, + 0x79d34217, 0x021a718d, 0x9ac6336a, + 0x2711fd60, 0x438050e3, 0x069908a8, 0x3d7fedc4, 0x826d2bef, + 0x4eeb8476, 0x488dcf25, 0x36c9d566, + 0x28e74e41, 0xc2610aca, 0x3d49a9cf, 0xbae3b9df, 0xb65f8de6, + 0x92aeaf64, 0x3ac7d5e6, 0x9ea80509, + 0xf22b017d, 0xa4173f70, 0xdd1e16c3, 0x15e0d7f9, 0x50b1b887, + 0x2b9f4fd5, 0x625aba82, 0x6a017962, + 0x2ec01b9c, 0x15488aa9, 0xd716e740, 0x40055a2c, 0x93d29a22, + 0xe32dbf9a, 0x058745b9, 0x3453dc1e, + 0xd699296e, 0x496cff6f, 0x1c9f4986, 0xdfe2ed07, 0xb87242d1, + 0x19de7eae, 0x053e561a, 0x15ad6f8c, + 0x66626c1c, 0x7154c24c, 0xea082b2a, 0x93eb2939, 0x17dcb0f0, + 0x58d4f2ae, 0x9ea294fb, 0x52cf564c, + 0x9883fe66, 0x2ec40581, 0x763953c3, 0x01d6692e, 0xd3a0c108, + 0xa1e7160e, 0xe4f2dfa6, 0x693ed285, + 0x74904698, 0x4c2b0edd, 0x4f757656, 0x5d393378, 0xa132234f, + 0x3d321c5d, 0xc3f5e194, 0x4b269301, + 0xc79f022f, 0x3c997e7e, 0x5e4f9504, 0x3ffafbbd, 0x76f7ad0e, + 0x296693f4, 0x3d1fce6f, 0xc61e45be, + 0xd3b5ab34, 0xf72bf9b7, 0x1b0434c0, 0x4e72b567, 0x5592a33d, + 0xb5229301, 0xcfd2a87f, 0x60aeb767, + 0x1814386b, 0x30bcc33d, 0x38a0c07d, 0xfd1606f2, 0xc363519b, + 0x589dd390, 0x5479f8e6, 0x1cb8d647, + 0x97fd61a9, 0xea7759f4, 0x2d57539d, 0x569a58cf, 0xe84e63ad, + 0x462e1b78, 0x6580f87e, 0xf3817914, + 0x91da55f4, 0x40a230f3, 0xd1988f35, 0xb6e318d2, 0x3ffa50bc, + 0x3d40f021, 0xc3c0bdae, 0x4958c24c, + 0x518f36b2, 0x84b1d370, 0x0fedce83, 0x878ddada, 0xf2a279c7, + 0x94e01be8, 0x90716f4b, 0x954b8aa3 +}; +static const u32 sb8[256] = { + 0xe216300d, 0xbbddfffc, 0xa7ebdabd, 0x35648095, 0x7789f8b7, + 0xe6c1121b, 0x0e241600, 0x052ce8b5, + 0x11a9cfb0, 0xe5952f11, 0xece7990a, 0x9386d174, 0x2a42931c, + 0x76e38111, 0xb12def3a, 0x37ddddfc, + 0xde9adeb1, 0x0a0cc32c, 0xbe197029, 0x84a00940, 0xbb243a0f, + 0xb4d137cf, 0xb44e79f0, 0x049eedfd, + 0x0b15a15d, 0x480d3168, 0x8bbbde5a, 0x669ded42, 0xc7ece831, + 0x3f8f95e7, 0x72df191b, 0x7580330d, + 0x94074251, 0x5c7dcdfa, 0xabbe6d63, 0xaa402164, 0xb301d40a, + 0x02e7d1ca, 0x53571dae, 0x7a3182a2, + 0x12a8ddec, 0xfdaa335d, 0x176f43e8, 0x71fb46d4, 0x38129022, + 0xce949ad4, 0xb84769ad, 0x965bd862, + 0x82f3d055, 0x66fb9767, 0x15b80b4e, 0x1d5b47a0, 0x4cfde06f, + 0xc28ec4b8, 0x57e8726e, 0x647a78fc, + 0x99865d44, 0x608bd593, 0x6c200e03, 0x39dc5ff6, 0x5d0b00a3, + 0xae63aff2, 0x7e8bd632, 0x70108c0c, + 0xbbd35049, 0x2998df04, 0x980cf42a, 0x9b6df491, 0x9e7edd53, + 0x06918548, 0x58cb7e07, 0x3b74ef2e, + 0x522fffb1, 0xd24708cc, 0x1c7e27cd, 0xa4eb215b, 0x3cf1d2e2, + 0x19b47a38, 0x424f7618, 0x35856039, + 0x9d17dee7, 0x27eb35e6, 0xc9aff67b, 0x36baf5b8, 0x09c467cd, + 0xc18910b1, 0xe11dbf7b, 0x06cd1af8, + 0x7170c608, 0x2d5e3354, 0xd4de495a, 0x64c6d006, 0xbcc0c62c, + 0x3dd00db3, 0x708f8f34, 0x77d51b42, + 0x264f620f, 0x24b8d2bf, 0x15c1b79e, 0x46a52564, 0xf8d7e54e, + 0x3e378160, 0x7895cda5, 0x859c15a5, + 0xe6459788, 0xc37bc75f, 0xdb07ba0c, 0x0676a3ab, 0x7f229b1e, + 0x31842e7b, 0x24259fd7, 0xf8bef472, + 0x835ffcb8, 0x6df4c1f2, 0x96f5b195, 0xfd0af0fc, 0xb0fe134c, + 0xe2506d3d, 0x4f9b12ea, 0xf215f225, + 0xa223736f, 0x9fb4c428, 0x25d04979, 0x34c713f8, 0xc4618187, + 0xea7a6e98, 0x7cd16efc, 0x1436876c, + 0xf1544107, 0xbedeee14, 0x56e9af27, 0xa04aa441, 0x3cf7c899, + 0x92ecbae6, 0xdd67016d, 0x151682eb, + 0xa842eedf, 0xfdba60b4, 0xf1907b75, 0x20e3030f, 0x24d8c29e, + 0xe139673b, 0xefa63fb8, 0x71873054, + 0xb6f2cf3b, 0x9f326442, 0xcb15a4cc, 0xb01a4504, 0xf1e47d8d, + 0x844a1be5, 0xbae7dfdc, 0x42cbda70, + 0xcd7dae0a, 0x57e85b7a, 0xd53f5af6, 0x20cf4d8c, 0xcea4d428, + 0x79d130a4, 0x3486ebfb, 0x33d3cddc, + 0x77853b53, 0x37effcb5, 0xc5068778, 0xe580b3e6, 0x4e68b8f4, + 0xc5c8b37e, 0x0d809ea2, 0x398feb7c, + 0x132a4f94, 0x43b7950e, 0x2fee7d1c, 0x223613bd, 0xdd06caa2, + 0x37df932b, 0xc4248289, 0xacf3ebc3, + 0x5715f6b7, 0xef3478dd, 0xf267616f, 0xc148cbe4, 0x9052815e, + 0x5e410fab, 0xb48a2465, 0x2eda7fa4, + 0xe87b40e4, 0xe98ea084, 0x5889e9e1, 0xefd390fc, 0xdd07d35b, + 0xdb485694, 0x38d7e5b2, 0x57720101, + 0x730edebc, 0x5b643113, 0x94917e4f, 0x503c2fba, 0x646f1282, + 0x7523d24a, 0xe0779695, 0xf9c17a8f, + 0x7a5b2121, 0xd187b896, 0x29263a4d, 0xba510cdf, 0x81f47c9f, + 0xad1163ed, 0xea7b5965, 0x1a00726e, + 0x11403092, 0x00da6d77, 0x4a0cdd61, 0xad1f4603, 0x605bdfb0, + 0x9eedc364, 0x22ebe6a8, 0xcee7d28a, + 0xa0e736a0, 0x5564a6b9, 0x10853209, 0xc7eb8f37, 0x2de705ca, + 0x8951570f, 0xdf09822b, 0xbd691a6c, + 0xaa12e4f2, 0x87451c0f, 0xe0f6a27a, 0x3ada4819, 0x4cf1764f, + 0x0d771c2b, 0x67cdb156, 0x350d8384, + 0x5938fa0f, 0x42399ef3, 0x36997b07, 0x0e84093d, 0x4aa93e61, + 0x8360d87b, 0x1fa98b0c, 0x1149382c, + 0xe97625a5, 0x0614d1b7, 0x0e25244b, 0x0c768347, 0x589e8d82, + 0x0d2059d1, 0xa466bb1e, 0xf8da0a82, + 0x04f19130, 0xba6e4ec0, 0x99265164, 0x1ee7230d, 0x50b2ad80, + 0xeaee6801, 0x8db2a283, 0xea8bf59e +}; + + +#define rol(n,x) ( ((x) << (n)) | ((x) >> (32-(n))) ) + +#define F1(D,m,r) ( (I = ((m) + (D))), (I=rol((r),I)), \ + (((s1[I >> 24] ^ s2[(I>>16)&0xff]) - s3[(I>>8)&0xff]) + s4[I&0xff]) ) +#define F2(D,m,r) ( (I = ((m) ^ (D))), (I=rol((r),I)), \ + (((s1[I >> 24] - s2[(I>>16)&0xff]) + s3[(I>>8)&0xff]) ^ s4[I&0xff]) ) +#define F3(D,m,r) ( (I = ((m) - (D))), (I=rol((r),I)), \ + (((s1[I >> 24] + s2[(I>>16)&0xff]) ^ s3[(I>>8)&0xff]) - s4[I&0xff]) ) + + +static void cast5_encrypt(void *ctx, u8 * outbuf, const u8 * inbuf) +{ + struct cast5_ctx *c = (struct cast5_ctx *) ctx; + u32 l, r, t; + u32 I; /* used by the Fx macros */ + u32 *Km; + u8 *Kr; + + Km = c->Km; + Kr = c->Kr; + + /* (L0,R0) <-- (m1...m64). (Split the plaintext into left and + * right 32-bit halves L0 = m1...m32 and R0 = m33...m64.) + */ + l = inbuf[0] << 24 | inbuf[1] << 16 | inbuf[2] << 8 | inbuf[3]; + r = inbuf[4] << 24 | inbuf[5] << 16 | inbuf[6] << 8 | inbuf[7]; + + /* (16 rounds) for i from 1 to 16, compute Li and Ri as follows: + * Li = Ri-1; + * Ri = Li-1 ^ f(Ri-1,Kmi,Kri), where f is defined in Section 2.2 + * Rounds 1, 4, 7, 10, 13, and 16 use f function Type 1. + * Rounds 2, 5, 8, 11, and 14 use f function Type 2. + * Rounds 3, 6, 9, 12, and 15 use f function Type 3. + */ + + if (!(c->rr)) { + t = l; l = r; r = t ^ F1(r, Km[0], Kr[0]); + t = l; l = r; r = t ^ F2(r, Km[1], Kr[1]); + t = l; l = r; r = t ^ F3(r, Km[2], Kr[2]); + t = l; l = r; r = t ^ F1(r, Km[3], Kr[3]); + t = l; l = r; r = t ^ F2(r, Km[4], Kr[4]); + t = l; l = r; r = t ^ F3(r, Km[5], Kr[5]); + t = l; l = r; r = t ^ F1(r, Km[6], Kr[6]); + t = l; l = r; r = t ^ F2(r, Km[7], Kr[7]); + t = l; l = r; r = t ^ F3(r, Km[8], Kr[8]); + t = l; l = r; r = t ^ F1(r, Km[9], Kr[9]); + t = l; l = r; r = t ^ F2(r, Km[10], Kr[10]); + t = l; l = r; r = t ^ F3(r, Km[11], Kr[11]); + t = l; l = r; r = t ^ F1(r, Km[12], Kr[12]); + t = l; l = r; r = t ^ F2(r, Km[13], Kr[13]); + t = l; l = r; r = t ^ F3(r, Km[14], Kr[14]); + t = l; l = r; r = t ^ F1(r, Km[15], Kr[15]); + } else { + t = l; l = r; r = t ^ F1(r, Km[0], Kr[0]); + t = l; l = r; r = t ^ F2(r, Km[1], Kr[1]); + t = l; l = r; r = t ^ F3(r, Km[2], Kr[2]); + t = l; l = r; r = t ^ F1(r, Km[3], Kr[3]); + t = l; l = r; r = t ^ F2(r, Km[4], Kr[4]); + t = l; l = r; r = t ^ F3(r, Km[5], Kr[5]); + t = l; l = r; r = t ^ F1(r, Km[6], Kr[6]); + t = l; l = r; r = t ^ F2(r, Km[7], Kr[7]); + t = l; l = r; r = t ^ F3(r, Km[8], Kr[8]); + t = l; l = r; r = t ^ F1(r, Km[9], Kr[9]); + t = l; l = r; r = t ^ F2(r, Km[10], Kr[10]); + t = l; l = r; r = t ^ F3(r, Km[11], Kr[11]); + } + + /* c1...c64 <-- (R16,L16). (Exchange final blocks L16, R16 and + * concatenate to form the ciphertext.) */ + outbuf[0] = (r >> 24) & 0xff; + outbuf[1] = (r >> 16) & 0xff; + outbuf[2] = (r >> 8) & 0xff; + outbuf[3] = r & 0xff; + outbuf[4] = (l >> 24) & 0xff; + outbuf[5] = (l >> 16) & 0xff; + outbuf[6] = (l >> 8) & 0xff; + outbuf[7] = l & 0xff; +} + +static void cast5_decrypt(void *ctx, u8 * outbuf, const u8 * inbuf) +{ + struct cast5_ctx *c = (struct cast5_ctx *) ctx; + u32 l, r, t; + u32 I; + u32 *Km; + u8 *Kr; + + Km = c->Km; + Kr = c->Kr; + + l = inbuf[0] << 24 | inbuf[1] << 16 | inbuf[2] << 8 | inbuf[3]; + r = inbuf[4] << 24 | inbuf[5] << 16 | inbuf[6] << 8 | inbuf[7]; + + if (!(c->rr)) { + t = l; l = r; r = t ^ F1(r, Km[15], Kr[15]); + t = l; l = r; r = t ^ F3(r, Km[14], Kr[14]); + t = l; l = r; r = t ^ F2(r, Km[13], Kr[13]); + t = l; l = r; r = t ^ F1(r, Km[12], Kr[12]); + t = l; l = r; r = t ^ F3(r, Km[11], Kr[11]); + t = l; l = r; r = t ^ F2(r, Km[10], Kr[10]); + t = l; l = r; r = t ^ F1(r, Km[9], Kr[9]); + t = l; l = r; r = t ^ F3(r, Km[8], Kr[8]); + t = l; l = r; r = t ^ F2(r, Km[7], Kr[7]); + t = l; l = r; r = t ^ F1(r, Km[6], Kr[6]); + t = l; l = r; r = t ^ F3(r, Km[5], Kr[5]); + t = l; l = r; r = t ^ F2(r, Km[4], Kr[4]); + t = l; l = r; r = t ^ F1(r, Km[3], Kr[3]); + t = l; l = r; r = t ^ F3(r, Km[2], Kr[2]); + t = l; l = r; r = t ^ F2(r, Km[1], Kr[1]); + t = l; l = r; r = t ^ F1(r, Km[0], Kr[0]); + } else { + t = l; l = r; r = t ^ F3(r, Km[11], Kr[11]); + t = l; l = r; r = t ^ F2(r, Km[10], Kr[10]); + t = l; l = r; r = t ^ F1(r, Km[9], Kr[9]); + t = l; l = r; r = t ^ F3(r, Km[8], Kr[8]); + t = l; l = r; r = t ^ F2(r, Km[7], Kr[7]); + t = l; l = r; r = t ^ F1(r, Km[6], Kr[6]); + t = l; l = r; r = t ^ F3(r, Km[5], Kr[5]); + t = l; l = r; r = t ^ F2(r, Km[4], Kr[4]); + t = l; l = r; r = t ^ F1(r, Km[3], Kr[3]); + t = l; l = r; r = t ^ F3(r, Km[2], Kr[2]); + t = l; l = r; r = t ^ F2(r, Km[1], Kr[1]); + t = l; l = r; r = t ^ F1(r, Km[0], Kr[0]); + } + + outbuf[0] = (r >> 24) & 0xff; + outbuf[1] = (r >> 16) & 0xff; + outbuf[2] = (r >> 8) & 0xff; + outbuf[3] = r & 0xff; + outbuf[4] = (l >> 24) & 0xff; + outbuf[5] = (l >> 16) & 0xff; + outbuf[6] = (l >> 8) & 0xff; + outbuf[7] = l & 0xff; +} + +static void key_schedule(u32 * x, u32 * z, u32 * k) +{ + +#define xi(i) ((x[(i)/4] >> (8*(3-((i)%4)))) & 0xff) +#define zi(i) ((z[(i)/4] >> (8*(3-((i)%4)))) & 0xff) + + z[0] = x[0] ^ s5[xi(13)] ^ s6[xi(15)] ^ s7[xi(12)] ^ sb8[xi(14)] ^ + s7[xi(8)]; + z[1] = x[2] ^ s5[zi(0)] ^ s6[zi(2)] ^ s7[zi(1)] ^ sb8[zi(3)] ^ + sb8[xi(10)]; + z[2] = x[3] ^ s5[zi(7)] ^ s6[zi(6)] ^ s7[zi(5)] ^ sb8[zi(4)] ^ + s5[xi(9)]; + z[3] = x[1] ^ s5[zi(10)] ^ s6[zi(9)] ^ s7[zi(11)] ^ sb8[zi(8)] ^ + s6[xi(11)]; + k[0] = s5[zi(8)] ^ s6[zi(9)] ^ s7[zi(7)] ^ sb8[zi(6)] ^ s5[zi(2)]; + k[1] = s5[zi(10)] ^ s6[zi(11)] ^ s7[zi(5)] ^ sb8[zi(4)] ^ + s6[zi(6)]; + k[2] = s5[zi(12)] ^ s6[zi(13)] ^ s7[zi(3)] ^ sb8[zi(2)] ^ + s7[zi(9)]; + k[3] = s5[zi(14)] ^ s6[zi(15)] ^ s7[zi(1)] ^ sb8[zi(0)] ^ + sb8[zi(12)]; + + x[0] = z[2] ^ s5[zi(5)] ^ s6[zi(7)] ^ s7[zi(4)] ^ sb8[zi(6)] ^ + s7[zi(0)]; + x[1] = z[0] ^ s5[xi(0)] ^ s6[xi(2)] ^ s7[xi(1)] ^ sb8[xi(3)] ^ + sb8[zi(2)]; + x[2] = z[1] ^ s5[xi(7)] ^ s6[xi(6)] ^ s7[xi(5)] ^ sb8[xi(4)] ^ + s5[zi(1)]; + x[3] = z[3] ^ s5[xi(10)] ^ s6[xi(9)] ^ s7[xi(11)] ^ sb8[xi(8)] ^ + s6[zi(3)]; + k[4] = s5[xi(3)] ^ s6[xi(2)] ^ s7[xi(12)] ^ sb8[xi(13)] ^ + s5[xi(8)]; + k[5] = s5[xi(1)] ^ s6[xi(0)] ^ s7[xi(14)] ^ sb8[xi(15)] ^ + s6[xi(13)]; + k[6] = s5[xi(7)] ^ s6[xi(6)] ^ s7[xi(8)] ^ sb8[xi(9)] ^ s7[xi(3)]; + k[7] = s5[xi(5)] ^ s6[xi(4)] ^ s7[xi(10)] ^ sb8[xi(11)] ^ + sb8[xi(7)]; + + z[0] = x[0] ^ s5[xi(13)] ^ s6[xi(15)] ^ s7[xi(12)] ^ sb8[xi(14)] ^ + s7[xi(8)]; + z[1] = x[2] ^ s5[zi(0)] ^ s6[zi(2)] ^ s7[zi(1)] ^ sb8[zi(3)] ^ + sb8[xi(10)]; + z[2] = x[3] ^ s5[zi(7)] ^ s6[zi(6)] ^ s7[zi(5)] ^ sb8[zi(4)] ^ + s5[xi(9)]; + z[3] = x[1] ^ s5[zi(10)] ^ s6[zi(9)] ^ s7[zi(11)] ^ sb8[zi(8)] ^ + s6[xi(11)]; + k[8] = s5[zi(3)] ^ s6[zi(2)] ^ s7[zi(12)] ^ sb8[zi(13)] ^ + s5[zi(9)]; + k[9] = s5[zi(1)] ^ s6[zi(0)] ^ s7[zi(14)] ^ sb8[zi(15)] ^ + s6[zi(12)]; + k[10] = s5[zi(7)] ^ s6[zi(6)] ^ s7[zi(8)] ^ sb8[zi(9)] ^ s7[zi(2)]; + k[11] = s5[zi(5)] ^ s6[zi(4)] ^ s7[zi(10)] ^ sb8[zi(11)] ^ + sb8[zi(6)]; + + x[0] = z[2] ^ s5[zi(5)] ^ s6[zi(7)] ^ s7[zi(4)] ^ sb8[zi(6)] ^ + s7[zi(0)]; + x[1] = z[0] ^ s5[xi(0)] ^ s6[xi(2)] ^ s7[xi(1)] ^ sb8[xi(3)] ^ + sb8[zi(2)]; + x[2] = z[1] ^ s5[xi(7)] ^ s6[xi(6)] ^ s7[xi(5)] ^ sb8[xi(4)] ^ + s5[zi(1)]; + x[3] = z[3] ^ s5[xi(10)] ^ s6[xi(9)] ^ s7[xi(11)] ^ sb8[xi(8)] ^ + s6[zi(3)]; + k[12] = s5[xi(8)] ^ s6[xi(9)] ^ s7[xi(7)] ^ sb8[xi(6)] ^ s5[xi(3)]; + k[13] = s5[xi(10)] ^ s6[xi(11)] ^ s7[xi(5)] ^ sb8[xi(4)] ^ + s6[xi(7)]; + k[14] = s5[xi(12)] ^ s6[xi(13)] ^ s7[xi(3)] ^ sb8[xi(2)] ^ + s7[xi(8)]; + k[15] = s5[xi(14)] ^ s6[xi(15)] ^ s7[xi(1)] ^ sb8[xi(0)] ^ + sb8[xi(13)]; + +#undef xi +#undef zi +} + + +static int +cast5_setkey(void *ctx, const u8 * key, unsigned key_len, u32 * flags) +{ + int i; + u32 x[4]; + u32 z[4]; + u32 k[16]; + u8 p_key[16]; + struct cast5_ctx *c = (struct cast5_ctx *) ctx; + + if (key_len < 5 || key_len > 16) { + *flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; + return -EINVAL; + } + + c->rr = key_len <= 10 ? 1 : 0; + + memset(p_key, 0, 16); + memcpy(p_key, key, key_len); + + + x[0] = p_key[0] << 24 | p_key[1] << 16 | p_key[2] << 8 | p_key[3]; + x[1] = p_key[4] << 24 | p_key[5] << 16 | p_key[6] << 8 | p_key[7]; + x[2] = + p_key[8] << 24 | p_key[9] << 16 | p_key[10] << 8 | p_key[11]; + x[3] = + p_key[12] << 24 | p_key[13] << 16 | p_key[14] << 8 | p_key[15]; + + key_schedule(x, z, k); + for (i = 0; i < 16; i++) + c->Km[i] = k[i]; + key_schedule(x, z, k); + for (i = 0; i < 16; i++) + c->Kr[i] = k[i] & 0x1f; + return 0; +} + +static struct crypto_alg alg = { + .cra_name = "cast5", + .cra_flags = CRYPTO_ALG_TYPE_CIPHER, + .cra_blocksize = CAST5_BLOCK_SIZE, + .cra_ctxsize = sizeof(struct cast5_ctx), + .cra_module = THIS_MODULE, + .cra_list = LIST_HEAD_INIT(alg.cra_list), + .cra_u = { + .cipher = { + .cia_min_keysize = CAST5_MIN_KEY_SIZE, + .cia_max_keysize = CAST5_MAX_KEY_SIZE, + .cia_ivsize = CAST5_BLOCK_SIZE, + .cia_setkey = cast5_setkey, + .cia_encrypt = cast5_encrypt, + .cia_decrypt = cast5_decrypt + } + } +}; + +static int __init init(void) +{ + return crypto_register_alg(&alg); +} + +static void __exit fini(void) +{ + crypto_unregister_alg(&alg); +} + +module_init(init); +module_exit(fini); + +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("Cast5 Cipher Algorithm"); + diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/crypto/proc.c linux-2.4.23-pre8/crypto/proc.c --- linux-2.4.22/crypto/proc.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/crypto/proc.c 2003-10-22 22:49:04.000000000 +0000 @@ -60,6 +60,7 @@ switch (alg->cra_flags & CRYPTO_ALG_TYPE_MASK) { case CRYPTO_ALG_TYPE_CIPHER: + seq_printf(m, "type : cipher\n"); seq_printf(m, "blocksize : %u\n", alg->cra_blocksize); seq_printf(m, "min keysize : %u\n", alg->cra_cipher.cia_min_keysize); @@ -70,10 +71,17 @@ break; case CRYPTO_ALG_TYPE_DIGEST: + seq_printf(m, "type : digest\n"); seq_printf(m, "blocksize : %u\n", alg->cra_blocksize); seq_printf(m, "digestsize : %u\n", alg->cra_digest.dia_digestsize); break; + case CRYPTO_ALG_TYPE_COMPRESS: + seq_printf(m, "type : compression\n"); + break; + default: + seq_printf(m, "type : unknown\n"); + break; } seq_putc(m, '\n'); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/crypto/tcrypt.c linux-2.4.23-pre8/crypto/tcrypt.c --- linux-2.4.22/crypto/tcrypt.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/crypto/tcrypt.c 2003-10-22 22:49:08.000000000 +0000 @@ -2192,6 +2192,102 @@ crypto_free_tfm(tfm); } +void +test_cast5(void) +{ + unsigned int ret, i, tsize; + u8 *p, *q, *key; + struct crypto_tfm *tfm; + struct cast5_tv *c5_tv; + struct scatterlist sg[1]; + + printk("\ntesting cast5 encryption\n"); + + tfm = crypto_alloc_tfm("cast5", 0); + if (tfm == NULL) { + printk("failed to load transform for cast5 (default ecb)\n"); + return; + } + + tsize = sizeof (cast5_enc_tv_template); + if (tsize > TVMEMSIZE) { + printk("template (%u) too big for tvmem (%u)\n", tsize, + TVMEMSIZE); + return; + } + + memcpy(tvmem, cast5_enc_tv_template, tsize); + c5_tv = (void *) tvmem; + for (i = 0; i < CAST5_ENC_TEST_VECTORS; i++) { + printk("test %u (%d bit key):\n", i + 1, c5_tv[i].keylen * 8); + key = c5_tv[i].key; + + ret = crypto_cipher_setkey(tfm, key, c5_tv[i].keylen); + if (ret) { + printk("setkey() failed flags=%x\n", tfm->crt_flags); + + if (!c5_tv[i].fail) + goto out; + } + + p = c5_tv[i].plaintext; + sg[0].page = virt_to_page(p); + sg[0].offset = ((long) p & ~PAGE_MASK); + sg[0].length = sizeof(c5_tv[i].plaintext); + ret = crypto_cipher_encrypt(tfm, sg, sg, sg[0].length); + if (ret) { + printk("encrypt() failed flags=%x\n", tfm->crt_flags); + goto out; + } + + q = kmap(sg[0].page) + sg[0].offset; + hexdump(q, sizeof(c5_tv[i].ciphertext)); + + printk("%s\n", memcmp(q, c5_tv[i].ciphertext, + sizeof(c5_tv[i].ciphertext)) ? "fail" : "pass"); + } + + tsize = sizeof (cast5_dec_tv_template); + if (tsize > TVMEMSIZE) { + printk("template (%u) too big for tvmem (%u)\n", tsize, + TVMEMSIZE); + return; + } + + memcpy(tvmem, cast5_dec_tv_template, tsize); + c5_tv = (void *) tvmem; + for (i = 0; i < CAST5_DEC_TEST_VECTORS; i++) { + printk("test %u (%d bit key):\n", i + 1, c5_tv[i].keylen * 8); + key = c5_tv[i].key; + + ret = crypto_cipher_setkey(tfm, key, c5_tv[i].keylen); + if (ret) { + printk("setkey() failed flags=%x\n", tfm->crt_flags); + + if (!c5_tv[i].fail) + goto out; + } + + p = c5_tv[i].plaintext; + sg[0].page = virt_to_page(p); + sg[0].offset = ((long) p & ~PAGE_MASK); + sg[0].length = sizeof(c5_tv[i].plaintext); + ret = crypto_cipher_decrypt(tfm, sg, sg, sg[0].length); + if (ret) { + printk("decrypt() failed flags=%x\n", tfm->crt_flags); + goto out; + } + + q = kmap(sg[0].page) + sg[0].offset; + hexdump(q, sizeof(c5_tv[i].ciphertext)); + + printk("%s\n", memcmp(q, c5_tv[i].ciphertext, + sizeof(c5_tv[i].ciphertext)) ? "fail" : "pass"); + } +out: + crypto_free_tfm (tfm); +} + static void test_deflate(void) { @@ -2304,6 +2400,7 @@ test_sha384(); test_sha512(); test_deflate(); + test_cast5(); #ifdef CONFIG_CRYPTO_HMAC test_hmac_md5(); test_hmac_sha1(); @@ -2363,6 +2460,10 @@ test_deflate(); break; + case 14: + test_cast5(); + break; + #ifdef CONFIG_CRYPTO_HMAC case 100: test_hmac_md5(); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/crypto/tcrypt.h linux-2.4.23-pre8/crypto/tcrypt.h --- linux-2.4.22/crypto/tcrypt.h 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/crypto/tcrypt.h 2003-10-22 22:49:45.000000000 +0000 @@ -1682,6 +1682,74 @@ }, }; +/* Cast5 test vectors from RFC 2144 */ +#define CAST5_ENC_TEST_VECTORS 3 +#define CAST5_DEC_TEST_VECTORS 3 + +struct cast5_tv { + unsigned keylen; + unsigned fail; + u8 key[16]; + u8 plaintext[8]; + u8 ciphertext[8]; +}; + +struct cast5_tv cast5_enc_tv_template[] = +{ + { + 16, + 0, + { 0x01, 0x23, 0x45, 0x67, 0x12, 0x34, 0x56, 0x78, + 0x23, 0x45, 0x67, 0x89, 0x34, 0x56, 0x78, 0x9A }, + { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, + { 0x23, 0x8b, 0x4f, 0xe5, 0x84, 0x7e, 0x44, 0xb2 }, + + }, + { + 10, + 0, + { 0x01, 0x23, 0x45, 0x67, 0x12, 0x34, 0x56, 0x78, + 0x23, 0x45 }, + { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, + { 0xeb, 0x6a, 0x71, 0x1a, 0x2c, 0x02, 0x27, 0x1b }, + }, + { + 5, + 0, + { 0x01, 0x23, 0x45, 0x67, 0x12 }, + { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, + { 0x7a, 0xc8, 0x16, 0xd1, 0x6e, 0x9b, 0x30, 0x2e }, + } +}; + +struct cast5_tv cast5_dec_tv_template[] = +{ + { + 16, + 0, + { 0x01, 0x23, 0x45, 0x67, 0x12, 0x34, 0x56, 0x78, + 0x23, 0x45, 0x67, 0x89, 0x34, 0x56, 0x78, 0x9A }, + { 0x23, 0x8b, 0x4f, 0xe5, 0x84, 0x7e, 0x44, 0xb2 }, + { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, + + }, + { + 10, + 0, + { 0x01, 0x23, 0x45, 0x67, 0x12, 0x34, 0x56, 0x78, + 0x23, 0x45 }, + { 0xeb, 0x6a, 0x71, 0x1a, 0x2c, 0x02, 0x27, 0x1b }, + { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, + }, + { + 5, + 0, + { 0x01, 0x23, 0x45, 0x67, 0x12 }, + { 0x7a, 0xc8, 0x16, 0xd1, 0x6e, 0x9b, 0x30, 0x2e }, + { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }, + } +}; + /* * Compression stuff. */ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/Makefile linux-2.4.23-pre8/drivers/Makefile --- linux-2.4.22/drivers/Makefile 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/drivers/Makefile 2003-10-22 22:49:18.000000000 +0000 @@ -8,7 +8,7 @@ mod-subdirs := dio hil mtd sbus video macintosh usb input telephony ide \ message/i2o message/fusion scsi md ieee1394 pnp isdn atm \ - fc4 net/hamradio i2c acpi bluetooth + fc4 net/hamradio i2c acpi bluetooth usb/gadget subdir-y := parport char block net sound misc media cdrom hotplug subdir-m := $(subdir-y) @@ -28,6 +28,7 @@ subdir-$(CONFIG_MAC) += macintosh subdir-$(CONFIG_PPC32) += macintosh subdir-$(CONFIG_USB) += usb +subdir-$(CONFIG_USB_GADGET) += usb/gadget subdir-$(CONFIG_INPUT) += input subdir-$(CONFIG_PHONE) += telephony subdir-$(CONFIG_IDE) += ide diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/Config.in linux-2.4.23-pre8/drivers/acpi/Config.in --- linux-2.4.22/drivers/acpi/Config.in 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/Config.in 2003-10-22 22:49:30.000000000 +0000 @@ -8,36 +8,33 @@ comment 'ACPI Support' bool 'ACPI Support' CONFIG_ACPI if [ "$CONFIG_ACPI" = "y" ]; then - if [ "$CONFIG_SMP" = "y" ]; then - bool 'CPU Enumeration Only' CONFIG_ACPI_HT_ONLY - else - define_bool CONFIG_ACPI_HT_ONLY n - fi - if [ "$CONFIG_ACPI_HT_ONLY" = "n" ]; then + define_bool CONFIG_ACPI_BOOT y + define_bool CONFIG_ACPI_BUS y + define_bool CONFIG_ACPI_INTERPRETER y + define_bool CONFIG_ACPI_EC y + define_bool CONFIG_ACPI_POWER y + if [ "$CONFIG_PCI" = "y" ]; then + define_bool CONFIG_ACPI_PCI y + fi + define_bool CONFIG_ACPI_SLEEP y + define_bool CONFIG_ACPI_SYSTEM y + tristate ' AC Adapter' CONFIG_ACPI_AC + tristate ' Battery' CONFIG_ACPI_BATTERY + tristate ' Button' CONFIG_ACPI_BUTTON + tristate ' Fan' CONFIG_ACPI_FAN + tristate ' Processor' CONFIG_ACPI_PROCESSOR + dep_tristate ' Thermal Zone' CONFIG_ACPI_THERMAL $CONFIG_ACPI_PROCESSOR + if [ "$CONFIG_NUMA" = "y" -a "$CONFIG_X86_64" != "y" ]; then + dep_bool ' NUMA support' CONFIG_ACPI_NUMA $CONFIG_NUMA + fi + tristate ' ASUS Laptop Extras' CONFIG_ACPI_ASUS + tristate ' Toshiba Laptop Extras' CONFIG_ACPI_TOSHIBA + bool ' Debug Statements' CONFIG_ACPI_DEBUG + bool ' Relaxed AML Checking' CONFIG_ACPI_RELAXED_AML + else + if [ "$CONFIG_SMP" = "y" ]; then define_bool CONFIG_ACPI_BOOT y - define_bool CONFIG_ACPI_BUS y - define_bool CONFIG_ACPI_INTERPRETER y - define_bool CONFIG_ACPI_EC y - define_bool CONFIG_ACPI_POWER y - if [ "$CONFIG_PCI" = "y" ]; then - define_bool CONFIG_ACPI_PCI y - fi - define_bool CONFIG_ACPI_SLEEP y - define_bool CONFIG_ACPI_SYSTEM y - tristate ' AC Adapter' CONFIG_ACPI_AC - tristate ' Battery' CONFIG_ACPI_BATTERY - tristate ' Button' CONFIG_ACPI_BUTTON - tristate ' Fan' CONFIG_ACPI_FAN - tristate ' Processor' CONFIG_ACPI_PROCESSOR - dep_tristate ' Thermal Zone' CONFIG_ACPI_THERMAL $CONFIG_ACPI_PROCESSOR - if [ "$CONFIG_NUMA" = "y" -a "$CONFIG_X86_64" != "y" ]; then - dep_bool ' NUMA support' CONFIG_ACPI_NUMA $CONFIG_NUMA - fi - tristate ' ASUS Laptop Extras' CONFIG_ACPI_ASUS - tristate ' Toshiba Laptop Extras' CONFIG_ACPI_TOSHIBA - bool ' Debug Statements' CONFIG_ACPI_DEBUG - bool ' Relaxed AML Checking' CONFIG_ACPI_RELAXED_AML fi fi diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/asus_acpi.c linux-2.4.23-pre8/drivers/acpi/asus_acpi.c --- linux-2.4.22/drivers/acpi/asus_acpi.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/asus_acpi.c 2003-10-22 22:49:06.000000000 +0000 @@ -26,13 +26,13 @@ * Johann Wiesner - Small compile fixes * John Belmonte - ACPI code for Toshiba laptop was a good starting point. * - * TODO + * TODO: * add Fn key status - * Add mode selection on module loading (parameter) -> still necessary ? + * Add mode selection on module loading (parameter) -> still necessary? * Complete display switching -- may require dirty hacks? - * */ +#include #include #include #include @@ -41,7 +41,7 @@ #include #include -#define ASUS_ACPI_VERSION "0.24a" +#define ASUS_ACPI_VERSION "0.26" #define PROC_ASUS "asus" //the directory #define PROC_MLED "mled" @@ -73,7 +73,6 @@ MODULE_LICENSE("GPL"); EXPORT_NO_SYMBOLS; - static uid_t asus_uid = 0; static gid_t asus_gid = 0; MODULE_PARM(asus_uid, "i"); @@ -111,20 +110,24 @@ struct model_data *methods; //methods available on the laptop u8 brightness; //brighness level enum { - L2X = 0, //L200D -> TODO check Q11 (Fn+F8) - // Calling this method simply hang the + A1X=0, //A1340D, A1300F + A2X, //A2500H + D1X, //D1 + L1X, //L1400B + L2X, //L2000D -> TODO check Q11 (Fn+F8) + // Calling this method simply hangs the // computer, ISMI method hangs the laptop. - L3X, //L3C L3D, //L3400D + L3X, //L3C + L5X, //L5C TODO this model seems to have one more + // LED, add support M2X, //M2400E + M3N, //M3700N, but also S1300N -> TODO WLED S1X, //S1300A -> TODO special keys do not work ? - D1X, //D1 - L1X, //L1400B - A1X, //A1340D, A1300F - J1X, //S200 (J1) - //TODO A1370D does not seems to have a ATK device + S2X, //S200 (J1 reported), Victor MP-XP7210 + //TODO A1370D does not seem to have an ATK device // L8400 model doesn't have ATK - END_MODEL, + END_MODEL } model; //Models currently supported u16 event_count[128]; //count for each event TODO make this better }; @@ -134,7 +137,8 @@ #define S1X_PREFIX "\\_SB.PCI0.PX40." #define L1X_PREFIX S1X_PREFIX #define A1X_PREFIX "\\_SB.PCI0.ISA.EC0." -#define J1X_PREFIX A1X_PREFIX +#define S2X_PREFIX A1X_PREFIX +#define M3N_PREFIX "\\_SB.PCI0.SBRG.EC0." static struct model_data model_conf[END_MODEL] = { /* @@ -148,33 +152,43 @@ * it seems to be a kind of switch, but what for ? * */ + {"A1X", "MLED", "\\MAIL", NULL, NULL, A1X_PREFIX "_Q10", "\\BKLI", + A1X_PREFIX "_Q0E", A1X_PREFIX "_Q0F", NULL, NULL, NULL, NULL, NULL}, + + {"A2X", "MLED", NULL, "WLED", "\\SG66", "\\Q10", "\\BAOF", + "\\Q0E", "\\Q0F", "SPLV", "GPLV", "\\CMOD", "SDSP", "\\INFB"}, + + {"D1X", "MLED", NULL, NULL, NULL, "\\Q0D", "\\GP11", + "\\Q0C", "\\Q0B", NULL, NULL, "\\BLVL", "SDSP","\\INFB"}, + + {"L1X", "MLED", NULL, "WLED", NULL, L1X_PREFIX "Q10", "\\PNOF", + L1X_PREFIX "Q0F", L1X_PREFIX "Q0E", "SPLV", "GPLV", "\\BRIT", NULL, NULL}, + {"L2X", "MLED", "\\SGP6", "WLED", "\\RCP3", "\\Q10", "\\SGP0", "\\Q0E", "\\Q0F", NULL, NULL, NULL, "SDSP", "\\INFB"}, + {"L3D", "MLED", "\\MALD", "WLED", NULL, "\\Q10", "\\BKLG", + "\\Q0E", "\\Q0F", "SPLV", "GPLV", "\\BLVL", "SDSP", "\\INFB"}, + {"L3X", "MLED", NULL, "WLED", NULL, L3X_PREFIX "_Q10", "\\GL32", L3X_PREFIX "_Q0F", L3X_PREFIX "_Q0E", "SPLV", "GPLV", "\\BLVL", "SDSP", "\\_SB.PCI0.PCI1.VGAC.NMAP"}, - {"L3D", "MLED", "\\MALD", "WLED", NULL, "\\Q10", "\\BKLG", - "\\Q0E", "\\Q0F", "SPLV", "GPLV", "\\BLVL", "SDSP", "\\INFB"}, - + {"L5X", "MLED", NULL, "WLED", "WRED", "\\Q0D", "\\BAOF", + "\\Q0C","\\Q0B", "SPLV", "GPLV", NULL, "SDSP", "\\INFB"}, + {"M2X", "MLED", NULL, "WLED", NULL, "\\Q10", "\\GP06", "\\Q0E","\\Q0F", "SPLV", "GPLV", NULL, "SDSP", "\\INFB"}, + + {"M3N", "MLED", NULL, "WLED", "\\PO33", M3N_PREFIX "_Q10", "\\BKLT", + M3N_PREFIX "_Q0F", M3N_PREFIX "_Q0E", "SPLV", "GPLV", "\\LBTN", "SDSP", + "\\ADVG"}, {"S1X", "MLED", "\\EMLE", "WLED", NULL, S1X_PREFIX "Q10", "\\PNOF", S1X_PREFIX "Q0F", S1X_PREFIX "Q0E", "SPLV", "GPLV", "\\BRIT", NULL, NULL}, - {"D1X", "MLED", NULL, NULL, NULL, "\\Q0D", "\\GP11", - "\\Q0C", "\\Q0B", NULL, NULL, "\\BLVL", "SDSP","\\INFB"}, - - {"L1X", "MLED", NULL, "WLED", NULL, L1X_PREFIX "Q10", "\\PNOF", - L1X_PREFIX "Q0F", L1X_PREFIX "Q0E", "SPLV", "GPLV", "\\BRIT", NULL, NULL}, - - {"A1X", "MLED", "\\MAIL", NULL, NULL, A1X_PREFIX "_Q10", "\\BKLI", - A1X_PREFIX "_Q0E", A1X_PREFIX "_Q0F", NULL, NULL, NULL, NULL, NULL}, - - {"J1X", "MLED", "\\MAIL", NULL, NULL, J1X_PREFIX "_Q10", "\\BKLI", - J1X_PREFIX "_Q0B", J1X_PREFIX "_Q0A", NULL, NULL, NULL, NULL, NULL} + {"S2X", "MLED", "\\MAIL", NULL, NULL, S2X_PREFIX "_Q10", "\\BKLI", + S2X_PREFIX "_Q0B", S2X_PREFIX "_Q0A", NULL, NULL, NULL, NULL, NULL} }; /* procdir we use */ @@ -235,7 +249,7 @@ output.length = sizeof(out_obj); output.pointer = &out_obj; - status = acpi_evaluate_object(handle, (char*) method, NULL, &output); + status = acpi_evaluate_object(handle, (char *) method, NULL, &output); *val = out_obj.integer.value; return (status == AE_OK) && (out_obj.type == ACPI_TYPE_INTEGER); } @@ -250,6 +264,7 @@ void *data) { int len = 0; + int sfun; struct asus_hotk *hotk = (struct asus_hotk *) data; char buf[16]; //enough for all info /* @@ -258,28 +273,27 @@ */ len += sprintf(page, ACPI_HOTK_NAME " " ASUS_ACPI_VERSION "\n"); - len += - sprintf(page + len, "Model reference : %s\n", - hotk->methods->name); + len += sprintf(page + len, "Model reference : %s\n", + hotk->methods->name); + if(read_acpi_int(hotk->handle, "SFUN", &sfun)) + len += sprintf(page + len, "SFUN value : 0x%04x\n", sfun); if (asus_info) { - snprintf(buf, 5, "%s", asus_info->signature); - len += sprintf(page + len, "ACPI signature : %s\n", buf); snprintf(buf, 16, "%d", asus_info->length); - len += sprintf(page + len, "Table length : %s\n", buf); - snprintf(buf, 16, "%d", asus_info->revision); - len += sprintf(page + len, "ACPI minor version : %s\n", buf); + len += sprintf(page + len, "DSDT length : %s\n", buf); snprintf(buf, 16, "%d", asus_info->checksum); - len += sprintf(page + len, "Checksum : %s\n", buf); + len += sprintf(page + len, "DSDT checksum : %s\n", buf); + snprintf(buf, 16, "%d", asus_info->revision); + len += sprintf(page + len, "DSDT revision : %s\n", buf); snprintf(buf, 7, "%s", asus_info->oem_id); - len += sprintf(page + len, "OEM identification : %s\n", buf); + len += sprintf(page + len, "OEM id : %s\n", buf); snprintf(buf, 9, "%s", asus_info->oem_table_id); len += sprintf(page + len, "OEM table id : %s\n", buf); snprintf(buf, 16, "%x", asus_info->oem_revision); - len += sprintf(page + len, "OEM rev number : 0x%s\n", buf); + len += sprintf(page + len, "OEM revision : 0x%s\n", buf); snprintf(buf, 5, "%s", asus_info->asl_compiler_id); - len += sprintf(page + len, "ASL comp vendor ID : %s\n", buf); + len += sprintf(page + len, "ASL comp vendor id : %s\n", buf); snprintf(buf, 16, "%x", asus_info->asl_compiler_revision); - len += sprintf(page + len, "ASL comp rev number: 0x%s\n", buf); + len += sprintf(page + len, "ASL comp revision : 0x%s\n", buf); } return len; @@ -305,7 +319,7 @@ &led_status)) len = sprintf(page, "%d\n", led_status); else - printk(KERN_NOTICE "Asus ACPI: Error reading MLED " + printk(KERN_WARNING "Asus ACPI: Error reading MLED " "status\n"); } else { len = sprintf(page, "%d\n", (hotk->status & MLED_ON) ? 1 : 0); @@ -335,7 +349,7 @@ /* We don't have to check mt_mled exists if we are here :) */ if (!write_acpi_int(hotk->handle, hotk->methods->mt_mled, led_out, NULL)) - printk(KERN_NOTICE "Asus ACPI: MLED write failed\n"); + printk(KERN_WARNING "Asus ACPI: MLED write failed\n"); @@ -356,11 +370,11 @@ int led_status; if (hotk->methods->wled_status) { - if (read_acpi_int(NULL, hotk->methods->mled_status, + if (read_acpi_int(NULL, hotk->methods->wled_status, &led_status)) len = sprintf(page, "%d\n", led_status); else - printk(KERN_NOTICE "Asus ACPI: Error reading WLED " + printk(KERN_WARNING "Asus ACPI: Error reading WLED " "status\n"); } else { len = sprintf(page, "%d\n", (hotk->status & WLED_ON) ? 1 : 0); @@ -387,7 +401,7 @@ /* We don't have to check if mt_wled exists if we are here :) */ if (!write_acpi_int(hotk->handle, hotk->methods->mt_wled, led_out, NULL)) - printk(KERN_NOTICE "Asus ACPI: WLED write failed\n"); + printk(KERN_WARNING "Asus ACPI: WLED write failed\n"); return count; @@ -400,7 +414,7 @@ /* We don't have to check anything, if we are here */ if (!read_acpi_int(NULL, hotk->methods->lcd_status, &lcd)) - printk(KERN_NOTICE "Asus ACPI: Error reading LCD status\n"); + printk(KERN_WARNING "Asus ACPI: Error reading LCD status\n"); if (hotk->model == L2X) lcd = ~lcd; @@ -439,7 +453,7 @@ acpi_evaluate_object(NULL, hotk->methods->mt_lcd_switch, NULL, NULL); if (ACPI_FAILURE(status)) - printk(KERN_NOTICE "Asus ACPI: Error switching LCD\n"); + printk(KERN_WARNING "Asus ACPI: Error switching LCD\n"); } return count; @@ -453,15 +467,15 @@ { acpi_status status = 0; - /* ATKD laptop */ + /* SPLV laptop */ if(hotk->methods->brightness_set) { if (!write_acpi_int(hotk->handle, hotk->methods->brightness_set, value, NULL)) - printk(KERN_NOTICE "Asus ACPI: Error changing brightness\n"); + printk(KERN_WARNING "Asus ACPI: Error changing brightness\n"); return; } - /* HOTK laptop if we are here, act as appropriate */ + /* No SPLV method if we are here, act as appropriate */ value -= hotk->brightness; while (value != 0) { status = acpi_evaluate_object(NULL, (value > 0) ? @@ -470,7 +484,7 @@ NULL, NULL); (value > 0) ? value-- : value++; if (ACPI_FAILURE(status)) - printk(KERN_NOTICE "Asus ACPI: Error changing brightness\n"); + printk(KERN_WARNING "Asus ACPI: Error changing brightness\n"); } return; } @@ -479,15 +493,15 @@ { int value; - if(hotk->methods->brightness_get) { /* ATKD laptop */ + if(hotk->methods->brightness_get) { /* SPLV/GPLV laptop */ if (!read_acpi_int(hotk->handle, hotk->methods->brightness_get, &value)) - printk(KERN_NOTICE "Asus ACPI: Error reading brightness\n"); + printk(KERN_WARNING "Asus ACPI: Error reading brightness\n"); } else if (hotk->methods->brightness_status) { /* For D1 for example */ if (!read_acpi_int(NULL, hotk->methods->brightness_status, &value)) - printk(KERN_NOTICE "Asus ACPI: Error reading brightness\n"); - } else /* HOTK laptop */ + printk(KERN_WARNING "Asus ACPI: Error reading brightness\n"); + } else /* No GPLV method */ value = hotk->brightness; return value; } @@ -513,7 +527,7 @@ /* 0 <= value <= 15 */ set_brightness(value, hotk); } else { - printk(KERN_NOTICE "Asus ACPI: Error reading user input\n"); + printk(KERN_WARNING "Asus ACPI: Error reading user input\n"); } return count; @@ -524,7 +538,7 @@ /* no sanity check needed for now */ if (!write_acpi_int(hotk->handle, hotk->methods->display_set, value, NULL)) - printk(KERN_NOTICE "Asus ACPI: Error setting display\n"); + printk(KERN_WARNING "Asus ACPI: Error setting display\n"); return; } @@ -541,12 +555,12 @@ struct asus_hotk *hotk = (struct asus_hotk *) data; if (!read_acpi_int(hotk->handle, hotk->methods->display_get, &value)) - printk(KERN_NOTICE "Asus ACPI: Error reading display status\n"); + printk(KERN_WARNING "Asus ACPI: Error reading display status\n"); return sprintf(page, "%d\n", value); } /* - * Preliminary support for display switching. As of now: 0x01 should activate + * Experimental support for display switching. As of now: 0x01 should activate * the LCD output, 0x02 should do for CRT, and 0x04 for TV-Out. Any combination * (bitwise) of these will suffice. I never actually tested 3 displays hooked up * simultaneously, so be warned. @@ -563,13 +577,13 @@ if (sscanf(buffer, "%d", &value) == 1) set_display(value, hotk); else { - printk(KERN_NOTICE "Asus ACPI: Error reading user input\n"); + printk(KERN_WARNING "Asus ACPI: Error reading user input\n"); } return count; } -static int asus_hotk_add_fs(struct acpi_device *device) +static int __init asus_hotk_add_fs(struct acpi_device *device) { struct proc_dir_entry *proc; struct asus_hotk *hotk = acpi_driver_data(device); @@ -583,7 +597,7 @@ if ((asus_uid == 0) && (asus_gid == 0)){ mode = S_IFREG | S_IRUGO | S_IWUGO; - }else{ + } else { mode = S_IFREG | S_IRUSR | S_IRGRP | S_IWUSR | S_IWGRP; } @@ -599,7 +613,7 @@ proc->uid = asus_uid; proc->gid = asus_gid;; } else { - printk(KERN_NOTICE " Unable to create " PROC_INFOS + printk(KERN_WARNING " Unable to create " PROC_INFOS " fs entry\n"); } @@ -613,7 +627,7 @@ proc->uid = asus_uid; proc->gid = asus_gid;; } else { - printk(KERN_NOTICE " Unable to create " PROC_WLED + printk(KERN_WARNING " Unable to create " PROC_WLED " fs entry\n"); } } @@ -628,7 +642,7 @@ proc->uid = asus_uid; proc->gid = asus_gid;; } else { - printk(KERN_NOTICE " Unable to create " PROC_MLED + printk(KERN_WARNING " Unable to create " PROC_MLED " fs entry\n"); } } @@ -647,7 +661,7 @@ proc->uid = asus_uid; proc->gid = asus_gid;; } else { - printk(KERN_NOTICE " Unable to create " PROC_LCD + printk(KERN_WARNING " Unable to create " PROC_LCD " fs entry\n"); } } @@ -663,7 +677,7 @@ proc->uid = asus_uid; proc->gid = asus_gid;; } else { - printk(KERN_NOTICE " Unable to create " PROC_BRN + printk(KERN_WARNING " Unable to create " PROC_BRN " fs entry\n"); } } @@ -678,19 +692,19 @@ proc->uid = asus_uid; proc->gid = asus_gid;; } else { - printk(KERN_NOTICE " Unable to create " PROC_DISP + printk(KERN_WARNING " Unable to create " PROC_DISP " fs entry\n"); } } - return (AE_OK); + return 0; } static void asus_hotk_notify(acpi_handle handle, u32 event, void *data) { /* TODO Find a better way to handle events count. Here, in data, we receive - * the hotk, so we can make anything !! + * the hotk, so we can do anything! */ struct asus_hotk *hotk = (struct asus_hotk *) data; @@ -713,19 +727,40 @@ * This function is used to initialize the hotk with right values. In this * method, we can make all the detection we want, and modify the hotk struct */ -static int asus_hotk_get_info(struct asus_hotk *hotk) +static int __init asus_hotk_get_info(struct asus_hotk *hotk) { struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; + struct acpi_buffer dsdt = { ACPI_ALLOCATE_BUFFER, NULL }; union acpi_object *model = NULL; + int bsts_result; + acpi_status status; - /* - * We have to write 0 on init this far for all ASUS models + /* + * Get DSDT headers early enough to allow for differentiating between + * models, but late enough to allow acpi_bus_register_driver() to fail + * before doing anything ACPI-specific. Should we encounter a machine, + * which needs special handling (i.e. its hotkey device has a different + * HID), this bit will be moved. A global variable asus_info contains + * the DSDT header. */ + status = acpi_get_table(ACPI_TABLE_DSDT, 1, &dsdt); + if (ACPI_FAILURE(status)) + printk(KERN_WARNING " Couldn't get the DSDT table header\n"); + else + asus_info = (struct acpi_table_header *) dsdt.pointer; + + /* We have to write 0 on init this far for all ASUS models */ if (!write_acpi_int(hotk->handle, "INIT", 0, &buffer)) { - printk(KERN_NOTICE " Hotkey initialization failed\n"); + printk(KERN_ERR " Hotkey initialization failed\n"); return -ENODEV; } + /* For testing purposes */ + if (!read_acpi_int(hotk->handle, "BSTS", &bsts_result)) + printk(KERN_WARNING " Error calling BSTS\n"); + else if (bsts_result) + printk(KERN_NOTICE " BSTS called, 0x%02x returned\n", bsts_result); + /* * Here, we also use asus_info to make decision. For example, on INIT * method, S1X and L1X models both reports to be L84F, but they don't @@ -750,26 +785,34 @@ hotk->model = L3X; else if (strncmp(model->string.pointer, "M2", 2) == 0) hotk->model = M2X; + else if (strncmp(model->string.pointer, "M3N", 3) == 0 || + strncmp(model->string.pointer, "S1N", 3) == 0) + hotk->model = M3N; /* S1300N is similar enough */ else if (strncmp(model->string.pointer, "L2", 2) == 0) hotk->model = L2X; - else if (strncmp(model->string.pointer, "L8", 2) == 0) + else if (strncmp(model->string.pointer, "L8", 2) == 0) { /* S1300A reports L84F, but L1400B too */ - if (strncmp(asus_info->oem_table_id, "L1", 2) == 0) - hotk->model = L1X; - else + if (asus_info) { + if (strncmp(asus_info->oem_table_id, "L1", 2) == 0) + hotk->model = L1X; + } else hotk->model = S1X; + } else if (strncmp(model->string.pointer, "D1", 2) == 0) hotk->model = D1X; else if (strncmp(model->string.pointer, "A1", 2) == 0) hotk->model = A1X; + else if (strncmp(model->string.pointer, "A2", 2) == 0) + hotk->model = A2X; else if (strncmp(model->string.pointer, "J1", 2) == 0) - hotk->model = J1X; - + hotk->model = S2X; + else if (strncmp(model->string.pointer, "L5", 2) == 0) + hotk->model = L5X; if (hotk->model == END_MODEL) { /* By default use the same values, as I don't know others */ - printk("unsupported, trying default values, contact the " - "developers\n"); + printk("unsupported, trying default values, supply the " + "developers with your DSDT\n"); hotk->model = L2X; } else { printk("supported\n"); @@ -784,7 +827,7 @@ -static int asus_hotk_check(struct asus_hotk *hotk) +static int __init asus_hotk_check(struct asus_hotk *hotk) { int result = 0; @@ -798,7 +841,7 @@ if (hotk->device->status.present) { result = asus_hotk_get_info(hotk); } else { - printk(KERN_NOTICE " Hotkey device not present, aborting\n"); + printk(KERN_ERR " Hotkey device not present, aborting\n"); return(-EINVAL); } @@ -807,7 +850,7 @@ -static int asus_hotk_add(struct acpi_device *device) +static int __init asus_hotk_add(struct acpi_device *device) { struct asus_hotk *hotk = NULL; acpi_status status = AE_OK; @@ -816,6 +859,9 @@ if (!device) return(-EINVAL); + printk(KERN_NOTICE "Asus Laptop ACPI Extras version %s\n", + ASUS_ACPI_VERSION); + hotk = (struct asus_hotk *) kmalloc(sizeof(struct asus_hotk), GFP_KERNEL); if (!hotk) @@ -843,25 +889,23 @@ */ status = acpi_install_notify_handler(hotk->handle, ACPI_SYSTEM_NOTIFY, asus_hotk_notify, hotk); - if (ACPI_FAILURE(status)) { - printk(KERN_NOTICE - " Error installing notify handler\n"); - } else { - printk(KERN_DEBUG - " Notify Handler installed successfully\n"); - } + if (ACPI_FAILURE(status)) + printk(KERN_ERR " Error installing notify handler\n"); - /* For HOTK laptops: init the hotk->brightness value */ + /* For laptops without GPLV: init the hotk->brightness value */ if ((!hotk->methods->brightness_get) && (!hotk->methods->brightness_status) && (hotk->methods->brightness_up && hotk->methods->brightness_down)) { status = acpi_evaluate_object(NULL, hotk->methods->brightness_down, NULL, NULL); if (ACPI_FAILURE(status)) - printk(KERN_NOTICE " Error changing brightness\n"); - status = acpi_evaluate_object(NULL, hotk->methods->brightness_up, - NULL, NULL); - if (ACPI_FAILURE(status)) - printk(KERN_NOTICE " Error changing brightness\n"); + printk(KERN_WARNING " Error changing brightness\n"); + else { + status = acpi_evaluate_object(NULL, hotk->methods->brightness_up, + NULL, NULL); + if (ACPI_FAILURE(status)) + printk(KERN_WARNING " Strange, error changing" + " brightness\n"); + } } end: @@ -888,7 +932,7 @@ status = acpi_remove_notify_handler(hotk->handle, ACPI_SYSTEM_NOTIFY, asus_hotk_notify); if (ACPI_FAILURE(status)) - printk(KERN_NOTICE "Error removing notify handler\n"); + printk(KERN_ERR "Asus ACPI: Error removing notify handler\n"); kfree(hotk); @@ -900,35 +944,17 @@ static int __init asus_acpi_init(void) { - int result = 0; - acpi_status status = 0; - struct acpi_buffer dsdt = { ACPI_ALLOCATE_BUFFER, NULL }; - - printk(KERN_NOTICE "Asus Laptop ACPI Extras version %s\n", - ASUS_ACPI_VERSION); - /* - * Here is the code to know the model we are running on. We need to - * know this before calling the acpi_bus_register_driver function, in - * case the HID for the laptop we are running on is different from - * ACPI_HOTK_HID, which I have never seen yet :) - * - * This information is then available in the global var asus_info - */ - status = acpi_get_table(ACPI_TABLE_DSDT, 1, &dsdt); - if (ACPI_FAILURE(status)) { - printk(KERN_NOTICE " Couldn't get the DSDT table header\n"); - } else { - asus_info = (struct acpi_table_header *) dsdt.pointer; - } + int result; asus_proc_dir = proc_mkdir(PROC_ASUS, acpi_root_dir); - if (!asus_proc_dir) + if (!asus_proc_dir) { + printk(KERN_ERR "Asus ACPI: Unable to create /proc entry"); return(-ENODEV); + } asus_proc_dir->owner = THIS_MODULE; result = acpi_bus_register_driver(&asus_hotk_driver); if (result < 0) { - printk(KERN_NOTICE " Error registering " ACPI_HOTK_NAME " \n"); remove_proc_entry(PROC_ASUS, acpi_root_dir); return(-ENODEV); } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/battery.c linux-2.4.23-pre8/drivers/acpi/battery.c --- linux-2.4.22/drivers/acpi/battery.c 2003-08-25 11:44:40.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/battery.c 2003-10-22 22:49:17.000000000 +0000 @@ -348,7 +348,7 @@ ACPI_FUNCTION_TRACE("acpi_battery_read_info"); - if (!battery) + if (!battery || (off != 0)) goto end; if (battery->flags.present) @@ -447,7 +447,7 @@ ACPI_FUNCTION_TRACE("acpi_battery_read_state"); - if (!battery) + if (!battery || (off != 0)) goto end; if (battery->flags.present) @@ -531,7 +531,7 @@ ACPI_FUNCTION_TRACE("acpi_battery_read_alarm"); - if (!battery) + if (!battery || (off != 0)) goto end; if (!battery->flags.present) { diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/bus.c linux-2.4.23-pre8/drivers/acpi/bus.c --- linux-2.4.22/drivers/acpi/bus.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/bus.c 2003-10-22 22:49:01.000000000 +0000 @@ -49,7 +49,7 @@ #define PREFIX "ACPI: " -extern void eisa_set_level_irq(unsigned int irq); +extern void acpi_pic_set_level_irq(unsigned int irq); extern int acpi_disabled; @@ -1881,7 +1881,7 @@ if (acpi_ioapic) mp_config_ioapic_for_sci(acpi_fadt.sci_int); else - eisa_set_level_irq(acpi_fadt.sci_int); + acpi_pic_set_level_irq(acpi_fadt.sci_int); #endif status = acpi_enable_subsystem(ACPI_FULL_INITIALIZATION); @@ -1898,9 +1898,7 @@ * of that. */ result = acpi_ec_ecdt_probe(); - if (result) { - goto error1; - } + /* Ignore result. Not having an ECDT is not fatal. */ #endif status = acpi_initialize_objects(ACPI_FULL_INITIALIZATION); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/button.c linux-2.4.23-pre8/drivers/acpi/button.c --- linux-2.4.22/drivers/acpi/button.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/button.c 2003-10-22 22:49:17.000000000 +0000 @@ -85,7 +85,7 @@ ACPI_FUNCTION_TRACE("acpi_button_read_info"); - if (!button || !button->device) + if (!button || !button->device || (off != 0)) goto end; p += sprintf(p, "type: %s\n", @@ -119,7 +119,7 @@ ACPI_FUNCTION_TRACE("acpi_button_lid_read_state"); - if (!button || !button->device) + if (!button || !button->device || (off != 0)) goto end; status=acpi_evaluate_integer(button->handle,"_LID",NULL,&state); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/dispatcher/dsfield.c linux-2.4.23-pre8/drivers/acpi/dispatcher/dsfield.c --- linux-2.4.22/drivers/acpi/dispatcher/dsfield.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/dispatcher/dsfield.c 2003-10-22 22:47:44.000000000 +0000 @@ -105,27 +105,33 @@ return_ACPI_STATUS (AE_AML_NO_OPERAND); } - /* - * During the load phase, we want to enter the name of the field into - * the namespace. During the execute phase (when we evaluate the size - * operand), we want to lookup the name - */ - if (walk_state->parse_flags & ACPI_PARSE_EXECUTE) { - flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE; + if (walk_state->deferred_node) { + node = walk_state->deferred_node; + status = AE_OK; } else { - flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE | ACPI_NS_ERROR_IF_FOUND; - } + /* + * During the load phase, we want to enter the name of the field into + * the namespace. During the execute phase (when we evaluate the size + * operand), we want to lookup the name + */ + if (walk_state->parse_flags & ACPI_PARSE_EXECUTE) { + flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE; + } + else { + flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE | ACPI_NS_ERROR_IF_FOUND; + } - /* - * Enter the name_string into the namespace - */ - status = acpi_ns_lookup (walk_state->scope_info, arg->common.value.string, - ACPI_TYPE_ANY, ACPI_IMODE_LOAD_PASS1, - flags, walk_state, &(node)); - if (ACPI_FAILURE (status)) { - ACPI_REPORT_NSERROR (arg->common.value.string, status); - return_ACPI_STATUS (status); + /* + * Enter the name_string into the namespace + */ + status = acpi_ns_lookup (walk_state->scope_info, arg->common.value.string, + ACPI_TYPE_ANY, ACPI_IMODE_LOAD_PASS1, + flags, walk_state, &(node)); + if (ACPI_FAILURE (status)) { + ACPI_REPORT_NSERROR (arg->common.value.string, status); + return_ACPI_STATUS (status); + } } /* We could put the returned object (Node) on the object stack for later, but diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/dispatcher/dsinit.c linux-2.4.23-pre8/drivers/acpi/dispatcher/dsinit.c --- linux-2.4.22/drivers/acpi/dispatcher/dsinit.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/dispatcher/dsinit.c 2003-10-22 22:49:00.000000000 +0000 @@ -135,7 +135,7 @@ } /* - * Always parse methods to detect errors, we may delete + * Always parse methods to detect errors, we will delete * the parse tree below */ status = acpi_ds_parse_method (obj_handle); @@ -150,7 +150,7 @@ } /* - * Delete the parse tree. We simple re-parse the method + * Delete the parse tree. We simply re-parse the method * for every execution since there isn't much overhead */ acpi_ns_delete_namespace_subtree (obj_handle); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/dispatcher/dsopcode.c linux-2.4.23-pre8/drivers/acpi/dispatcher/dsopcode.c --- linux-2.4.22/drivers/acpi/dispatcher/dsopcode.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/dispatcher/dsopcode.c 2003-10-22 22:48:19.000000000 +0000 @@ -65,7 +65,7 @@ * * RETURN: Status. * - * DESCRIPTION: Late execution of region or field arguments + * DESCRIPTION: Late (deferred) execution of region or field arguments * ****************************************************************************/ @@ -111,7 +111,10 @@ return_ACPI_STATUS (status); } + /* Mark this parse as a deferred opcode */ + walk_state->parse_flags = ACPI_PARSE_DEFERRED_OP; + walk_state->deferred_node = node; /* Pass1: Parse the entire declaration */ @@ -128,7 +131,7 @@ arg->common.node = node; acpi_ps_delete_parse_tree (op); - /* Evaluate the address and length arguments for the Buffer Field */ + /* Evaluate the deferred arguments */ op = acpi_ps_alloc_op (AML_INT_EVAL_SUBTREE_OP); if (!op) { @@ -144,6 +147,8 @@ return_ACPI_STATUS (AE_NO_MEMORY); } + /* Execute the opcode and arguments */ + status = acpi_ds_init_aml_walk (walk_state, op, NULL, aml_start, aml_length, NULL, NULL, 3); if (ACPI_FAILURE (status)) { @@ -151,6 +156,9 @@ return_ACPI_STATUS (status); } + /* Mark this execution as a deferred opcode */ + + walk_state->deferred_node = node; status = acpi_ps_parse_aml (walk_state); acpi_ps_delete_parse_tree (op); return_ACPI_STATUS (status); @@ -192,7 +200,7 @@ node = obj_desc->buffer_field.node; ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname (ACPI_TYPE_BUFFER_FIELD, node, NULL)); - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s] buffer_field JIT Init\n", + ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s] buffer_field Arg Init\n", node->name.ascii)); /* Execute the AML code for the term_arg arguments */ @@ -207,7 +215,7 @@ * * FUNCTION: acpi_ds_get_buffer_arguments * - * PARAMETERS: obj_desc - A valid Bufferobject + * PARAMETERS: obj_desc - A valid Buffer object * * RETURN: Status. * @@ -240,7 +248,7 @@ return_ACPI_STATUS (AE_AML_INTERNAL); } - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Buffer JIT Init\n")); + ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Buffer Arg Init\n")); /* Execute the AML code for the term_arg arguments */ @@ -254,7 +262,7 @@ * * FUNCTION: acpi_ds_get_package_arguments * - * PARAMETERS: obj_desc - A valid Packageobject + * PARAMETERS: obj_desc - A valid Package object * * RETURN: Status. * @@ -287,7 +295,7 @@ return_ACPI_STATUS (AE_AML_INTERNAL); } - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Package JIT Init\n")); + ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Package Arg Init\n")); /* Execute the AML code for the term_arg arguments */ @@ -335,11 +343,12 @@ node = obj_desc->region.node; - ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname (ACPI_TYPE_REGION, node, NULL)); + ACPI_DEBUG_EXEC (acpi_ut_display_init_pathname (ACPI_TYPE_REGION, node, NULL)); - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s] op_region Init at AML %p\n", + ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s] op_region Arg Init at AML %p\n", node->name.ascii, extra_desc->extra.aml_start)); + /* Execute the argument AML */ status = acpi_ds_execute_arguments (node, acpi_ns_get_parent_node (node), extra_desc->extra.aml_length, extra_desc->extra.aml_start); @@ -505,14 +514,16 @@ goto cleanup; } - /* Entire field must fit within the current length of the buffer */ if ((bit_offset + bit_count) > (8 * (u32) buffer_desc->buffer.length)) { ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, - "Field size %d exceeds Buffer size %d (bits)\n", - bit_offset + bit_count, 8 * (u32) buffer_desc->buffer.length)); + "Field [%4.4s] size %d exceeds Buffer [%4.4s] size %d (bits)\n", + ((struct acpi_namespace_node *) result_desc)->name.ascii, + bit_offset + bit_count, + buffer_desc->buffer.node->name.ascii, + 8 * (u32) buffer_desc->buffer.length)); status = AE_AML_BUFFER_LIMIT; goto cleanup; } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/dispatcher/dsutils.c linux-2.4.23-pre8/drivers/acpi/dispatcher/dsutils.c --- linux-2.4.22/drivers/acpi/dispatcher/dsutils.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/dispatcher/dsutils.c 2003-10-22 22:48:54.000000000 +0000 @@ -53,6 +53,7 @@ #define _COMPONENT ACPI_DISPATCHER ACPI_MODULE_NAME ("dsutils") + #ifndef ACPI_NO_METHOD_EXECUTION /******************************************************************************* @@ -196,7 +197,6 @@ acpi_ps_get_opcode_name (op->common.parent->common.aml_opcode), op)); return_VALUE (FALSE); - } @@ -239,7 +239,6 @@ return_VOID; } - if (!acpi_ds_is_result_used (op, walk_state)) { /* * Must pop the result stack (obj_desc should be equal to result_obj) @@ -389,61 +388,77 @@ * in name_string */ + /* - * Differentiate between a namespace "create" operation - * versus a "lookup" operation (IMODE_LOAD_PASS2 vs. - * IMODE_EXECUTE) in order to support the creation of - * namespace objects during the execution of control methods. + * Special handling for buffer_field declarations. This is a deferred + * opcode that unfortunately defines the field name as the last + * parameter instead of the first. We get here when we are performing + * the deferred execution, so the actual name of the field is already + * in the namespace. We don't want to attempt to look it up again + * because we may be executing in a different scope than where the + * actual opcode exists. */ - parent_op = arg->common.parent; - op_info = acpi_ps_get_opcode_info (parent_op->common.aml_opcode); - if ((op_info->flags & AML_NSNODE) && - (parent_op->common.aml_opcode != AML_INT_METHODCALL_OP) && - (parent_op->common.aml_opcode != AML_REGION_OP) && - (parent_op->common.aml_opcode != AML_INT_NAMEPATH_OP)) { - /* Enter name into namespace if not found */ - - interpreter_mode = ACPI_IMODE_LOAD_PASS2; + if ((walk_state->deferred_node) && + (walk_state->deferred_node->type == ACPI_TYPE_BUFFER_FIELD) && + (arg_index != 0)) { + obj_desc = ACPI_CAST_PTR (union acpi_operand_object, walk_state->deferred_node); + status = AE_OK; } + else /* All other opcodes */ { + /* + * Differentiate between a namespace "create" operation + * versus a "lookup" operation (IMODE_LOAD_PASS2 vs. + * IMODE_EXECUTE) in order to support the creation of + * namespace objects during the execution of control methods. + */ + parent_op = arg->common.parent; + op_info = acpi_ps_get_opcode_info (parent_op->common.aml_opcode); + if ((op_info->flags & AML_NSNODE) && + (parent_op->common.aml_opcode != AML_INT_METHODCALL_OP) && + (parent_op->common.aml_opcode != AML_REGION_OP) && + (parent_op->common.aml_opcode != AML_INT_NAMEPATH_OP)) { + /* Enter name into namespace if not found */ - else { - /* Return a failure if name not found */ - - interpreter_mode = ACPI_IMODE_EXECUTE; - } + interpreter_mode = ACPI_IMODE_LOAD_PASS2; + } + else { + /* Return a failure if name not found */ - status = acpi_ns_lookup (walk_state->scope_info, name_string, - ACPI_TYPE_ANY, interpreter_mode, - ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE, - walk_state, - ACPI_CAST_INDIRECT_PTR (struct acpi_namespace_node, &obj_desc)); - /* - * The only case where we pass through (ignore) a NOT_FOUND - * error is for the cond_ref_of opcode. - */ - if (status == AE_NOT_FOUND) { - if (parent_op->common.aml_opcode == AML_COND_REF_OF_OP) { - /* - * For the Conditional Reference op, it's OK if - * the name is not found; We just need a way to - * indicate this to the interpreter, set the - * object to the root - */ - obj_desc = ACPI_CAST_PTR (union acpi_operand_object, acpi_gbl_root_node); - status = AE_OK; + interpreter_mode = ACPI_IMODE_EXECUTE; } - else { - /* - * We just plain didn't find it -- which is a - * very serious error at this point - */ - status = AE_AML_NAME_NOT_FOUND; + status = acpi_ns_lookup (walk_state->scope_info, name_string, + ACPI_TYPE_ANY, interpreter_mode, + ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE, + walk_state, + ACPI_CAST_INDIRECT_PTR (struct acpi_namespace_node, &obj_desc)); + /* + * The only case where we pass through (ignore) a NOT_FOUND + * error is for the cond_ref_of opcode. + */ + if (status == AE_NOT_FOUND) { + if (parent_op->common.aml_opcode == AML_COND_REF_OF_OP) { + /* + * For the Conditional Reference op, it's OK if + * the name is not found; We just need a way to + * indicate this to the interpreter, set the + * object to the root + */ + obj_desc = ACPI_CAST_PTR (union acpi_operand_object, acpi_gbl_root_node); + status = AE_OK; + } + else { + /* + * We just plain didn't find it -- which is a + * very serious error at this point + */ + status = AE_AML_NAME_NOT_FOUND; + } } - } - if (ACPI_FAILURE (status)) { - ACPI_REPORT_NSERROR (name_string, status); + if (ACPI_FAILURE (status)) { + ACPI_REPORT_NSERROR (name_string, status); + } } /* Free the namestring created above */ @@ -464,8 +479,6 @@ } ACPI_DEBUGGER_EXEC (acpi_db_display_argument_object (obj_desc, walk_state)); } - - else { /* Check for null name case */ @@ -480,7 +493,6 @@ ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Null namepath: Arg=%p\n", arg)); } - else { opcode = arg->common.aml_opcode; } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/dispatcher/dswload.c linux-2.4.23-pre8/drivers/acpi/dispatcher/dswload.c --- linux-2.4.22/drivers/acpi/dispatcher/dswload.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/dispatcher/dswload.c 2003-10-22 22:47:40.000000000 +0000 @@ -248,6 +248,14 @@ * buffer_field, or Package), the name of the object is already * in the namespace. */ + if (walk_state->deferred_node) { + /* This name is already in the namespace, get the node */ + + node = walk_state->deferred_node; + status = AE_OK; + break; + } + flags = ACPI_NS_NO_UPSEARCH; if ((walk_state->opcode != AML_SCOPE_OP) && (!(walk_state->parse_flags & ACPI_PARSE_DEFERRED_OP))) { @@ -589,7 +597,17 @@ * Enter the named type into the internal namespace. We enter the name * as we go downward in the parse tree. Any necessary subobjects that involve * arguments to the opcode must be created as we go back up the parse tree later. + * + * Note: Name may already exist if we are executing a deferred opcode. */ + if (walk_state->deferred_node) { + /* This name is already in the namespace, get the node */ + + node = walk_state->deferred_node; + status = AE_OK; + break; + } + status = acpi_ns_lookup (walk_state->scope_info, buffer_ptr, object_type, ACPI_IMODE_EXECUTE, ACPI_NS_NO_UPSEARCH, walk_state, &(node)); break; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/dispatcher/dswscope.c linux-2.4.23-pre8/drivers/acpi/dispatcher/dswscope.c --- linux-2.4.22/drivers/acpi/dispatcher/dswscope.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/dispatcher/dswscope.c 2003-10-22 22:49:50.000000000 +0000 @@ -121,10 +121,9 @@ /* Make sure object type is valid */ if (!acpi_ut_valid_object_type (type)) { - ACPI_REPORT_WARNING (("ds_scope_stack_push: type code out of range\n")); + ACPI_REPORT_WARNING (("ds_scope_stack_push: Invalid object type: 0x%X\n", type)); } - /* Allocate a new scope object */ scope_info = acpi_ut_create_generic_state (); @@ -146,13 +145,13 @@ old_scope_info = walk_state->scope_info; if (old_scope_info) { ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC, - "[%4.4s] (%10s)", + "[%4.4s] (%s)", old_scope_info->scope.node->name.ascii, acpi_ut_get_type_name (old_scope_info->common.value))); } else { ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC, - "[\\___] (%10s)", "ROOT")); + "[\\___] (%s)", "ROOT")); } ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC, @@ -163,7 +162,6 @@ /* Push new scope object onto stack */ acpi_ut_push_generic_state (&walk_state->scope_info, scope_info); - return_ACPI_STATUS (AE_OK); } @@ -207,7 +205,7 @@ walk_state->scope_depth--; ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, - "[%.2d] Popped scope [%4.4s] (%10s), New scope -> ", + "[%.2d] Popped scope [%4.4s] (%s), New scope -> ", (u32) walk_state->scope_depth, scope_info->scope.node->name.ascii, acpi_ut_get_type_name (scope_info->common.value))); @@ -225,7 +223,6 @@ } acpi_ut_delete_generic_state (scope_info); - return_ACPI_STATUS (AE_OK); } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/dispatcher/dswstate.c linux-2.4.23-pre8/drivers/acpi/dispatcher/dswstate.c --- linux-2.4.22/drivers/acpi/dispatcher/dswstate.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/dispatcher/dswstate.c 2003-10-22 22:49:30.000000000 +0000 @@ -56,11 +56,12 @@ * FUNCTION: acpi_ds_result_insert * * PARAMETERS: Object - Object to push + * Index - Where to insert the object * walk_state - Current Walk state * * RETURN: Status * - * DESCRIPTION: Push an object onto this walk's result stack + * DESCRIPTION: Insert an object onto this walk's result stack * ******************************************************************************/ @@ -114,6 +115,7 @@ * FUNCTION: acpi_ds_result_remove * * PARAMETERS: Object - Where to return the popped object + * Index - Where to extract the object * walk_state - Current Walk state * * RETURN: Status @@ -233,6 +235,7 @@ return (AE_AML_NO_RETURN_VALUE); } + /******************************************************************************* * * FUNCTION: acpi_ds_result_pop_from_bottom @@ -295,7 +298,6 @@ *object, (*object) ? acpi_ut_get_object_type_name (*object) : "NULL", state, walk_state)); - return (AE_OK); } @@ -358,8 +360,7 @@ * * FUNCTION: acpi_ds_result_stack_push * - * PARAMETERS: Object - Object to push - * walk_state - Current Walk state + * PARAMETERS: walk_state - Current Walk state * * RETURN: Status * @@ -420,7 +421,6 @@ return (AE_AML_NO_OPERAND); } - state = acpi_ut_pop_generic_state (&walk_state->results); ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, @@ -572,6 +572,7 @@ } #endif + /******************************************************************************* * * FUNCTION: acpi_ds_obj_stack_pop @@ -641,6 +642,7 @@ u32 i; union acpi_operand_object *obj_desc; + ACPI_FUNCTION_NAME ("ds_obj_stack_pop_and_delete"); @@ -883,8 +885,15 @@ * FUNCTION: acpi_ds_init_aml_walk * * PARAMETERS: walk_state - New state to be initialized + * Op - Current parse op + * method_node - Control method NS node, if any + * aml_start - Start of AML + * aml_length - Length of AML + * Params - Method args, if any + * return_obj_desc - Where to store a return object, if any + * pass_number - 1, 2, or 3 * - * RETURN: None + * RETURN: Status * * DESCRIPTION: Initialize a walk state for a pass 1 or 2 parse tree walk * @@ -927,9 +936,9 @@ if (method_node) { walk_state->parser_state.start_node = method_node; - walk_state->walk_type = ACPI_WALK_METHOD; - walk_state->method_node = method_node; - walk_state->method_desc = acpi_ns_get_attached_object (method_node); + walk_state->walk_type = ACPI_WALK_METHOD; + walk_state->method_node = method_node; + walk_state->method_desc = acpi_ns_get_attached_object (method_node); /* Push start scope on scope stack and make it current */ @@ -956,6 +965,7 @@ while (extra_op && !extra_op->common.node) { extra_op = extra_op->common.parent; } + if (!extra_op) { parser_state->start_node = NULL; } @@ -1014,7 +1024,7 @@ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "%p walk still has a scope list\n", walk_state)); } - /* Always must free any linked control states */ + /* Always must free any linked control states */ while (walk_state->control_state) { state = walk_state->control_state; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/ec.c linux-2.4.23-pre8/drivers/acpi/ec.c --- linux-2.4.22/drivers/acpi/ec.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/ec.c 2003-10-22 22:48:14.000000000 +0000 @@ -33,7 +33,7 @@ #include #include #include - +#include #define _COMPONENT ACPI_EC_COMPONENT ACPI_MODULE_NAME ("acpi_ec") @@ -90,6 +90,13 @@ /* External interfaces use first EC only, so remember */ static struct acpi_device *first_ec; +/* + * We use kernel thread to handle ec's gpe query, so the query may defer. + * The query need a context, which can be freed when we replace ec_ecdt + * with EC device. So defered query may have a wrong context. + * We use an indication to avoid it + */ +static int ec_device_init = 0; /* -------------------------------------------------------------------------- Transaction Management -------------------------------------------------------------------------- */ @@ -389,8 +396,11 @@ acpi_disable_gpe(NULL, ec->gpe_bit, ACPI_ISR); - status = acpi_os_queue_for_execution(OSD_PRIORITY_GPE, - acpi_ec_gpe_query, ec); + if (!ec_device_init) + acpi_ec_gpe_query(ec); /* directly query when device didn't init */ + else + status = acpi_os_queue_for_execution(OSD_PRIORITY_GPE, + acpi_ec_gpe_query, ec); } /* -------------------------------------------------------------------------- @@ -408,7 +418,10 @@ * The EC object is in the handler context and is needed * when calling the acpi_ec_space_handler. */ - *return_context = handler_context; + if(function == ACPI_REGION_DEACTIVATE) + *return_context = NULL; + else + *return_context = handler_context; return AE_OK; } @@ -582,6 +595,8 @@ we now have the *real* EC info, so kill the makeshift one.*/ acpi_evaluate_integer(ec->handle, "_UID", NULL, &uid); if (ec_ecdt && ec_ecdt->uid == uid) { + acpi_disable_gpe(NULL, ec_ecdt->gpe_bit, ACPI_NOT_ISR); + ec_device_init = 1; acpi_remove_address_space_handler(ACPI_ROOT_OBJECT, ACPI_ADR_SPACE_EC, &acpi_ec_space_handler); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/events/evgpe.c linux-2.4.23-pre8/drivers/acpi/events/evgpe.c --- linux-2.4.22/drivers/acpi/events/evgpe.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/events/evgpe.c 2003-10-22 22:49:11.000000000 +0000 @@ -218,7 +218,7 @@ int_status |= acpi_ev_gpe_dispatch ( &gpe_block->event_info[gpe_number], - gpe_number + gpe_block->register_info[gpe_number].base_gpe_number); + j + gpe_register_info->base_gpe_number); } } } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/events/evregion.c linux-2.4.23-pre8/drivers/acpi/events/evregion.c --- linux-2.4.22/drivers/acpi/events/evregion.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/events/evregion.c 2003-10-22 22:47:44.000000000 +0000 @@ -382,7 +382,7 @@ union acpi_operand_object *obj_desc; union acpi_operand_object **last_obj_ptr; acpi_adr_space_setup region_setup; - void *region_context; + void **region_context; union acpi_operand_object *region_obj2; acpi_status status; @@ -394,7 +394,7 @@ if (!region_obj2) { return_VOID; } - region_context = region_obj2->extra.region_context; + region_context = ®ion_obj2->extra.region_context; /* Get the address handler from the region object */ @@ -450,7 +450,7 @@ region_setup = handler_obj->address_space.setup; status = region_setup (region_obj, ACPI_REGION_DEACTIVATE, - handler_obj->address_space.context, ®ion_context); + handler_obj->address_space.context, region_context); /* Init routine may fail, Just ignore errors */ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/executer/exconfig.c linux-2.4.23-pre8/drivers/acpi/executer/exconfig.c --- linux-2.4.22/drivers/acpi/executer/exconfig.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/executer/exconfig.c 2003-10-22 22:49:04.000000000 +0000 @@ -92,6 +92,9 @@ /* Install the new table into the local data structures */ + ACPI_MEMSET (&table_info, 0, sizeof (struct acpi_table_desc)); + + table_info.type = 5; table_info.pointer = table; table_info.length = (acpi_size) table->length; table_info.allocation = ACPI_MEM_ALLOCATED; @@ -178,7 +181,7 @@ return_ACPI_STATUS (status); } - /* Not found, return an Integer=0 and AE_OK */ + /* Table not found, return an Integer=0 and AE_OK */ ddb_handle = acpi_ut_create_internal_object (ACPI_TYPE_INTEGER); if (!ddb_handle) { @@ -248,9 +251,11 @@ walk_state); if (ACPI_FAILURE (status)) { (void) acpi_ex_unload_table (ddb_handle); + return_ACPI_STATUS (status); } } + *return_desc = ddb_handle; return_ACPI_STATUS (status); } @@ -417,7 +422,7 @@ acpi_ex_unload_table ( union acpi_operand_object *ddb_handle) { - acpi_status status = AE_NOT_IMPLEMENTED; + acpi_status status = AE_OK; union acpi_operand_object *table_desc = ddb_handle; struct acpi_table_desc *table_info; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/executer/excreate.c linux-2.4.23-pre8/drivers/acpi/executer/excreate.c --- linux-2.4.22/drivers/acpi/executer/excreate.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/executer/excreate.c 2003-10-22 22:49:40.000000000 +0000 @@ -286,7 +286,7 @@ ACPI_FUNCTION_TRACE ("ex_create_region"); - /* Get the Node from the object stack */ + /* Get the Namespace Node */ node = walk_state->op->common.node; @@ -311,7 +311,6 @@ ACPI_DEBUG_PRINT ((ACPI_DB_LOAD, "Region Type - %s (%X)\n", acpi_ut_get_region_name (region_space), region_space)); - /* Create the region descriptor */ obj_desc = acpi_ut_create_internal_object (ACPI_TYPE_REGION); @@ -375,6 +374,7 @@ ACPI_FUNCTION_TRACE ("ex_create_table_region"); + /* Get the Node from the object stack */ node = walk_state->op->common.node; @@ -392,7 +392,6 @@ status = acpi_tb_find_table (operand[1]->string.pointer, operand[2]->string.pointer, operand[3]->string.pointer, &table); - if (ACPI_FAILURE (status)) { return_ACPI_STATUS (status); } @@ -489,7 +488,6 @@ status = acpi_ns_attach_object ((struct acpi_namespace_node *) operand[0], obj_desc, ACPI_TYPE_PROCESSOR); - /* Remove local reference to the object */ acpi_ut_remove_reference (obj_desc); @@ -540,7 +538,6 @@ status = acpi_ns_attach_object ((struct acpi_namespace_node *) operand[0], obj_desc, ACPI_TYPE_POWER); - /* Remove local reference to the object */ acpi_ut_remove_reference (obj_desc); @@ -609,7 +606,6 @@ obj_desc->method.concurrency = (u8) (((method_flags & METHOD_FLAGS_SYNCH_LEVEL) >> 4) + 1); } - else { obj_desc->method.concurrency = INFINITE_CONCURRENCY; } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/executer/exfield.c linux-2.4.23-pre8/drivers/acpi/executer/exfield.c --- linux-2.4.22/drivers/acpi/executer/exfield.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/executer/exfield.c 2003-10-22 22:47:38.000000000 +0000 @@ -160,10 +160,10 @@ } ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, - "Obj=%p Type=%X Buf=%p Len=%X\n", + "field_read [TO]: Obj %p, Type %X, Buf %p, byte_len %X\n", obj_desc, ACPI_GET_OBJECT_TYPE (obj_desc), buffer, (u32) length)); ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, - "field_write: bit_len=%X bit_off=%X byte_off=%X\n", + "field_read [FROM]: bit_len %X, bit_off %X, byte_off %X\n", obj_desc->common_field.bit_length, obj_desc->common_field.start_field_bit_offset, obj_desc->common_field.base_byte_offset)); @@ -335,10 +335,13 @@ } ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, - "Obj=%p Type=%X Buf=%p Len=%X\n", - obj_desc, ACPI_GET_OBJECT_TYPE (obj_desc), buffer, length)); + "field_write [FROM]: Obj %p (%s:%X), Buf %p, byte_len %X\n", + source_desc, acpi_ut_get_type_name (ACPI_GET_OBJECT_TYPE (source_desc)), + ACPI_GET_OBJECT_TYPE (source_desc), buffer, length)); ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, - "field_read: bit_len=%X bit_off=%X byte_off=%X\n", + "field_write [TO]: Obj %p (%s:%X), bit_len %X, bit_off %X, byte_off %X\n", + obj_desc, acpi_ut_get_type_name (ACPI_GET_OBJECT_TYPE (obj_desc)), + ACPI_GET_OBJECT_TYPE (obj_desc), obj_desc->common_field.bit_length, obj_desc->common_field.start_field_bit_offset, obj_desc->common_field.base_byte_offset)); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/executer/exfldio.c linux-2.4.23-pre8/drivers/acpi/executer/exfldio.c --- linux-2.4.22/drivers/acpi/executer/exfldio.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/executer/exfldio.c 2003-10-22 22:48:24.000000000 +0000 @@ -64,7 +64,8 @@ * RETURN: Status * * DESCRIPTION: Common processing for acpi_ex_extract_from_field and - * acpi_ex_insert_into_field. Initialize the + * acpi_ex_insert_into_field. Initialize the Region if necessary and + * validate the request. * ******************************************************************************/ @@ -96,7 +97,7 @@ * If the Region Address and Length have not been previously evaluated, * evaluate them now and save the results. */ - if (!(rgn_desc->region.flags & AOPOBJ_DATA_VALID)) { + if (!(rgn_desc->common.flags & AOPOBJ_DATA_VALID)) { status = acpi_ds_get_region_arguments (rgn_desc); if (ACPI_FAILURE (status)) { return_ACPI_STATUS (status); @@ -109,6 +110,18 @@ return_ACPI_STATUS (AE_OK); } +#ifdef ACPI_UNDER_DEVELOPMENT + /* + * If the Field access is any_acc, we can now compute the optimal + * access (because we know know the length of the parent region) + */ + if (!(obj_desc->common.flags & AOPOBJ_DATA_VALID)) { + if (ACPI_FAILURE (status)) { + return_ACPI_STATUS (status); + } + } +#endif + /* * Validate the request. The entire request from the byte offset for a * length of one field datum (access width) must fit within the region. @@ -242,7 +255,7 @@ } ACPI_DEBUG_PRINT_RAW ((ACPI_DB_BFIELD, - " Region[%s-%X] Access %X Base:Off %X:%X at %8.8X%8.8X\n", + " Region [%s:%X], Width %X, byte_base %X, Offset %X at %8.8X%8.8X\n", acpi_ut_get_region_name (rgn_desc->region.space_id), rgn_desc->region.space_id, obj_desc->common_field.access_byte_width, @@ -365,10 +378,10 @@ /* * The four types of fields are: * - * buffer_fields - Read/write from/to a Buffer - * region_fields - Read/write from/to a Operation Region. - * bank_fields - Write to a Bank Register, then read/write from/to an op_region - * index_fields - Write to an Index Register, then read/write from/to a Data Register + * buffer_field - Read/write from/to a Buffer + * region_field - Read/write from/to a Operation Region. + * bank_field - Write to a Bank Register, then read/write from/to an op_region + * index_field - Write to an Index Register, then read/write from/to a Data Register */ switch (ACPI_GET_OBJECT_TYPE (obj_desc)) { case ACPI_TYPE_BUFFER_FIELD: @@ -458,24 +471,34 @@ /* Write the index value to the index_register (itself a region_field) */ + field_datum_byte_offset += obj_desc->index_field.value; + + ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, + "Write to Index Register: Value %8.8X\n", + field_datum_byte_offset)); + status = acpi_ex_insert_into_field (obj_desc->index_field.index_obj, - &obj_desc->index_field.value, - sizeof (obj_desc->index_field.value)); + &field_datum_byte_offset, + sizeof (field_datum_byte_offset)); if (ACPI_FAILURE (status)) { return_ACPI_STATUS (status); } + ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, + "I/O to Data Register: value_ptr %p\n", + value)); + if (read_write == ACPI_READ) { /* Read the datum from the data_register */ status = acpi_ex_extract_from_field (obj_desc->index_field.data_obj, - value, obj_desc->common_field.access_byte_width); + value, sizeof (acpi_integer)); } else { - /* Write the datum to the Data register */ + /* Write the datum to the data_register */ status = acpi_ex_insert_into_field (obj_desc->index_field.data_obj, - value, obj_desc->common_field.access_byte_width); + value, sizeof (acpi_integer)); } break; @@ -490,12 +513,14 @@ if (ACPI_SUCCESS (status)) { if (read_write == ACPI_READ) { - ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, "Value Read=%8.8X%8.8X\n", - ACPI_HIDWORD (*value), ACPI_LODWORD (*value))); + ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, "Value Read %8.8X%8.8X, Width %d\n", + ACPI_HIDWORD (*value), ACPI_LODWORD (*value), + obj_desc->common_field.access_byte_width)); } else { - ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, "Value Written=%8.8X%8.8X\n", - ACPI_HIDWORD (*value), ACPI_LODWORD (*value))); + ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, "Value Written %8.8X%8.8X, Width %d\n", + ACPI_HIDWORD (*value), ACPI_LODWORD (*value), + obj_desc->common_field.access_byte_width)); } } @@ -554,6 +579,10 @@ */ status = acpi_ex_field_datum_io (obj_desc, field_datum_byte_offset, ¤t_value, ACPI_READ); + if (ACPI_FAILURE (status)) { + return_ACPI_STATUS (status); + } + merged_value |= (current_value & ~mask); } break; @@ -573,6 +602,7 @@ break; default: + ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "write_with_update_rule: Unknown update_rule setting: %X\n", (obj_desc->common_field.field_flags & AML_FIELD_UPDATE_RULE_MASK))); @@ -580,18 +610,19 @@ } } - /* Write the merged value */ - - status = acpi_ex_field_datum_io (obj_desc, field_datum_byte_offset, - &merged_value, ACPI_WRITE); - ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, - "Mask %8.8X%8.8X datum_offset %X Value %8.8X%8.8X, merged_value %8.8X%8.8X\n", + "Mask %8.8X%8.8X, datum_offset %X, Width %X, Value %8.8X%8.8X, merged_value %8.8X%8.8X\n", ACPI_HIDWORD (mask), ACPI_LODWORD (mask), field_datum_byte_offset, + obj_desc->common_field.access_byte_width, ACPI_HIDWORD (field_value), ACPI_LODWORD (field_value), ACPI_HIDWORD (merged_value),ACPI_LODWORD (merged_value))); + /* Write the merged value */ + + status = acpi_ex_field_datum_io (obj_desc, field_datum_byte_offset, + &merged_value, ACPI_WRITE); + return_ACPI_STATUS (status); } @@ -625,7 +656,7 @@ u32 index; - ACPI_FUNCTION_ENTRY (); + ACPI_FUNCTION_TRACE_U32 ("ex_get_buffer_datum", byte_granularity); /* Get proper index into buffer (handles big/little endian) */ @@ -659,6 +690,8 @@ /* Should not get here */ break; } + + return_VOID; } @@ -690,7 +723,8 @@ { u32 index; - ACPI_FUNCTION_ENTRY (); + + ACPI_FUNCTION_TRACE_U32 ("ex_set_buffer_datum", byte_granularity); /* Get proper index into buffer (handles big/little endian) */ @@ -724,6 +758,8 @@ /* Should not get here */ break; } + + return_VOID; } @@ -777,7 +813,7 @@ obj_desc->common_field.access_byte_width); ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, - "byte_len=%X, datum_len=%X, byte_gran=%X\n", + "byte_len %X, datum_len %X, byte_gran %X\n", byte_field_length, datum_count,obj_desc->common_field.access_byte_width)); /* @@ -942,20 +978,27 @@ * larger than the field, this typically happens when an integer is * written to a field that is actually smaller than an integer. */ - byte_field_length = ACPI_ROUND_BITS_UP_TO_BYTES (obj_desc->common_field.bit_length); + byte_field_length = ACPI_ROUND_BITS_UP_TO_BYTES ( + obj_desc->common_field.bit_length); if (buffer_length < byte_field_length) { - ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, "Buffer length %X too small for field %X\n", + ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, + "Buffer length %X too small for field %X\n", buffer_length, byte_field_length)); return_ACPI_STATUS (AE_BUFFER_OVERFLOW); } + byte_field_length = ACPI_ROUND_BITS_UP_TO_BYTES ( + obj_desc->common_field.start_field_bit_offset + + obj_desc->common_field.bit_length); + /* Convert byte count to datum count, round up if necessary */ - datum_count = ACPI_ROUND_UP_TO (byte_field_length, obj_desc->common_field.access_byte_width); + datum_count = ACPI_ROUND_UP_TO (byte_field_length, + obj_desc->common_field.access_byte_width); ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, - "byte_len=%X, datum_len=%X, byte_gran=%X\n", + "Bytes %X, Datums %X, byte_gran %X\n", byte_field_length, datum_count, obj_desc->common_field.access_byte_width)); /* @@ -1006,6 +1049,10 @@ return_ACPI_STATUS (status); } + /* We just wrote the first datum */ + + datum_offset++; + /* If the entire field fits within one datum, we are done. */ if ((datum_count == 1) && @@ -1025,7 +1072,6 @@ * applied in Part3 below. */ while (datum_offset < datum_count) { - datum_offset++; field_datum_byte_offset += obj_desc->common_field.access_byte_width; /* @@ -1057,33 +1103,34 @@ * a datum boundary. Update Rule must be applied to the bits outside * the field. */ - if (datum_offset == datum_count) { + datum_offset++; + if ((datum_offset == datum_count) && + (obj_desc->common_field.end_field_valid_bits)) { /* * If there are dangling non-aligned bits, perform one more merged write * Else - field is aligned at the end, no need for any more writes */ - if (obj_desc->common_field.end_field_valid_bits) { - /* - * Part3: - * This is the last datum and the field does not end on a datum boundary. - * Build the partial datum and write with the update rule. - * - * Mask off the unused bits above (after) the end-of-field - */ - mask = ACPI_MASK_BITS_ABOVE (obj_desc->common_field.end_field_valid_bits); - merged_datum &= mask; - /* Write the last datum with the update rule */ + /* + * Part3: + * This is the last datum and the field does not end on a datum boundary. + * Build the partial datum and write with the update rule. + * + * Mask off the unused bits above (after) the end-of-field + */ + mask = ACPI_MASK_BITS_ABOVE (obj_desc->common_field.end_field_valid_bits); + merged_datum &= mask; + + /* Write the last datum with the update rule */ - status = acpi_ex_write_with_update_rule (obj_desc, mask, merged_datum, - field_datum_byte_offset); - if (ACPI_FAILURE (status)) { - return_ACPI_STATUS (status); - } + status = acpi_ex_write_with_update_rule (obj_desc, mask, merged_datum, + field_datum_byte_offset); + if (ACPI_FAILURE (status)) { + return_ACPI_STATUS (status); } } else { - /* Normal case -- write the completed datum */ + /* Normal (aligned) case -- write the completed datum */ status = acpi_ex_field_datum_io (obj_desc, field_datum_byte_offset, &merged_datum, ACPI_WRITE); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/executer/exoparg1.c linux-2.4.23-pre8/drivers/acpi/executer/exoparg1.c --- linux-2.4.22/drivers/acpi/executer/exoparg1.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/executer/exoparg1.c 2003-10-22 22:49:35.000000000 +0000 @@ -524,7 +524,7 @@ acpi_integer value; - ACPI_FUNCTION_TRACE_STR ("ex_opcode_1A_0T_0R", acpi_ps_get_opcode_name (walk_state->opcode)); + ACPI_FUNCTION_TRACE_STR ("ex_opcode_1A_0T_1R", acpi_ps_get_opcode_name (walk_state->opcode)); /* Examine the AML opcode */ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/executer/exprep.c linux-2.4.23-pre8/drivers/acpi/executer/exprep.c --- linux-2.4.22/drivers/acpi/executer/exprep.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/executer/exprep.c 2003-10-22 22:47:59.000000000 +0000 @@ -53,6 +53,133 @@ ACPI_MODULE_NAME ("exprep") +#ifdef ACPI_UNDER_DEVELOPMENT +/******************************************************************************* + * + * FUNCTION: acpi_ex_generate_access + * + * PARAMETERS: field_bit_offset - Start of field within parent region/buffer + * field_bit_length - Length of field in bits + * region_length - Length of parent in bytes + * + * RETURN: Field granularity (8, 16, 32 or 64) and + * byte_alignment (1, 2, 3, or 4) + * + * DESCRIPTION: Generate an optimal access width for fields defined with the + * any_acc keyword. + * + * NOTE: Need to have the region_length in order to check for boundary + * conditions (end-of-region). However, the region_length is a deferred + * operation. Therefore, to complete this implementation, the generation + * of this access width must be deferred until the region length has + * been evaluated. + * + ******************************************************************************/ + +static u32 +acpi_ex_generate_access ( + u32 field_bit_offset, + u32 field_bit_length, + u32 region_length) +{ + u32 field_byte_length; + u32 field_byte_offset; + u32 field_byte_end_offset; + u32 access_byte_width; + u32 field_start_offset; + u32 field_end_offset; + u32 minimum_access_width = 0xFFFFFFFF; + u32 minimum_accesses = 0xFFFFFFFF; + u32 accesses; + + + ACPI_FUNCTION_TRACE ("ex_generate_access"); + + + /* Round Field start offset and length to "minimal" byte boundaries */ + + field_byte_offset = ACPI_DIV_8 (ACPI_ROUND_DOWN (field_bit_offset, 8)); + field_byte_end_offset = ACPI_DIV_8 (ACPI_ROUND_UP (field_bit_length + field_bit_offset, 8)); + field_byte_length = field_byte_end_offset - field_byte_offset; + + ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, + "Bit length %d, Bit offset %d\n", + field_bit_length, field_bit_offset)); + ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, + "Byte Length %d, Byte Offset %d, End Offset %d\n", + field_byte_length, field_byte_offset, field_byte_end_offset)); + + /* + * Iterative search for the maximum access width that is both aligned + * and does not go beyond the end of the region + * + * Start at byte_acc and work upwards to qword_acc max. (1,2,4,8 bytes) + */ + for (access_byte_width = 1; access_byte_width <= 8; access_byte_width <<= 1) { + /* + * 1) Round end offset up to next access boundary and make sure that this + * does not go beyond the end of the parent region. + * 2) When the Access width is greater than the field_byte_length, we are done. + * (This does not optimize for the perfectly aligned case yet). + */ + if (ACPI_ROUND_UP (field_byte_end_offset, access_byte_width) <= region_length) { + field_start_offset = ACPI_ROUND_DOWN (field_byte_offset, access_byte_width) / + access_byte_width; + field_end_offset = ACPI_ROUND_UP ((field_byte_length + field_byte_offset), + access_byte_width) / access_byte_width; + accesses = field_end_offset - field_start_offset; + + ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, + "access_width %d end is within region\n", access_byte_width)); + ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, + "Field Start %d, Field End %d -- requires %d accesses\n", + field_start_offset, field_end_offset, accesses)); + + /* Single access is optimal */ + + if (accesses <= 1) { + ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, + "Entire field can be accessed with one operation of size %d\n", + access_byte_width)); + return_VALUE (access_byte_width); + } + + /* + * Fits in the region, but requires more than one read/write. + * try the next wider access on next iteration + */ + if (accesses < minimum_accesses) { + minimum_accesses = accesses; + minimum_access_width = access_byte_width; + } + } + else { + ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, + "access_width %d end is NOT within region\n", access_byte_width)); + if (access_byte_width == 1) { + ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, + "Field goes beyond end-of-region!\n")); + return_VALUE (0); /* Field does not fit in the region at all */ + } + + /* This width goes beyond the end-of-region, back off to previous access */ + + ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, + "Backing off to previous optimal access width of %d\n", + minimum_access_width)); + return_VALUE (minimum_access_width); + } + } + + /* Could not read/write field with one operation, just use max access width */ + + ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, + "Cannot access field in one operation, using width 8\n")); + return_VALUE (8); +} +#endif /* ACPI_UNDER_DEVELOPMENT */ + + /******************************************************************************* * * FUNCTION: acpi_ex_decode_field_access @@ -74,12 +201,11 @@ u32 *return_byte_alignment) { u32 access; - u8 byte_alignment; - u8 bit_length; -/* u32 Length; */ + u32 byte_alignment; + u32 bit_length; - ACPI_FUNCTION_NAME ("ex_decode_field_access"); + ACPI_FUNCTION_TRACE ("ex_decode_field_access"); access = (field_flags & AML_FIELD_ACCESS_TYPE_MASK); @@ -87,41 +213,15 @@ switch (access) { case AML_FIELD_ACCESS_ANY: +#ifdef ACPI_UNDER_DEVELOPMENT + byte_alignment = acpi_ex_generate_access (obj_desc->common_field.start_field_bit_offset, + obj_desc->common_field.bit_length, + 0xFFFFFFFF /* Temp until we pass region_length as param */); + bit_length = byte_alignment * 8; +#endif + byte_alignment = 1; bit_length = 8; - -#if 0 - /* - * TBD: optimize - * - * Any attempt to optimize the access size to the size of the field - * must take into consideration the length of the region and take - * care that an access to the field will not attempt to access - * beyond the end of the region. - */ - - /* Use the length to set the access type */ - - length = obj_desc->common_field.bit_length; - - if (length <= 8) { - bit_length = 8; - } - else if (length <= 16) { - bit_length = 16; - } - else if (length <= 32) { - bit_length = 32; - } - else if (length <= 64) { - bit_length = 64; - } - else { - /* Larger than Qword - just use byte-size chunks */ - - bit_length = 8; - } -#endif break; case AML_FIELD_ACCESS_BYTE: @@ -151,7 +251,7 @@ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Unknown field access type %X\n", access)); - return (0); + return_VALUE (0); } if (ACPI_GET_OBJECT_TYPE (obj_desc) == ACPI_TYPE_BUFFER_FIELD) { @@ -164,7 +264,7 @@ } *return_byte_alignment = byte_alignment; - return (bit_length); + return_VALUE (bit_length); } @@ -336,7 +436,7 @@ type = acpi_ns_get_type (info->region_node); if (type != ACPI_TYPE_REGION) { ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, - "Needed Region, found type %X %s\n", + "Needed Region, found type %X (%s)\n", type, acpi_ut_get_type_name (type))); return_ACPI_STATUS (AE_AML_OPERAND_TYPE); @@ -372,7 +472,7 @@ acpi_ut_add_reference (obj_desc->field.region_obj); ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, - "region_field: Bitoff=%X Off=%X Gran=%X Region %p\n", + "region_field: bit_off %X, Off %X, Gran %X, Region %p\n", obj_desc->field.start_field_bit_offset, obj_desc->field.base_byte_offset, obj_desc->field.access_byte_width, obj_desc->field.region_obj)); break; @@ -390,7 +490,7 @@ acpi_ut_add_reference (obj_desc->bank_field.bank_obj); ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, - "Bank Field: bit_off=%X Off=%X Gran=%X Region %p bank_reg %p\n", + "Bank Field: bit_off %X, Off %X, Gran %X, Region %p, bank_reg %p\n", obj_desc->bank_field.start_field_bit_offset, obj_desc->bank_field.base_byte_offset, obj_desc->field.access_byte_width, @@ -417,9 +517,10 @@ acpi_ut_add_reference (obj_desc->index_field.index_obj); ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, - "index_field: bitoff=%X off=%X gran=%X Index %p Data %p\n", + "index_field: bit_off %X, Off %X, Value %X, Gran %X, Index %p, Data %p\n", obj_desc->index_field.start_field_bit_offset, obj_desc->index_field.base_byte_offset, + obj_desc->index_field.value, obj_desc->field.access_byte_width, obj_desc->index_field.index_obj, obj_desc->index_field.data_obj)); @@ -437,7 +538,7 @@ status = acpi_ns_attach_object (info->field_node, obj_desc, acpi_ns_get_type (info->field_node)); - ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, "set named_obj %p (%4.4s) val = %p\n", + ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD, "Set named_obj %p [%4.4s], obj_desc %p\n", info->field_node, info->field_node->name.ascii, obj_desc)); /* Remove local reference to the object */ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/executer/exresnte.c linux-2.4.23-pre8/drivers/acpi/executer/exresnte.c --- linux-2.4.22/drivers/acpi/executer/exresnte.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/executer/exresnte.c 2003-10-22 22:48:12.000000000 +0000 @@ -47,6 +47,8 @@ #include #include #include +#include +#include #define _COMPONENT ACPI_EXECUTER @@ -243,12 +245,26 @@ case ACPI_TYPE_LOCAL_REFERENCE: - /* No named references are allowed here */ + switch (source_desc->reference.opcode) { + case AML_LOAD_OP: - ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Unsupported Reference opcode %X\n", - source_desc->reference.opcode)); + /* This is a ddb_handle */ + /* Return an additional reference to the object */ - return_ACPI_STATUS (AE_AML_OPERAND_TYPE); + obj_desc = source_desc; + acpi_ut_add_reference (obj_desc); + break; + + default: + /* No named references are allowed here */ + + ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Unsupported Reference opcode %X (%s)\n", + source_desc->reference.opcode, + acpi_ps_get_opcode_name (source_desc->reference.opcode))); + + return_ACPI_STATUS (AE_AML_OPERAND_TYPE); + } + break; /* Default case is for unknown types */ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/executer/exresolv.c linux-2.4.23-pre8/drivers/acpi/executer/exresolv.c --- linux-2.4.22/drivers/acpi/executer/exresolv.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/executer/exresolv.c 2003-10-22 22:48:34.000000000 +0000 @@ -48,6 +48,7 @@ #include #include #include +#include #define _COMPONENT ACPI_EXECUTER @@ -248,6 +249,7 @@ case AML_REF_OF_OP: case AML_DEBUG_OP: + case AML_LOAD_OP: /* Just leave the object as-is */ @@ -256,8 +258,8 @@ default: - ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Unknown Reference opcode %X in %p\n", - opcode, stack_desc)); + ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Unknown Reference opcode %X (%s) in %p\n", + opcode, acpi_ps_get_opcode_name (opcode), stack_desc)); status = AE_AML_INTERNAL; break; } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/executer/exresop.c linux-2.4.23-pre8/drivers/acpi/executer/exresop.c --- linux-2.4.22/drivers/acpi/executer/exresop.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/executer/exresop.c 2003-10-22 22:49:31.000000000 +0000 @@ -224,6 +224,7 @@ case AML_REF_OF_OP: case AML_ARG_OP: case AML_LOCAL_OP: + case AML_LOAD_OP: /* ddb_handle from LOAD_OP or LOAD_TABLE_OP */ ACPI_DEBUG_ONLY_MEMBERS (ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Reference Opcode: %s\n", op_info->name))); @@ -231,8 +232,9 @@ default: ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, - "Unknown Reference Opcode %X\n", - obj_desc->reference.opcode)); + "Unknown Reference Opcode %X [%s]\n", + obj_desc->reference.opcode, + (acpi_ps_get_opcode_info (obj_desc->reference.opcode))->name)); return_ACPI_STATUS (AE_AML_OPERAND_TYPE); } @@ -378,6 +380,13 @@ type_needed = ACPI_TYPE_ANY; break; + case ARGI_DDBHANDLE: + + /* Need an operand of type ACPI_TYPE_DDB_HANDLE */ + + type_needed = ACPI_TYPE_LOCAL_REFERENCE; + break; + /* * The more complex cases allow multiple resolved object types diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/executer/exstoren.c linux-2.4.23-pre8/drivers/acpi/executer/exstoren.c --- linux-2.4.22/drivers/acpi/executer/exstoren.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/executer/exstoren.c 2003-10-22 22:47:45.000000000 +0000 @@ -46,6 +46,7 @@ #include #include +#include #define _COMPONENT ACPI_EXECUTER @@ -114,9 +115,10 @@ /* * Must have a Integer, Buffer, or String */ - if ((ACPI_GET_OBJECT_TYPE (source_desc) != ACPI_TYPE_INTEGER) && - (ACPI_GET_OBJECT_TYPE (source_desc) != ACPI_TYPE_BUFFER) && - (ACPI_GET_OBJECT_TYPE (source_desc) != ACPI_TYPE_STRING)) { + if ((ACPI_GET_OBJECT_TYPE (source_desc) != ACPI_TYPE_INTEGER) && + (ACPI_GET_OBJECT_TYPE (source_desc) != ACPI_TYPE_BUFFER) && + (ACPI_GET_OBJECT_TYPE (source_desc) != ACPI_TYPE_STRING) && + !((ACPI_GET_OBJECT_TYPE (source_desc) == ACPI_TYPE_LOCAL_REFERENCE) && (source_desc->reference.opcode == AML_LOAD_OP))) { /* * Conversion successful but still not a valid type */ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/executer/exsystem.c linux-2.4.23-pre8/drivers/acpi/executer/exsystem.c --- linux-2.4.22/drivers/acpi/executer/exsystem.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/executer/exsystem.c 2003-10-22 22:49:10.000000000 +0000 @@ -129,18 +129,13 @@ ACPI_FUNCTION_ENTRY (); - if (how_long > 1000) /* 1 millisecond */ { - /* Since this thread will sleep, we must release the interpreter */ - - acpi_ex_exit_interpreter (); - - acpi_os_sleep (0, (how_long / 1000) + 1); - - /* And now we must get the interpreter again */ - - status = acpi_ex_enter_interpreter (); + if (how_long > 100) /* 100 microseconds */ { + /* + * Longer than 100 usec, use sleep instead + * (according to ACPI specification) + */ + status = acpi_ex_system_do_suspend ((how_long / 1000) + 1); } - else { acpi_os_stall (how_long); } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/hardware/hwacpi.c linux-2.4.23-pre8/drivers/acpi/hardware/hwacpi.c --- linux-2.4.22/drivers/acpi/hardware/hwacpi.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/hardware/hwacpi.c 2003-10-22 22:47:29.000000000 +0000 @@ -212,6 +212,15 @@ if (!acpi_gbl_FADT->smi_cmd) return_VALUE (ACPI_SYS_MODE_ACPI); + + /* + * ACPI 2.0 clarified that if SMI_CMD in FADT is zero, + * system does not support mode transition. + */ + if (!acpi_gbl_FADT->smi_cmd) { + return_VALUE (ACPI_SYS_MODE_ACPI); + } + status = acpi_get_register (ACPI_BITREG_SCI_ENABLE, &value, ACPI_MTX_LOCK); if (ACPI_FAILURE (status)) { return_VALUE (ACPI_SYS_MODE_LEGACY); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/namespace/nsdump.c linux-2.4.23-pre8/drivers/acpi/namespace/nsdump.c --- linux-2.4.22/drivers/acpi/namespace/nsdump.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/namespace/nsdump.c 2003-10-22 22:49:35.000000000 +0000 @@ -234,7 +234,7 @@ case ACPI_TYPE_DEVICE: - acpi_os_printf ("Notify object: %p", obj_desc); + acpi_os_printf ("Notify Object: %p\n", obj_desc); break; @@ -371,7 +371,7 @@ case ACPI_TYPE_LOCAL_BANK_FIELD: case ACPI_TYPE_LOCAL_INDEX_FIELD: - acpi_os_printf (" Off %.2X Len %.2X Acc %.2hd\n", + acpi_os_printf ("Off %.2X Len %.2X Acc %.2hd\n", (obj_desc->common_field.base_byte_offset * 8) + obj_desc->common_field.start_field_bit_offset, obj_desc->common_field.bit_length, diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/namespace/nssearch.c linux-2.4.23-pre8/drivers/acpi/namespace/nssearch.c --- linux-2.4.22/drivers/acpi/namespace/nssearch.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/namespace/nssearch.c 2003-10-22 22:49:45.000000000 +0000 @@ -96,7 +96,7 @@ scope_name = acpi_ns_get_external_pathname (node); if (scope_name) { - ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Searching %s [%p] For %4.4s (%s)\n", + ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Searching %s (%p) For [%4.4s] (%s)\n", scope_name, node, (char *) &target_name, acpi_ut_get_type_name (type))); ACPI_MEM_FREE (scope_name); @@ -117,9 +117,9 @@ * Found matching entry. */ ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, - "Name %4.4s Type [%s] found in scope [%4.4s] %p\n", + "Name [%4.4s] (%s) %p found in scope [%4.4s] %p\n", (char *) &target_name, acpi_ut_get_type_name (next_node->type), - next_node->name.ascii, next_node)); + next_node, node->name.ascii, node)); *return_node = next_node; return_ACPI_STATUS (AE_OK); @@ -143,7 +143,7 @@ /* Searched entire namespace level, not found */ ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, - "Name %4.4s Type [%s] not found in search in scope [%4.4s] %p first child %p\n", + "Name [%4.4s] (%s) not found in search in scope [%4.4s] %p first child %p\n", (char *) &target_name, acpi_ut_get_type_name (type), node->name.ascii, node, node->child)); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/namespace/nsutils.c linux-2.4.23-pre8/drivers/acpi/namespace/nsutils.c --- linux-2.4.22/drivers/acpi/namespace/nsutils.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/namespace/nsutils.c 2003-10-22 22:48:56.000000000 +0000 @@ -175,6 +175,11 @@ acpi_status status; + if (!node) { + acpi_os_printf ("[NULL NAME]"); + return; + } + /* Convert handle to a full pathname and print it (with supplied message) */ buffer.length = ACPI_ALLOCATE_LOCAL_BUFFER; @@ -470,11 +475,11 @@ *result = 0; if (info->fully_qualified) { - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "returning [%p] (abs) \"\\%s\"\n", + ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Returning [%p] (abs) \"\\%s\"\n", internal_name, internal_name)); } else { - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "returning [%p] (rel) \"%s\"\n", + ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Returning [%p] (rel) \"%s\"\n", internal_name, internal_name)); } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/parser/psparse.c linux-2.4.23-pre8/drivers/acpi/parser/psparse.c --- linux-2.4.22/drivers/acpi/parser/psparse.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/parser/psparse.c 2003-10-22 22:47:55.000000000 +0000 @@ -437,7 +437,6 @@ return_ACPI_STATUS (AE_BAD_PARAMETER); } - parser_state = &walk_state->parser_state; walk_state->arg_types = 0; @@ -705,10 +704,9 @@ walk_state->arg_types = 0; break; - default: - /* Op is not a constant or string, append each argument */ + /* Op is not a constant or string, append each argument to the Op */ while (GET_CURRENT_ARG_TYPE (walk_state->arg_types) && !walk_state->arg_count) { @@ -727,23 +725,23 @@ INCREMENT_ARG_LIST (walk_state->arg_types); } + /* Special processing for certain opcodes */ + switch (op->common.aml_opcode) { case AML_METHOD_OP: - /* For a method, save the length and address of the body */ - /* - * Skip parsing of control method or opregion body, + * Skip parsing of control method * because we don't have enough info in the first pass - * to parse them correctly. + * to parse it correctly. + * + * Save the length and address of the body */ op->named.data = parser_state->aml; op->named.length = (u32) (parser_state->pkg_end - parser_state->aml); - /* - * Skip body of method. For op_regions, we must continue - * parsing because the opregion is not a standalone - * package (We don't know where the end is). - */ + + /* Skip body of method */ + parser_state->aml = parser_state->pkg_end; walk_state->arg_count = 0; break; @@ -756,15 +754,15 @@ (op->common.parent->common.aml_opcode == AML_NAME_OP) && (walk_state->descending_callback != acpi_ds_exec_begin_op)) { /* - * Skip parsing of + * Skip parsing of Buffers and Packages * because we don't have enough info in the first pass * to parse them correctly. */ op->named.data = aml_op_start; op->named.length = (u32) (parser_state->pkg_end - aml_op_start); - /* - * Skip body - */ + + /* Skip body */ + parser_state->aml = parser_state->pkg_end; walk_state->arg_count = 0; } @@ -778,6 +776,7 @@ break; default: + /* No action for all other opcodes */ break; } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/pci_irq.c linux-2.4.23-pre8/drivers/acpi/pci_irq.c --- linux-2.4.22/drivers/acpi/pci_irq.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/pci_irq.c 2003-10-22 22:49:48.000000000 +0000 @@ -73,6 +73,9 @@ ACPI_FUNCTION_TRACE("acpi_pci_irq_find_prt_entry"); + if (!acpi_prt.count) + return_PTR(NULL); + /* * Parse through all PRT entries looking for a match on the specified * PCI device's segment, bus, device, and pin (don't care about func). diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/pci_link.c linux-2.4.23-pre8/drivers/acpi/pci_link.c --- linux-2.4.22/drivers/acpi/pci_link.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/pci_link.c 2003-10-22 22:48:57.000000000 +0000 @@ -216,7 +216,6 @@ return AE_CTRL_TERMINATE; } - static int acpi_pci_link_get_current ( struct acpi_pci_link *link) @@ -275,6 +274,28 @@ return_VALUE(result); } +static int +acpi_pci_link_try_get_current ( + struct acpi_pci_link *link, + int irq) +{ + int result; + + ACPI_FUNCTION_TRACE("acpi_pci_link_try_get_current"); + + result = acpi_pci_link_get_current(link); + if (result && link->irq.active) { + return_VALUE(result); + } + + if (!link->irq.active) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "No active IRQ resource found\n")); + printk(KERN_WARNING "_CRS returns NULL! Using IRQ %d for device (%s [%s]).\n", irq, acpi_device_name(link->device), acpi_device_bid(link->device)); + link->irq.active = irq; + } + + return 0; +} static int acpi_pci_link_set ( @@ -290,7 +311,8 @@ struct acpi_buffer buffer = {sizeof(resource)+1, &resource}; int i = 0; int valid = 0; - + int resource_type = 0; + ACPI_FUNCTION_TRACE("acpi_pci_link_set"); if (!link || !irq) @@ -313,12 +335,23 @@ } } + /* If IRQ<=15, first try with a "normal" IRQ descriptor. If that fails, try with + * an extended one */ + if (irq <= 15) { + resource_type = ACPI_RSTYPE_IRQ; + } else { + resource_type = ACPI_RSTYPE_EXT_IRQ; + } + +retry_programming: + memset(&resource, 0, sizeof(resource)); /* NOTE: PCI interrupts are always level / active_low / shared. But not all interrupts > 15 are PCI interrupts. Rely on the ACPI IRQ definition for parameters */ - if (irq <= 15) { + switch(resource_type) { + case ACPI_RSTYPE_IRQ: resource.res.id = ACPI_RSTYPE_IRQ; resource.res.length = sizeof(struct acpi_resource); resource.res.data.irq.edge_level = link->irq.edge_level; @@ -326,8 +359,9 @@ resource.res.data.irq.shared_exclusive = ACPI_SHARED; resource.res.data.irq.number_of_interrupts = 1; resource.res.data.irq.interrupts[0] = irq; - } - else { + break; + + case ACPI_RSTYPE_EXT_IRQ: resource.res.id = ACPI_RSTYPE_EXT_IRQ; resource.res.length = sizeof(struct acpi_resource); resource.res.data.extended_irq.producer_consumer = ACPI_CONSUMER; @@ -337,11 +371,22 @@ resource.res.data.extended_irq.number_of_interrupts = 1; resource.res.data.extended_irq.interrupts[0] = irq; /* ignore resource_source, it's optional */ + break; } resource.end.id = ACPI_RSTYPE_END_TAG; /* Attempt to set the resource */ status = acpi_set_current_resources(link->handle, &buffer); + + + /* if we failed and IRQ <= 15, try again with an extended descriptor */ + if (ACPI_FAILURE(status) && (resource_type == ACPI_RSTYPE_IRQ)) { + resource_type = ACPI_RSTYPE_EXT_IRQ; + printk(PREFIX "Retrying with extended IRQ descriptor\n"); + goto retry_programming; + } + + /* check for total failure */ if (ACPI_FAILURE(status)) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _SRS\n")); return_VALUE(-ENODEV); @@ -359,7 +404,7 @@ } /* Make sure the active IRQ is the one we requested. */ - result = acpi_pci_link_get_current(link); + result = acpi_pci_link_try_get_current(link, irq); if (result) { return_VALUE(result); } @@ -454,16 +499,16 @@ irq = link->irq.active; } else { irq = link->irq.possible[0]; - } - /* - * Select the best IRQ. This is done in reverse to promote + /* + * Select the best IRQ. This is done in reverse to promote * the use of IRQs 9, 10, 11, and >15. */ for (i=(link->irq.possible_count-1); i>0; i--) { if (acpi_irq_penalty[irq] > acpi_irq_penalty[link->irq.possible[i]]) irq = link->irq.possible[i]; } + } /* Attempt to enable the link device at this IRQ. */ if (acpi_pci_link_set(link, irq)) { @@ -514,10 +559,9 @@ return_VALUE(0); } - if (acpi_pci_link_allocate(link)) { - return -ENODEV; - } - + if (acpi_pci_link_allocate(link)) + return_VALUE(0); + if (!link->irq.active) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Link disabled\n")); return_VALUE(0); @@ -573,10 +617,6 @@ else printk(" %d", link->irq.possible[i]); } - if (!link->irq.active) - printk(", disabled"); - else if (!found) - printk(", enabled at IRQ %d", link->irq.active); printk(")\n"); /* TBD: Acquire/release lock */ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/power.c linux-2.4.23-pre8/drivers/acpi/power.c --- linux-2.4.22/drivers/acpi/power.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/power.c 2003-10-22 22:47:39.000000000 +0000 @@ -323,6 +323,9 @@ if (!device || (state < ACPI_STATE_D0) || (state > ACPI_STATE_D3)) return_VALUE(-EINVAL); + if ((device->power.state < ACPI_STATE_D0) || (device->power.state > ACPI_STATE_D3)) + return_VALUE(-ENODEV); + cl = &device->power.states[device->power.state].resources; tl = &device->power.states[state].resources; @@ -345,8 +348,6 @@ goto end; } - device->power.state = state; - /* * Then we dereference all power resources used in the current list. */ @@ -356,6 +357,8 @@ goto end; } + /* We shouldn't change the state till all above operations succeed */ + device->power.state = state; end: if (result) ACPI_DEBUG_PRINT((ACPI_DB_WARN, diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/resources/rsaddr.c linux-2.4.23-pre8/drivers/acpi/resources/rsaddr.c --- linux-2.4.22/drivers/acpi/resources/rsaddr.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/resources/rsaddr.c 2003-10-22 22:47:28.000000000 +0000 @@ -94,6 +94,12 @@ buffer += 1; ACPI_MOVE_16_TO_16 (&temp16, buffer); + /* Validate minimum descriptor length */ + + if (temp16 < 13) { + return_ACPI_STATUS (AE_AML_BAD_RESOURCE_LENGTH); + } + *bytes_consumed = temp16 + 3; output_struct->id = ACPI_RSTYPE_ADDRESS16; @@ -199,8 +205,11 @@ * pointer to where the null terminated string goes: * Each Interrupt takes 32-bits + the 5 bytes of the * stream that are default. + * + * Note: Some resource descriptors will have an additional null, so + * we add 1 to the length. */ - if (*bytes_consumed > 16) { + if (*bytes_consumed > (16 + 1)) { /* Dereference the Index */ temp8 = *buffer; @@ -401,7 +410,7 @@ /* * Buffer needs to be set to the length of the sting + one for the - * terminating null + * terminating null */ buffer += (acpi_size)(ACPI_STRLEN (linked_list->data.address16.resource_source.string_ptr) + 1); } @@ -470,8 +479,14 @@ */ buffer += 1; ACPI_MOVE_16_TO_16 (&temp16, buffer); - *bytes_consumed = temp16 + 3; + /* Validate minimum descriptor length */ + + if (temp16 < 23) { + return_ACPI_STATUS (AE_AML_BAD_RESOURCE_LENGTH); + } + + *bytes_consumed = temp16 + 3; output_struct->id = ACPI_RSTYPE_ADDRESS32; /* @@ -578,8 +593,11 @@ * This will leave us pointing to the Resource Source Index * If it is present, then save it off and calculate the * pointer to where the null terminated string goes: + * + * Note: Some resource descriptors will have an additional null, so + * we add 1 to the length. */ - if (*bytes_consumed > 26) { + if (*bytes_consumed > (26 + 1)) { /* Dereference the Index */ temp8 = *buffer; @@ -616,8 +634,8 @@ /* * In order for the struct_size to fall on a 32-bit boundary, - * calculate the length of the string and expand the - * struct_size to the next 32-bit boundary. + * calculate the length of the string and expand the + * struct_size to the next 32-bit boundary. */ temp8 = (u8) (index + 1); struct_size += ACPI_ROUND_UP_to_32_bITS (temp8); @@ -848,6 +866,12 @@ buffer += 1; ACPI_MOVE_16_TO_16 (&temp16, buffer); + /* Validate minimum descriptor length */ + + if (temp16 < 43) { + return_ACPI_STATUS (AE_AML_BAD_RESOURCE_LENGTH); + } + *bytes_consumed = temp16 + 3; output_struct->id = ACPI_RSTYPE_ADDRESS64; @@ -958,8 +982,11 @@ * pointer to where the null terminated string goes: * Each Interrupt takes 32-bits + the 5 bytes of the * stream that are default. + * + * Note: Some resource descriptors will have an additional null, so + * we add 1 to the length. */ - if (*bytes_consumed > 46) { + if (*bytes_consumed > (46 + 1)) { /* Dereference the Index */ temp8 = *buffer; @@ -992,7 +1019,6 @@ * Add the terminating null */ *temp_ptr = 0x00; - output_struct->data.address64.resource_source.string_length = index + 1; /* @@ -1064,7 +1090,6 @@ /* * Set a pointer to the Length field - to be filled in later */ - length_field = ACPI_CAST_PTR (u16, buffer); buffer += 2; @@ -1161,7 +1186,7 @@ /* * Buffer needs to be set to the length of the sting + one for the - * terminating null + * terminating null */ buffer += (acpi_size)(ACPI_STRLEN (linked_list->data.address64.resource_source.string_ptr) + 1); } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/resources/rsirq.c linux-2.4.23-pre8/drivers/acpi/resources/rsirq.c --- linux-2.4.22/drivers/acpi/resources/rsirq.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/resources/rsirq.c 2003-10-22 22:48:54.000000000 +0000 @@ -319,6 +319,12 @@ buffer += 1; ACPI_MOVE_16_TO_16 (&temp16, buffer); + /* Validate minimum descriptor length */ + + if (temp16 < 6) { + return_ACPI_STATUS (AE_AML_BAD_RESOURCE_LENGTH); + } + *bytes_consumed = temp16 + 3; output_struct->id = ACPI_RSTYPE_EXT_IRQ; @@ -357,6 +363,12 @@ buffer += 1; temp8 = *buffer; + /* Must have at least one IRQ */ + + if (temp8 < 1) { + return_ACPI_STATUS (AE_AML_BAD_RESOURCE_LENGTH); + } + output_struct->data.extended_irq.number_of_interrupts = temp8; /* @@ -388,9 +400,12 @@ * pointer to where the null terminated string goes: * Each Interrupt takes 32-bits + the 5 bytes of the * stream that are default. + * + * Note: Some resource descriptors will have an additional null, so + * we add 1 to the length. */ if (*bytes_consumed > - ((acpi_size) output_struct->data.extended_irq.number_of_interrupts * 4) + 5) { + ((acpi_size) output_struct->data.extended_irq.number_of_interrupts * 4) + (5 + 1)) { /* Dereference the Index */ temp8 = *buffer; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/system.c linux-2.4.23-pre8/drivers/acpi/system.c --- linux-2.4.22/drivers/acpi/system.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/system.c 2003-10-22 22:48:36.000000000 +0000 @@ -1192,11 +1192,21 @@ #if defined(CONFIG_MAGIC_SYSRQ) && defined(CONFIG_PM) +static int po_cb_active; + +static void acpi_po_tramp(void *x) +{ + acpi_power_off(); +} + /* Simple wrapper calling power down function. */ static void acpi_sysrq_power_off(int key, struct pt_regs *pt_regs, struct kbd_struct *kbd, struct tty_struct *tty) -{ - acpi_power_off(); +{ + static struct tq_struct tq = { .routine = acpi_po_tramp }; + if (po_cb_active++) + return; + schedule_task(&tq); } struct sysrq_key_op sysrq_acpi_poweroff_op = { diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/tables/tbconvrt.c linux-2.4.23-pre8/drivers/acpi/tables/tbconvrt.c --- linux-2.4.22/drivers/acpi/tables/tbconvrt.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/tables/tbconvrt.c 2003-10-22 22:48:36.000000000 +0000 @@ -131,7 +131,7 @@ /* Copy the header and set the length */ ACPI_MEMCPY (new_table, table_info->pointer, sizeof (struct acpi_table_header)); - new_table->header.length = (u32) table_size; + new_table->length = (u32) table_size; /* Copy the table pointers */ @@ -430,17 +430,17 @@ * FADT length and version validation. The table must be at least as * long as the version 1.0 FADT */ - if (acpi_gbl_FADT->header.length < sizeof (struct fadt_descriptor_rev1)) { - ACPI_REPORT_ERROR (("Invalid FADT table length: 0x%X\n", acpi_gbl_FADT->header.length)); + if (acpi_gbl_FADT->length < sizeof (struct fadt_descriptor_rev1)) { + ACPI_REPORT_ERROR (("Invalid FADT table length: 0x%X\n", acpi_gbl_FADT->length)); return_ACPI_STATUS (AE_INVALID_TABLE_LENGTH); } - if (acpi_gbl_FADT->header.revision >= FADT2_REVISION_ID) { - if (acpi_gbl_FADT->header.length < sizeof (struct fadt_descriptor_rev2)) { + if (acpi_gbl_FADT->revision >= FADT2_REVISION_ID) { + if (acpi_gbl_FADT->length < sizeof (struct fadt_descriptor_rev2)) { /* Length is too short to be a V2.0 table */ ACPI_REPORT_WARNING (("Inconsistent FADT length (0x%X) and revision (0x%X), using FADT V1.0 portion of table\n", - acpi_gbl_FADT->header.length, acpi_gbl_FADT->header.revision)); + acpi_gbl_FADT->length, acpi_gbl_FADT->revision)); acpi_tb_convert_fadt1 (local_fadt, (void *) acpi_gbl_FADT); } @@ -460,7 +460,7 @@ * Global FADT pointer will point to the new common V2.0 FADT */ acpi_gbl_FADT = local_fadt; - acpi_gbl_FADT->header.length = sizeof (FADT_DESCRIPTOR); + acpi_gbl_FADT->length = sizeof (FADT_DESCRIPTOR); /* Free the original table */ @@ -477,8 +477,8 @@ ACPI_DEBUG_PRINT ((ACPI_DB_TABLES, "Hex dump of common internal FADT, size %d (%X)\n", - acpi_gbl_FADT->header.length, acpi_gbl_FADT->header.length)); - ACPI_DUMP_BUFFER ((u8 *) (acpi_gbl_FADT), acpi_gbl_FADT->header.length); + acpi_gbl_FADT->length, acpi_gbl_FADT->length)); + ACPI_DUMP_BUFFER ((u8 *) (acpi_gbl_FADT), acpi_gbl_FADT->length); return_ACPI_STATUS (AE_OK); } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/tables/tbinstal.c linux-2.4.23-pre8/drivers/acpi/tables/tbinstal.c --- linux-2.4.22/drivers/acpi/tables/tbinstal.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/tables/tbinstal.c 2003-10-22 22:48:12.000000000 +0000 @@ -350,7 +350,7 @@ void acpi_tb_delete_all_tables (void) { - acpi_table_type type; + acpi_table_type type; /* @@ -378,7 +378,7 @@ void acpi_tb_delete_tables_by_type ( - acpi_table_type type) + acpi_table_type type) { struct acpi_table_desc *table_desc; u32 count; @@ -425,15 +425,16 @@ break; } - /* Free the table */ - /* Get the head of the list */ - + /* + * Free the table + * 1) Get the head of the list + */ table_desc = acpi_gbl_table_lists[type].next; count = acpi_gbl_table_lists[type].count; /* - * Walk the entire list, deleting both the allocated tables - * and the table descriptors + * 2) Walk the entire list, deleting both the allocated tables + * and the table descriptors */ for (i = 0; i < count; i++) { table_desc = acpi_tb_uninstall_table (table_desc); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/tables.c linux-2.4.23-pre8/drivers/acpi/tables.c --- linux-2.4.22/drivers/acpi/tables.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/tables.c 2003-10-22 22:47:55.000000000 +0000 @@ -69,7 +69,8 @@ static unsigned long sdt_pa; /* Physical Address */ static unsigned long sdt_count; /* Table count */ -static struct acpi_table_sdt *sdt_entry; + +static struct acpi_table_sdt sdt_entry[ACPI_MAX_TABLES]; void acpi_table_print ( @@ -418,12 +419,6 @@ sdt_count = ACPI_MAX_TABLES; } - sdt_entry = alloc_bootmem(sdt_count * sizeof(struct acpi_table_sdt)); - if (!sdt_entry) { - printk(KERN_ERR "ACPI: Could not allocate mem for SDT entries!\n"); - return -ENOMEM; - } - for (i = 0; i < sdt_count; i++) sdt_entry[i].pa = (unsigned long) mapped_xsdt->entry[i]; } @@ -470,12 +465,6 @@ sdt_count = ACPI_MAX_TABLES; } - sdt_entry = alloc_bootmem(sdt_count * sizeof(struct acpi_table_sdt)); - if (!sdt_entry) { - printk(KERN_ERR "ACPI: Could not allocate mem for SDT entries!\n"); - return -ENOMEM; - } - for (i = 0; i < sdt_count; i++) sdt_entry[i].pa = (unsigned long) mapped_rsdt->entry[i]; } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/utilities/utalloc.c linux-2.4.23-pre8/drivers/acpi/utilities/utalloc.c --- linux-2.4.22/drivers/acpi/utilities/utalloc.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/utilities/utalloc.c 2003-10-22 22:47:46.000000000 +0000 @@ -795,7 +795,7 @@ ACPI_MEMSET (&allocation->user_space, 0xEA, allocation->size); - ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "Freeing size %X\n", allocation->size)); + ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "Freeing size 0%X\n", allocation->size)); status = acpi_ut_release_mutex (ACPI_MTX_MEMORY); return_ACPI_STATUS (status); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/utilities/utdelete.c linux-2.4.23-pre8/drivers/acpi/utilities/utdelete.c --- linux-2.4.22/drivers/acpi/utilities/utdelete.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/utilities/utdelete.c 2003-10-22 22:48:55.000000000 +0000 @@ -416,7 +416,7 @@ u32 i; union acpi_generic_state *state_list = NULL; union acpi_generic_state *state; - + union acpi_operand_object *tmp; ACPI_FUNCTION_TRACE_PTR ("ut_update_object_reference", object); @@ -448,8 +448,16 @@ switch (ACPI_GET_OBJECT_TYPE (object)) { case ACPI_TYPE_DEVICE: - acpi_ut_update_ref_count (object->device.system_notify, action); - acpi_ut_update_ref_count (object->device.device_notify, action); + tmp = object->device.system_notify; + if (tmp && (tmp->common.reference_count <= 1) && action == REF_DECREMENT) + object->device.system_notify = NULL; + acpi_ut_update_ref_count (tmp, action); + + tmp = object->device.device_notify; + if (tmp && (tmp->common.reference_count <= 1) && action == REF_DECREMENT) + object->device.device_notify = NULL; + acpi_ut_update_ref_count (tmp, action); + break; @@ -470,6 +478,10 @@ if (ACPI_FAILURE (status)) { goto error_exit; } + + tmp = object->package.elements[i]; + if (tmp && (tmp->common.reference_count <= 1) && action == REF_DECREMENT) + object->package.elements[i] = NULL; } break; @@ -481,6 +493,10 @@ if (ACPI_FAILURE (status)) { goto error_exit; } + + tmp = object->buffer_field.buffer_obj; + if ( tmp && (tmp->common.reference_count <= 1) && action == REF_DECREMENT) + object->buffer_field.buffer_obj = NULL; break; @@ -491,6 +507,10 @@ if (ACPI_FAILURE (status)) { goto error_exit; } + + tmp = object->field.region_obj; + if ( tmp && (tmp->common.reference_count <= 1) && action == REF_DECREMENT) + object->field.region_obj = NULL; break; @@ -502,11 +522,19 @@ goto error_exit; } + tmp = object->bank_field.bank_obj; + if ( tmp && (tmp->common.reference_count <= 1) && action == REF_DECREMENT) + object->bank_field.bank_obj = NULL; + status = acpi_ut_create_update_state_and_push ( object->bank_field.region_obj, action, &state_list); if (ACPI_FAILURE (status)) { goto error_exit; } + + tmp = object->bank_field.region_obj; + if ( tmp && (tmp->common.reference_count <= 1) && action == REF_DECREMENT) + object->bank_field.region_obj = NULL; break; @@ -518,11 +546,19 @@ goto error_exit; } + tmp = object->index_field.index_obj; + if ( tmp && (tmp->common.reference_count <= 1) && action == REF_DECREMENT) + object->index_field.index_obj = NULL; + status = acpi_ut_create_update_state_and_push ( object->index_field.data_obj, action, &state_list); if (ACPI_FAILURE (status)) { goto error_exit; } + + tmp = object->index_field.data_obj; + if ( tmp && (tmp->common.reference_count <= 1) && action == REF_DECREMENT) + object->index_field.data_obj = NULL; break; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/acpi/utilities/utglobal.c linux-2.4.23-pre8/drivers/acpi/utilities/utglobal.c --- linux-2.4.22/drivers/acpi/utilities/utglobal.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/acpi/utilities/utglobal.c 2003-10-22 22:47:45.000000000 +0000 @@ -307,8 +307,8 @@ /*********** Name, Signature, Global typed pointer Signature size, Type How many allowed?, Contains valid AML? */ /* RSDP 0 */ {RSDP_NAME, RSDP_SIG, NULL, sizeof (RSDP_SIG)-1, ACPI_TABLE_ROOT | ACPI_TABLE_SINGLE}, - /* DSDT 1 */ {DSDT_SIG, DSDT_SIG, (void *) &acpi_gbl_DSDT, sizeof (DSDT_SIG)-1, ACPI_TABLE_SECONDARY| ACPI_TABLE_SINGLE | ACPI_TABLE_EXECUTABLE}, - /* FADT 2 */ {FADT_SIG, FADT_SIG, (void *) &acpi_gbl_FADT, sizeof (FADT_SIG)-1, ACPI_TABLE_PRIMARY | ACPI_TABLE_SINGLE}, + /* DSDT 1 */ {DSDT_SIG, DSDT_SIG, (void *) &acpi_gbl_DSDT, sizeof (DSDT_SIG)-1, ACPI_TABLE_SECONDARY| ACPI_TABLE_SINGLE | ACPI_TABLE_EXECUTABLE}, + /* FADT 2 */ {FADT_SIG, FADT_SIG, (void *) &acpi_gbl_FADT, sizeof (FADT_SIG)-1, ACPI_TABLE_PRIMARY | ACPI_TABLE_SINGLE}, /* FACS 3 */ {FACS_SIG, FACS_SIG, (void *) &acpi_gbl_FACS, sizeof (FACS_SIG)-1, ACPI_TABLE_SECONDARY| ACPI_TABLE_SINGLE}, /* PSDT 4 */ {PSDT_SIG, PSDT_SIG, NULL, sizeof (PSDT_SIG)-1, ACPI_TABLE_PRIMARY | ACPI_TABLE_MULTIPLE | ACPI_TABLE_EXECUTABLE}, /* SSDT 5 */ {SSDT_SIG, SSDT_SIG, NULL, sizeof (SSDT_SIG)-1, ACPI_TABLE_PRIMARY | ACPI_TABLE_MULTIPLE | ACPI_TABLE_EXECUTABLE}, diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/atm/Makefile linux-2.4.23-pre8/drivers/atm/Makefile --- linux-2.4.22/drivers/atm/Makefile 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/atm/Makefile 2003-10-22 22:47:36.000000000 +0000 @@ -59,8 +59,6 @@ obj-$(CONFIG_ATM_HE) += suni.o endif -EXTRA_CFLAGS=-g - list-multi := fore_200e.o fore_200e-objs := fore200e.o $(FORE200E_FW_OBJS) diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/atm/atmtcp.c linux-2.4.23-pre8/drivers/atm/atmtcp.c --- linux-2.4.22/drivers/atm/atmtcp.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/atm/atmtcp.c 2003-10-22 22:49:09.000000000 +0000 @@ -153,9 +153,9 @@ static int atmtcp_v_ioctl(struct atm_dev *dev,unsigned int cmd,void *arg) { - unsigned long flags; struct atm_cirange ci; struct atm_vcc *vcc; + struct sock *s; if (cmd != ATM_SETCIRANGE) return -ENOIOCTLCMD; if (copy_from_user(&ci,(void *) arg,sizeof(ci))) return -EFAULT; @@ -163,14 +163,18 @@ if (ci.vci_bits == ATM_CI_MAX) ci.vci_bits = MAX_VCI_BITS; if (ci.vpi_bits > MAX_VPI_BITS || ci.vpi_bits < 0 || ci.vci_bits > MAX_VCI_BITS || ci.vci_bits < 0) return -EINVAL; - spin_lock_irqsave(&dev->lock, flags); - for (vcc = dev->vccs; vcc; vcc = vcc->next) + read_lock(&vcc_sklist_lock); + for (s = vcc_sklist; s; s = s->next) { + vcc = s->protinfo.af_atm; + if (vcc->dev != dev) + continue; if ((vcc->vpi >> ci.vpi_bits) || (vcc->vci >> ci.vci_bits)) { - spin_unlock_irqrestore(&dev->lock, flags); + read_unlock(&vcc_sklist_lock); return -EBUSY; } - spin_unlock_irqrestore(&dev->lock, flags); + } + read_unlock(&vcc_sklist_lock); dev->ci_range = ci; return 0; } @@ -233,9 +237,9 @@ static void atmtcp_c_close(struct atm_vcc *vcc) { - unsigned long flags; struct atm_dev *atmtcp_dev; struct atmtcp_dev_data *dev_data; + struct sock *s; struct atm_vcc *walk; atmtcp_dev = (struct atm_dev *) vcc->dev_data; @@ -246,19 +250,23 @@ kfree(dev_data); shutdown_atm_dev(atmtcp_dev); vcc->dev_data = NULL; - spin_lock_irqsave(&atmtcp_dev->lock, flags); - for (walk = atmtcp_dev->vccs; walk; walk = walk->next) + read_lock(&vcc_sklist_lock); + for (s = vcc_sklist; s; s = s->next) { + walk = s->protinfo.af_atm; + if (walk->dev != atmtcp_dev) + continue; wake_up(&walk->sleep); - spin_unlock_irqrestore(&atmtcp_dev->lock, flags); + } + read_unlock(&vcc_sklist_lock); } static int atmtcp_c_send(struct atm_vcc *vcc,struct sk_buff *skb) { - unsigned long flags; struct atm_dev *dev; struct atmtcp_hdr *hdr; - struct atm_vcc *out_vcc; + struct sock *s; + struct atm_vcc *out_vcc = NULL; struct sk_buff *new_skb; int result = 0; @@ -270,13 +278,17 @@ (struct atmtcp_control *) skb->data); goto done; } - spin_lock_irqsave(&dev->lock, flags); - for (out_vcc = dev->vccs; out_vcc; out_vcc = out_vcc->next) + read_lock(&vcc_sklist_lock); + for (s = vcc_sklist; s; s = s->next) { + out_vcc = s->protinfo.af_atm; + if (out_vcc->dev != dev) + continue; if (out_vcc->vpi == ntohs(hdr->vpi) && out_vcc->vci == ntohs(hdr->vci) && out_vcc->qos.rxtp.traffic_class != ATM_NONE) break; - spin_unlock_irqrestore(&dev->lock, flags); + } + read_unlock(&vcc_sklist_lock); if (!out_vcc) { atomic_inc(&vcc->stats->tx_err); goto done; @@ -366,7 +378,7 @@ if (itf != -1) dev = atm_dev_lookup(itf); if (dev) { if (dev->ops != &atmtcp_v_dev_ops) { - atm_dev_release(dev); + atm_dev_put(dev); return -EMEDIUMTYPE; } if (PRIV(dev)->vcc) return -EBUSY; @@ -378,7 +390,8 @@ if (error) return error; } PRIV(dev)->vcc = vcc; - bind_vcc(vcc,&atmtcp_control_dev); + vcc->dev = &atmtcp_control_dev; + vcc_insert_socket(vcc->sk); set_bit(ATM_VF_META,&vcc->flags); set_bit(ATM_VF_READY,&vcc->flags); vcc->dev_data = dev; @@ -402,7 +415,7 @@ dev = atm_dev_lookup(itf); if (!dev) return -ENODEV; if (dev->ops != &atmtcp_v_dev_ops) { - atm_dev_release(dev); + atm_dev_put(dev); return -EMEDIUMTYPE; } dev_data = PRIV(dev); @@ -410,7 +423,7 @@ dev_data->persist = 0; if (PRIV(dev)->vcc) return 0; kfree(dev_data); - atm_dev_release(dev); + atm_dev_put(dev); shutdown_atm_dev(dev); return 0; } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/atm/eni.c linux-2.4.23-pre8/drivers/atm/eni.c --- linux-2.4.22/drivers/atm/eni.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/atm/eni.c 2003-10-22 22:48:11.000000000 +0000 @@ -1887,10 +1887,10 @@ static int get_ci(struct atm_vcc *vcc,short *vpi,int *vci) { - unsigned long flags; + struct sock *s; struct atm_vcc *walk; - spin_lock_irqsave(&vcc->dev->lock, flags); + read_lock(&vcc_sklist_lock); if (*vpi == ATM_VPI_ANY) *vpi = 0; if (*vci == ATM_VCI_ANY) { for (*vci = ATM_NOT_RSV_VCI; *vci < NR_VCI; (*vci)++) { @@ -1898,40 +1898,47 @@ ENI_DEV(vcc->dev)->rx_map[*vci]) continue; if (vcc->qos.txtp.traffic_class != ATM_NONE) { - for (walk = vcc->dev->vccs; walk; - walk = walk->next) + for (s = vcc_sklist; s; s = s->next) { + walk = s->protinfo.af_atm; + if (walk->dev != vcc->dev) + continue; if (test_bit(ATM_VF_ADDR,&walk->flags) && walk->vci == *vci && walk->qos.txtp.traffic_class != ATM_NONE) break; - if (walk) continue; + } + if (s) continue; } break; } - spin_unlock_irqrestore(&vcc->dev->lock, flags); + read_unlock(&vcc_sklist_lock); return *vci == NR_VCI ? -EADDRINUSE : 0; } if (*vci == ATM_VCI_UNSPEC) { - spin_unlock_irqrestore(&vcc->dev->lock, flags); + read_unlock(&vcc_sklist_lock); return 0; } if (vcc->qos.rxtp.traffic_class != ATM_NONE && ENI_DEV(vcc->dev)->rx_map[*vci]) { - spin_unlock_irqrestore(&vcc->dev->lock, flags); + read_unlock(&vcc_sklist_lock); return -EADDRINUSE; } if (vcc->qos.txtp.traffic_class == ATM_NONE) { - spin_unlock_irqrestore(&vcc->dev->lock, flags); + read_unlock(&vcc_sklist_lock); return 0; } - for (walk = vcc->dev->vccs; walk; walk = walk->next) + for (s = vcc_sklist; s; s = s->next) { + walk = s->protinfo.af_atm; + if (walk->dev != vcc->dev) + continue; if (test_bit(ATM_VF_ADDR,&walk->flags) && walk->vci == *vci && walk->qos.txtp.traffic_class != ATM_NONE) { - spin_unlock_irqrestore(&vcc->dev->lock, flags); + read_unlock(&vcc_sklist_lock); return -EADDRINUSE; } - spin_unlock_irqrestore(&vcc->dev->lock, flags); + } + read_unlock(&vcc_sklist_lock); return 0; } @@ -2139,7 +2146,7 @@ static int eni_proc_read(struct atm_dev *dev,loff_t *pos,char *page) { - unsigned long flags; + struct sock *s; static const char *signal[] = { "LOST","unknown","okay" }; struct eni_dev *eni_dev = ENI_DEV(dev); struct atm_vcc *vcc; @@ -2212,11 +2219,15 @@ return sprintf(page,"%10sbacklog %u packets\n","", skb_queue_len(&tx->backlog)); } - spin_lock_irqsave(&dev->lock, flags); - for (vcc = dev->vccs; vcc; vcc = vcc->next) { - struct eni_vcc *eni_vcc = ENI_VCC(vcc); + read_lock(&vcc_sklist_lock); + for (s = vcc_sklist; s; s = s->next) { + struct eni_vcc *eni_vcc; int length; + vcc = s->protinfo.af_atm; + if (vcc->dev != dev) + continue; + eni_vcc = ENI_VCC(vcc); if (--left) continue; length = sprintf(page,"vcc %4d: ",vcc->vci); if (eni_vcc->rx) { @@ -2231,10 +2242,10 @@ length += sprintf(page+length,"tx[%d], txing %d bytes", eni_vcc->tx->index,eni_vcc->txing); page[length] = '\n'; - spin_unlock_irqrestore(&dev->lock, flags); + read_unlock(&vcc_sklist_lock); return length+1; } - spin_unlock_irqrestore(&dev->lock, flags); + read_unlock(&vcc_sklist_lock); for (i = 0; i < eni_dev->free_len; i++) { struct eni_free *fe = eni_dev->free_list+i; unsigned long offset; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/atm/fore200e.c linux-2.4.23-pre8/drivers/atm/fore200e.c --- linux-2.4.22/drivers/atm/fore200e.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/atm/fore200e.c 2003-10-22 22:48:54.000000000 +0000 @@ -1077,18 +1077,22 @@ static struct atm_vcc* fore200e_find_vcc(struct fore200e* fore200e, struct rpd* rpd) { - unsigned long flags; + struct sock *s; struct atm_vcc* vcc; - spin_lock_irqsave(&fore200e->atm_dev->lock, flags); - for (vcc = fore200e->atm_dev->vccs; vcc; vcc = vcc->next) { - - if (vcc->vpi == rpd->atm_header.vpi && vcc->vci == rpd->atm_header.vci) - break; + read_lock(&vcc_sklist_lock); + for(s = vcc_sklist; s; s = s->next) { + vcc = s->protinfo.af_atm; + if (vcc->dev != fore200e->atm_dev) + continue; + if (vcc->vpi == rpd->atm_header.vpi && vcc->vci == rpd->atm_header.vci) { + read_unlock(&vcc_sklist_lock); + return vcc; + } } - spin_unlock_irqrestore(&fore200e->atm_dev->lock, flags); - - return vcc; + read_unlock(&vcc_sklist_lock); + + return NULL; } @@ -1357,20 +1361,23 @@ static int fore200e_walk_vccs(struct atm_vcc *vcc, short *vpi, int *vci) { - unsigned long flags; struct atm_vcc* walk; + struct sock *s; /* find a free VPI */ - spin_lock_irqsave(&vcc->dev->lock, flags); + read_lock(&vcc_sklist_lock); if (*vpi == ATM_VPI_ANY) { - for (*vpi = 0, walk = vcc->dev->vccs; walk; walk = walk->next) { + for (*vpi = 0, s = vcc_sklist; s; s = s->next) { + walk = s->protinfo.af_atm; + if (walk->dev != vcc->dev) + continue; if ((walk->vci == *vci) && (walk->vpi == *vpi)) { (*vpi)++; - walk = vcc->dev->vccs; + s = vcc_sklist; } } } @@ -1378,16 +1385,19 @@ /* find a free VCI */ if (*vci == ATM_VCI_ANY) { - for (*vci = ATM_NOT_RSV_VCI, walk = vcc->dev->vccs; walk; walk = walk->next) { + for (*vci = ATM_NOT_RSV_VCI, s = vcc_sklist; s; s = s->next) { + walk = s->protinfo.af_atm; + if (walk->dev != vcc->dev) + continue; if ((walk->vpi = *vpi) && (walk->vci == *vci)) { *vci = walk->vci + 1; - walk = vcc->dev->vccs; + s = vcc_sklist; } } } - spin_unlock_irqrestore(&vcc->dev->lock, flags); + read_unlock(&vcc_sklist_lock); return 0; } @@ -2649,7 +2659,7 @@ static int fore200e_proc_read(struct atm_dev *dev,loff_t* pos,char* page) { - unsigned long flags; + struct sock *s; struct fore200e* fore200e = FORE200E_DEV(dev); int len, left = *pos; @@ -2896,8 +2906,12 @@ len = sprintf(page,"\n" " VCCs:\n address\tVPI.VCI:AAL\t(min/max tx PDU size) (min/max rx PDU size)\n"); - spin_lock_irqsave(&fore200e->atm_dev->lock, flags); - for (vcc = fore200e->atm_dev->vccs; vcc; vcc = vcc->next) { + read_lock(&vcc_sklist_lock); + for (s = vcc_sklist; s; s = s->next) { + vcc = s->protinfo.af_atm; + + if (vcc->dev != fore200e->atm_dev) + continue; fore200e_vcc = FORE200E_VCC(vcc); @@ -2911,7 +2925,7 @@ fore200e_vcc->rx_max_pdu ); } - spin_unlock_irqrestore(&fore200e->atm_dev->lock, flags); + read_unlock(&vcc_sklist_lock); return len; } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/atm/he.c linux-2.4.23-pre8/drivers/atm/he.c --- linux-2.4.22/drivers/atm/he.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/atm/he.c 2003-10-22 22:47:59.000000000 +0000 @@ -89,7 +89,7 @@ /* compatibility */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,69) +#ifndef IRQ_HANDLED typedef void irqreturn_t; #define IRQ_NONE #define IRQ_HANDLED @@ -109,10 +109,6 @@ #define pci_get_drvdata(pci_dev) (pci_dev)->driver_data #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,44) -#define pci_pool_create(a, b, c, d, e) pci_pool_create(a, b, c, d, e, SLAB_KERNEL) -#endif - #include "he.h" #include "suni.h" @@ -327,25 +323,25 @@ he_writel_rcm(dev, val, 0x00000 | (cid << 3) | 7) static __inline__ struct atm_vcc* -he_find_vcc(struct he_dev *he_dev, unsigned cid) +__find_vcc(struct he_dev *he_dev, unsigned cid) { - unsigned long flags; struct atm_vcc *vcc; + struct sock *s; short vpi; int vci; vpi = cid >> he_dev->vcibits; vci = cid & ((1 << he_dev->vcibits) - 1); - spin_lock_irqsave(&he_dev->atm_dev->lock, flags); - for (vcc = he_dev->atm_dev->vccs; vcc; vcc = vcc->next) - if (vcc->vci == vci && vcc->vpi == vpi - && vcc->qos.rxtp.traffic_class != ATM_NONE) { - spin_unlock_irqrestore(&he_dev->atm_dev->lock, flags); - return vcc; - } + for (s = vcc_sklist; s; s = s->next) { + vcc = s->protinfo.af_atm; + if (vcc->vci == vci && vcc->vpi == vpi && + vcc->dev == he_dev->atm_dev && + vcc->qos.rxtp.traffic_class != ATM_NONE) { + return vcc; + } + } - spin_unlock_irqrestore(&he_dev->atm_dev->lock, flags); return NULL; } @@ -785,7 +781,7 @@ /* small buffer pool */ #ifdef USE_RBPS_POOL he_dev->rbps_pool = pci_pool_create("rbps", he_dev->pci_dev, - CONFIG_RBPS_BUFSIZE, 8, 0); + CONFIG_RBPS_BUFSIZE, 8, 0, SLAB_KERNEL); if (he_dev->rbps_pool == NULL) { hprintk("unable to create rbps pages\n"); return -ENOMEM; @@ -849,7 +845,7 @@ /* large buffer pool */ #ifdef USE_RBPL_POOL he_dev->rbpl_pool = pci_pool_create("rbpl", he_dev->pci_dev, - CONFIG_RBPL_BUFSIZE, 8, 0); + CONFIG_RBPL_BUFSIZE, 8, 0, SLAB_KERNEL); if (he_dev->rbpl_pool == NULL) { hprintk("unable to create rbpl pool\n"); return -ENOMEM; @@ -1475,7 +1471,7 @@ #ifdef USE_TPD_POOL he_dev->tpd_pool = pci_pool_create("tpd", he_dev->pci_dev, - sizeof(struct he_tpd), TPD_ALIGNMENT, 0); + sizeof(struct he_tpd), TPD_ALIGNMENT, 0, SLAB_KERNEL); if (he_dev->tpd_pool == NULL) { hprintk("unable to create tpd pci_pool\n"); return -ENOMEM; @@ -1781,6 +1777,7 @@ int pdus_assembled = 0; int updated = 0; + read_lock(&vcc_sklist_lock); while (he_dev->rbrq_head != rbrq_tail) { ++updated; @@ -1807,7 +1804,7 @@ cid = RBRQ_CID(he_dev->rbrq_head); if (cid != lastcid) - vcc = he_find_vcc(he_dev, cid); + vcc = __find_vcc(he_dev, cid); lastcid = cid; if (vcc == NULL) { @@ -1946,6 +1943,7 @@ RBRQ_MASK(++he_dev->rbrq_head)); } + read_unlock(&vcc_sklist_lock); if (updated) { if (updated > he_dev->rbrq_peak) @@ -2870,8 +2868,10 @@ if (!capable(CAP_NET_ADMIN)) return -EPERM; - copy_from_user(®, (struct he_ioctl_reg *) arg, - sizeof(struct he_ioctl_reg)); + if (copy_from_user(®, (struct he_ioctl_reg *) arg, + sizeof(struct he_ioctl_reg))) + return -EFAULT; + spin_lock_irqsave(&he_dev->global_lock, flags); switch (reg.type) { case HE_REGTYPE_PCI: @@ -2895,8 +2895,9 @@ } spin_unlock_irqrestore(&he_dev->global_lock, flags); if (err == 0) - copy_to_user((struct he_ioctl_reg *) arg, ®, - sizeof(struct he_ioctl_reg)); + if (copy_to_user((struct he_ioctl_reg *) arg, ®, + sizeof(struct he_ioctl_reg))) + return -EFAULT; break; default: #ifdef CONFIG_ATM_HE_USE_SUNI diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/atm/idt77252.c linux-2.4.23-pre8/drivers/atm/idt77252.c --- linux-2.4.22/drivers/atm/idt77252.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/atm/idt77252.c 2003-10-22 22:48:54.000000000 +0000 @@ -2404,37 +2404,43 @@ static int idt77252_find_vcc(struct atm_vcc *vcc, short *vpi, int *vci) { - unsigned long flags; + struct sock *s; struct atm_vcc *walk; - spin_lock_irqsave(&vcc->dev->lock, flags); + read_lock(&vcc_sklist_lock); if (*vpi == ATM_VPI_ANY) { *vpi = 0; - walk = vcc->dev->vccs; - while (walk) { + s = vcc_sklist; + while (s) { + walk = s->protinfo.af_atm; + if (walk->dev != vcc->dev) + continue; if ((walk->vci == *vci) && (walk->vpi == *vpi)) { (*vpi)++; - walk = vcc->dev->vccs; + s = vcc_sklist; continue; } - walk = walk->next; + s = s->next; } } if (*vci == ATM_VCI_ANY) { *vci = ATM_NOT_RSV_VCI; - walk = vcc->dev->vccs; - while (walk) { + s = vcc_sklist; + while (s) { + walk = s->protinfo.af_atm; + if (walk->dev != vcc->dev) + continue; if ((walk->vci == *vci) && (walk->vpi == *vpi)) { (*vci)++; - walk = vcc->dev->vccs; + s = vcc_sklist; continue; } - walk = walk->next; + s = s->next; } } - spin_unlock_irqrestore(&vcc->dev->lock, flags); + read_unlock(&vcc_sklist_lock); return 0; } diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/block/Config.in linux-2.4.23-pre8/drivers/block/Config.in --- linux-2.4.22/drivers/block/Config.in 2002-11-28 23:53:12.000000000 +0000 +++ linux-2.4.23-pre8/drivers/block/Config.in 2003-10-22 22:48:15.000000000 +0000 @@ -36,6 +36,7 @@ dep_tristate 'Compaq SMART2 support' CONFIG_BLK_CPQ_DA $CONFIG_PCI dep_tristate 'Compaq Smart Array 5xxx support' CONFIG_BLK_CPQ_CISS_DA $CONFIG_PCI dep_mbool ' SCSI tape drive support for Smart Array 5xxx' CONFIG_CISS_SCSI_TAPE $CONFIG_BLK_CPQ_CISS_DA $CONFIG_SCSI +dep_mbool ' Enable monitor thread' CONFIG_CISS_MONITOR_THREAD $CONFIG_BLK_CPQ_CISS_DA dep_tristate 'Mylex DAC960/DAC1100 PCI RAID Controller support' CONFIG_BLK_DEV_DAC960 $CONFIG_PCI dep_tristate 'Micro Memory MM5415 Battery Backed RAM support (EXPERIMENTAL)' CONFIG_BLK_DEV_UMEM $CONFIG_PCI $CONFIG_EXPERIMENTAL diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/block/cciss.c linux-2.4.23-pre8/drivers/block/cciss.c --- linux-2.4.22/drivers/block/cciss.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/block/cciss.c 2003-10-22 22:49:46.000000000 +0000 @@ -38,19 +38,20 @@ #include #include #include +#include #include #include #include #define CCISS_DRIVER_VERSION(maj,min,submin) ((maj<<16)|(min<<8)|(submin)) -#define DRIVER_NAME "HP CISS Driver (v 2.4.47)" -#define DRIVER_VERSION CCISS_DRIVER_VERSION(2,4,47) +#define DRIVER_NAME "HP CISS Driver (v 2.4.50)" +#define DRIVER_VERSION CCISS_DRIVER_VERSION(2,4,50) /* Embedded module documentation macros - see modules.h */ MODULE_AUTHOR("Hewlett-Packard Company"); -MODULE_DESCRIPTION("Driver for HP SA5xxx SA6xxx Controllers version 2.4.47"); -MODULE_SUPPORTED_DEVICE("HP SA5i SA5i+ SA532 SA5300 SA5312 SA641 SA642 SA6400"); +MODULE_DESCRIPTION("Driver for HP SA5xxx SA6xxx Controllers version 2.4.50"); +MODULE_SUPPORTED_DEVICE("HP SA5i SA5i+ SA532 SA5300 SA5312 SA641 SA642 SA6400 6i"); MODULE_LICENSE("GPL"); #include "cciss_cmd.h" @@ -75,6 +76,8 @@ 0x0E11, 0x409C, 0, 0, 0}, { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_CISSC, 0x0E11, 0x409D, 0, 0, 0}, + { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_CISSC, + 0x0E11, 0x4091, 0, 0, 0}, {0,} }; MODULE_DEVICE_TABLE(pci, cciss_pci_device_id); @@ -94,6 +97,7 @@ { 0x409B0E11, "Smart Array 642", &SA5_access}, { 0x409C0E11, "Smart Array 6400", &SA5_access}, { 0x409D0E11, "Smart Array 6400 EM", &SA5_access}, + { 0x40910E11, "Smart Array 6i", &SA5_access}, }; /* How long to wait (in millesconds) for board to go into simple mode */ @@ -105,12 +109,30 @@ #define READ_AHEAD 128 #define NR_CMDS 128 /* #commands that can be outstanding */ -#define MAX_CTLR 8 +#define MAX_CTLR 32 + +/* No sense in giving up our preallocated major numbers */ +#if MAX_CTLR < 8 +#error"cciss.c: MAX_CTLR must be 8 or greater" +#endif + +/* Originally cciss driver only supports 8 major number */ +#define MAX_CTLR_ORIG COMPAQ_CISS_MAJOR7 - COMPAQ_CISS_MAJOR + 1 #define CCISS_DMA_MASK 0xFFFFFFFFFFFFFFFF /* 64 bit DMA */ -static ctlr_info_t *hba[MAX_CTLR]; +#ifdef CONFIG_CISS_MONITOR_THREAD +static int cciss_monitor(void *ctlr); +static int start_monitor_thread(ctlr_info_t *h, unsigned char *cmd, + unsigned long count, int (*cciss_monitor)(void *), int *rc); +static u32 heartbeat_timer = 0; +#else +#define cciss_monitor(x) +#define kill_monitor_thead(x) +#endif +static ctlr_info_t *hba[MAX_CTLR]; +static int map_major_to_ctlr[MAX_BLKDEV] = {0}; /* gets ctlr num from maj num */ static struct proc_dir_entry *proc_cciss; static void do_cciss_request(request_queue_t *q); @@ -188,7 +210,11 @@ "Current # commands on controller: %d\n" "Max Q depth since init: %d\n" "Max # commands on controller since init: %d\n" - "Max SG entries since init: %d\n\n", + "Max SG entries since init: %d\n" + MONITOR_PERIOD_PATTERN + MONITOR_DEADLINE_PATTERN + MONITOR_STATUS_PATTERN + "\n", h->devname, h->product_name, (unsigned long)h->board_id, @@ -196,7 +222,10 @@ (unsigned int)h->intr, h->num_luns, h->Qdepth, h->commands_outstanding, - h->maxQsinceinit, h->max_outstanding, h->maxSG); + h->maxQsinceinit, h->max_outstanding, h->maxSG, + MONITOR_PERIOD_VALUE(h), + MONITOR_DEADLINE_VALUE(h), + CTLR_STATUS(h)); pos += size; len += size; cciss_proc_tape_report(ctlr, buffer, &pos, &len); @@ -231,10 +260,8 @@ { unsigned char cmd[80]; int len; -#ifdef CONFIG_CISS_SCSI_TAPE ctlr_info_t *h = (ctlr_info_t *) data; int rc; -#endif if (count > sizeof(cmd)-1) return -EINVAL; @@ -244,6 +271,7 @@ len = strlen(cmd); if (cmd[len-1] == '\n') cmd[--len] = '\0'; + # ifdef CONFIG_CISS_SCSI_TAPE if (strcmp("engage scsi", cmd)==0) { rc = cciss_engage_scsi(h->ctlr); @@ -254,6 +282,10 @@ /* might be nice to have "disengage" too, but it's not safely possible. (only 1 module use count, lock issues.) */ # endif + + if (START_MONITOR_THREAD(h, cmd, count, cciss_monitor, &rc) == 0) + return rc; + return -EINVAL; } @@ -400,14 +432,14 @@ */ static int cciss_open(struct inode *inode, struct file *filep) { - int ctlr = MAJOR(inode->i_rdev) - MAJOR_NR; + int ctlr = map_major_to_ctlr[MAJOR(inode->i_rdev)]; int dsk = MINOR(inode->i_rdev) >> NWD_SHIFT; #ifdef CCISS_DEBUG printk(KERN_DEBUG "cciss_open %x (%x:%x)\n", inode->i_rdev, ctlr, dsk); #endif /* CCISS_DEBUG */ - if (ctlr > MAX_CTLR || hba[ctlr] == NULL) + if (ctlr > MAX_CTLR || hba[ctlr] == NULL || !CTLR_IS_ALIVE(hba[ctlr])) return -ENXIO; /* * Root is allowed to open raw volume zero even if its not configured @@ -441,7 +473,7 @@ */ static int cciss_release(struct inode *inode, struct file *filep) { - int ctlr = MAJOR(inode->i_rdev) - MAJOR_NR; + int ctlr = map_major_to_ctlr[MAJOR(inode->i_rdev)]; int dsk = MINOR(inode->i_rdev) >> NWD_SHIFT; #ifdef CCISS_DEBUG @@ -461,7 +493,7 @@ static int cciss_ioctl(struct inode *inode, struct file *filep, unsigned int cmd, unsigned long arg) { - int ctlr = MAJOR(inode->i_rdev) - MAJOR_NR; + int ctlr = map_major_to_ctlr[MAJOR(inode->i_rdev)]; int dsk = MINOR(inode->i_rdev) >> NWD_SHIFT; #ifdef CCISS_DEBUG @@ -1007,7 +1039,7 @@ int i; target = MINOR(dev) >> NWD_SHIFT; - ctlr = MAJOR(dev) - MAJOR_NR; + ctlr = map_major_to_ctlr[MAJOR(dev)]; gdev = &(hba[ctlr]->gendisk); spin_lock_irqsave(&io_request_lock, flags); @@ -1026,12 +1058,12 @@ for(i=max_p-1; i>=0; i--) { int minor = start+i; - invalidate_device(MKDEV(MAJOR_NR + ctlr, minor), 1); + invalidate_device(MKDEV(hba[ctlr]->major, minor), 1); gdev->part[minor].start_sect = 0; gdev->part[minor].nr_sects = 0; /* reset the blocksize so we can read the partition table */ - blksize_size[MAJOR_NR+ctlr][minor] = 1024; + blksize_size[hba[ctlr]->major][minor] = 1024; } /* setup partitions per disk */ grok_partitions(gdev, target, MAX_PART, @@ -1072,7 +1104,7 @@ for (i=max_p-1; i>=0; i--) { int minor = start+i; /* printk("invalidating( %d %d)\n", ctlr, minor); */ - invalidate_device(MKDEV(MAJOR_NR+ctlr, minor), 1); + invalidate_device(MKDEV(hba[ctlr]->major, minor), 1); /* so open will now fail */ h->sizes[minor] = 0; /* so it will no longer appear in /proc/partitions */ @@ -1107,7 +1139,8 @@ size_t size, unsigned int use_unit_num, unsigned int log_unit, - __u8 page_code ) + __u8 page_code, + __u8 cmdtype) { ctlr_info_t *h = hba[ctlr]; CommandList_struct *c; @@ -1131,6 +1164,9 @@ } c->Header.Tag.lower = c->busaddr; /* tag is phys addr of cmd */ /* Fill in Request block */ + c->Request.CDB[0] = cmd; + c->Request.Type.Type = cmdtype; + if (cmdtype == TYPE_CMD) { switch (cmd) { case CISS_INQUIRY: /* If the logical unit number is 0 then, this is going @@ -1150,11 +1186,9 @@ c->Request.CDB[2] = page_code; } c->Request.CDBLen = 6; - c->Request.Type.Type = TYPE_CMD; c->Request.Type.Attribute = ATTR_SIMPLE; c->Request.Type.Direction = XFER_READ; /* Read */ c->Request.Timeout = 0; /* Don't time out */ - c->Request.CDB[0] = CISS_INQUIRY; c->Request.CDB[4] = size & 0xFF; break; case CISS_REPORT_LOG: @@ -1163,11 +1197,9 @@ So we have nothing to write. */ c->Request.CDBLen = 12; - c->Request.Type.Type = TYPE_CMD; c->Request.Type.Attribute = ATTR_SIMPLE; c->Request.Type.Direction = XFER_READ; /* Read */ c->Request.Timeout = 0; /* Don't time out */ - c->Request.CDB[0] = CISS_REPORT_LOG; c->Request.CDB[6] = (size >> 24) & 0xFF; /* MSB */ c->Request.CDB[7] = (size >> 16) & 0xFF; c->Request.CDB[8] = (size >> 8) & 0xFF; @@ -1178,18 +1210,38 @@ hba[ctlr]->drv[log_unit].LunID; c->Header.LUN.LogDev.Mode = 1; c->Request.CDBLen = 10; - c->Request.Type.Type = TYPE_CMD; /* It is a command. */ c->Request.Type.Attribute = ATTR_SIMPLE; c->Request.Type.Direction = XFER_READ; /* Read */ c->Request.Timeout = 0; /* Don't time out */ - c->Request.CDB[0] = CCISS_READ_CAPACITY; break; default: printk(KERN_WARNING "cciss: Unknown Command 0x%x sent attempted\n", cmd); cmd_free(h, c, 1); return IO_ERROR; - }; + } + } else if (cmdtype == TYPE_MSG) { + switch (cmd) { + case 3: /* No-Op message */ + c->Request.CDBLen = 1; + c->Request.Type.Attribute = ATTR_SIMPLE; + c->Request.Type.Direction = XFER_WRITE; + c->Request.Timeout = 0; + c->Request.CDB[0] = cmd; + break; + default: + printk(KERN_WARNING + "cciss%d: unknown message type %d\n", + ctlr, cmd); + cmd_free(h, c, 1); + return IO_ERROR; + } + } else { + printk(KERN_WARNING + "cciss%d: unknown command type %d\n", ctlr, cmdtype); + cmd_free(h, c, 1); + return IO_ERROR; + } /* Fill in the scatter gather information */ if (size > 0) { @@ -1352,7 +1404,7 @@ } return_code = sendcmd_withirq(CISS_REPORT_LOG, ctlr, ld_buff, - sizeof(ReportLunData_struct), 0, 0, 0 ); + sizeof(ReportLunData_struct), 0, 0, 0, TYPE_CMD); if (return_code == IO_OK) { listlength = be32_to_cpu(*((__u32 *) &ld_buff->LUNListLength[0])); @@ -1451,7 +1503,7 @@ memset(size_buff, 0, sizeof(ReadCapdata_struct)); return_code = sendcmd_withirq(CCISS_READ_CAPACITY, ctlr, size_buff, sizeof(ReadCapdata_struct), 1, - logvol, 0 ); + logvol, 0, TYPE_CMD); if (return_code == IO_OK) { total_size = (0xff & (unsigned int) size_buff->total_size[0]) << 24; @@ -1482,7 +1534,7 @@ /* Execute the command to read the disk geometry */ memset(inq_buff, 0, sizeof(InquiryData_struct)); return_code = sendcmd_withirq(CISS_INQUIRY, ctlr, inq_buff, - sizeof(InquiryData_struct), 1, logvol ,0xC1 ); + sizeof(InquiryData_struct), 1, logvol ,0xC1, TYPE_CMD); if (return_code == IO_OK) { if (inq_buff->data_byte[8] == 0xFF) { printk(KERN_WARNING @@ -1540,12 +1592,12 @@ for(i=max_p-1; i>=0; i--) { int minor = start+i; - invalidate_device(MKDEV(MAJOR_NR + ctlr, minor), 1); + invalidate_device(MKDEV(hba[ctlr]->major, minor), 1); gdev->part[minor].start_sect = 0; gdev->part[minor].nr_sects = 0; /* reset the blocksize so we can read the partition table */ - blksize_size[MAJOR_NR+ctlr][minor] = block_size; + blksize_size[hba[ctlr]->major][minor] = block_size; hba[ctlr]->hardsizes[minor] = block_size; } @@ -1590,7 +1642,8 @@ } memset(size_buff, 0, sizeof(ReadCapdata_struct)); return_code = sendcmd_withirq(CCISS_READ_CAPACITY, ctlr, size_buff, - sizeof( ReadCapdata_struct), 1, logvol, 0 ); + sizeof( ReadCapdata_struct), 1, logvol, 0, + TYPE_CMD); if (return_code == IO_OK) { total_size = (0xff & (unsigned int)(size_buff->total_size[0])) << 24; @@ -1619,7 +1672,7 @@ /* Execute the command to read the disk geometry */ memset(inq_buff, 0, sizeof(InquiryData_struct)); return_code = sendcmd_withirq(CISS_INQUIRY, ctlr, inq_buff, - sizeof(InquiryData_struct), 1, logvol ,0xC1 ); + sizeof(InquiryData_struct), 1, logvol ,0xC1, TYPE_CMD); if (return_code == IO_OK) { if (inq_buff->data_byte[8] == 0xFF) { printk(KERN_WARNING "cciss: reading geometry failed, " @@ -1658,12 +1711,12 @@ for (i=max_p-1; i>=0; i--) { int minor = start+i; - invalidate_device(MKDEV(MAJOR_NR + ctlr, minor), 1); + invalidate_device(MKDEV(hba[ctlr]->major, minor), 1); gdev->part[minor].start_sect = 0; gdev->part[minor].nr_sects = 0; /* reset the blocksize so we can read the partition table */ - blksize_size[MAJOR_NR+ctlr][minor] = 1024; + blksize_size[hba[ctlr]->major][minor] = block_size; hba[ctlr]->hardsizes[minor] = block_size; } @@ -2227,7 +2280,7 @@ if (creq->nr_segments > MAXSGENTRIES) BUG(); - if (h->ctlr != MAJOR(creq->rq_dev)-MAJOR_NR ) { + if( h->ctlr != map_major_to_ctlr[MAJOR(creq->rq_dev)] ) { printk(KERN_WARNING "doreq cmd for %d, %x at %p\n", h->ctlr, creq->rq_dev, creq); blkdev_dequeue_request(creq); @@ -2236,6 +2289,15 @@ goto startio; } + /* make sure controller is alive. */ + if (!CTLR_IS_ALIVE(h)) { + printk(KERN_WARNING "cciss%d: I/O quit ", h->ctlr); + blkdev_dequeue_request(creq); + complete_buffers(creq->bh, 0); + end_that_request_last(creq); + return; + } + if (( c = cmd_alloc(h, 1)) == NULL) goto startio; @@ -2385,7 +2447,7 @@ /* * See if we can queue up some more IO */ - do_cciss_request(BLK_DEFAULT_QUEUE(MAJOR_NR + h->ctlr)); + do_cciss_request(BLK_DEFAULT_QUEUE(h->major)); spin_unlock_irqrestore(&io_request_lock, flags); } /* @@ -2823,8 +2885,10 @@ return i; } } - printk(KERN_WARNING "cciss: This driver supports a maximum" - " of 8 controllers.\n"); + printk(KERN_WARNING + "cciss: This driver supports a maximum of %d controllers.\n" + "You can change this value in cciss.c and recompile.\n", + MAX_CTLR); return -1; } @@ -2833,7 +2897,174 @@ kfree(hba[i]); hba[i]=NULL; } +#ifdef CONFIG_CISS_MONITOR_THREAD +static void fail_all_cmds(unsigned long ctlr) +{ + /* If we get here, the board is apparently dead. */ + ctlr_info_t *h = hba[ctlr]; + CommandList_struct *c; + unsigned long flags; + + printk(KERN_WARNING "cciss%d: controller not responding.\n", h->ctlr); + h->alive = 0; /* the controller apparently died... */ + + spin_lock_irqsave(&io_request_lock, flags); + + pci_disable_device(h->pdev); /* Make sure it is really dead. */ + + /* move everything off the request queue onto the completed queue */ + while( (c = h->reqQ) != NULL ) { + removeQ(&(h->reqQ), c); + h->Qdepth--; + addQ (&(h->cmpQ), c); + } + + /* Now, fail everything on the completed queue with a HW error */ + while( (c = h->cmpQ) != NULL ) { + removeQ(&h->cmpQ, c); + c->err_info->CommandStatus = CMD_HARDWARE_ERR; + if (c->cmd_type == CMD_RWREQ) { + complete_command(h, c, 0); + } else if (c->cmd_type == CMD_IOCTL_PEND) + complete(c->waiting); +# ifdef CONFIG_CISS_SCSI_TAPE + else if (c->cmd_type == CMD_SCSI) + complete_scsi_command(c, 0, 0); +# endif + } + spin_unlock_irqrestore(&io_request_lock, flags); + return; +} +static int cciss_monitor(void *ctlr) +{ + /* If the board fails, we ought to detect that. So we periodically + send down a No-Op message and expect it to complete quickly. If it + doesn't, then we assume the board is dead, and fail all commands. + This is useful mostly in a multipath configuration, so that failover + will happen. */ + + int rc; + ctlr_info_t *h = (ctlr_info_t *) ctlr; + unsigned long flags; + u32 current_timer; + + daemonize(); + exit_files(current); + reparent_to_init(); + + printk("cciss%d: Monitor thread starting.\n", h->ctlr); + + /* only listen to signals if the HA was loaded as a module. */ +#define SHUTDOWN_SIGS (sigmask(SIGKILL)|sigmask(SIGINT)|sigmask(SIGTERM)) + siginitsetinv(¤t->blocked, SHUTDOWN_SIGS); + sprintf(current->comm, "ccissmon%d", h->ctlr); + h->monitor_thread = current; + + init_timer(&h->watchdog); + h->watchdog.function = fail_all_cmds; + h->watchdog.data = (unsigned long) h->ctlr; + while (1) { + /* check heartbeat timer */ + current_timer = readl(&h->cfgtable->HeartBeat); + current_timer &= 0x0fffffff; + if (heartbeat_timer == current_timer) { + fail_all_cmds(h->ctlr); + break; + } + else + heartbeat_timer = current_timer; + + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(h->monitor_period * HZ); + h->watchdog.expires = jiffies + HZ * h->monitor_deadline; + add_timer(&h->watchdog); + /* send down a trivial command (no op message) to ctlr */ + rc = sendcmd_withirq(3, h->ctlr, NULL, 0, 0, 0, 0, TYPE_MSG); + del_timer(&h->watchdog); + if (!CTLR_IS_ALIVE(h)) + break; + if (signal_pending(current)) { + printk(KERN_WARNING "%s received signal.\n", + current->comm); + break; + } + if (h->monitor_period == 0) /* zero period means exit thread */ + break; + } + printk(KERN_INFO "%s exiting.\n", current->comm); + spin_lock_irqsave(&io_request_lock, flags); + h->monitor_started = 0; + h->monitor_thread = NULL; + spin_unlock_irqrestore(&io_request_lock, flags); + return 0; +} +static int start_monitor_thread(ctlr_info_t *h, unsigned char *cmd, + unsigned long count, int (*cciss_monitor)(void *), int *rc) +{ + unsigned long flags; + unsigned int new_period, old_period, new_deadline, old_deadline; + + if (strncmp("monitor", cmd, 7) == 0) { + new_period = simple_strtol(cmd + 8, NULL, 10); + spin_lock_irqsave(&io_request_lock, flags); + new_deadline = h->monitor_deadline; + spin_unlock_irqrestore(&io_request_lock, flags); + } else if (strncmp("deadline", cmd, 8) == 0) { + new_deadline = simple_strtol(cmd + 9, NULL, 10); + spin_lock_irqsave(&io_request_lock, flags); + new_period = h->monitor_period; + spin_unlock_irqrestore(&io_request_lock, flags); + } else + return -1; + if (new_period != 0 && new_period < CCISS_MIN_PERIOD) + new_period = CCISS_MIN_PERIOD; + if (new_period > CCISS_MAX_PERIOD) + new_period = CCISS_MAX_PERIOD; + if (new_deadline >= new_period) { + new_deadline = new_period - 5; + printk(KERN_INFO "setting deadline to %d\n", new_deadline); + } + spin_lock_irqsave(&io_request_lock, flags); + if (h->monitor_started != 0) { + old_period = h->monitor_period; + old_deadline = h->monitor_deadline; + h->monitor_period = new_period; + h->monitor_deadline = new_deadline; + spin_unlock_irqrestore(&io_request_lock, flags); + if (new_period == 0) { + printk(KERN_INFO "cciss%d: stopping monitor thread\n", + h->ctlr); + *rc = count; + return 0; + } + if (new_period != old_period) + printk(KERN_INFO "cciss%d: adjusting monitor thread " + "period from %d to %d seconds\n", + h->ctlr, old_period, new_period); + if (new_deadline != old_deadline) + printk(KERN_INFO "cciss%d: adjusting monitor thread " + "deadline from %d to %d seconds\n", + h->ctlr, old_deadline, new_deadline); + *rc = count; + return 0; + } + h->monitor_started = 1; + h->monitor_period = new_period; + h->monitor_deadline = new_deadline; + spin_unlock_irqrestore(&io_request_lock, flags); + kernel_thread(cciss_monitor, h, 0); + *rc = count; + return 0; +} +static void kill_monitor_thread(ctlr_info_t *h) +{ + if (h->monitor_thread) + send_sig(SIGKILL, h->monitor_thread, 1); +} +#else +#define kill_monitor_thread(h) +#endif /* * This is it. Find all the controllers and register them. I really hate * stealing all these major device numbers. @@ -2845,6 +3076,7 @@ request_queue_t *q; int i; int j; + int rc; printk(KERN_DEBUG "cciss: Device 0x%x has been found at" " bus %d dev %d func %d\n", @@ -2860,15 +3092,33 @@ } sprintf(hba[i]->devname, "cciss%d", i); hba[i]->ctlr = i; + + /* register with the major number, or get a dynamic major number */ + /* by passing 0 as argument */ + + if (i < MAX_CTLR_ORIG) + hba[i]->major = MAJOR_NR + i; + hba[i]->pdev = pdev; + ASSERT_CTLR_ALIVE(hba[i]); - if (register_blkdev(MAJOR_NR+i, hba[i]->devname, &cciss_fops)) { + rc = (register_blkdev(hba[i]->major, hba[i]->devname, &cciss_fops)); + if (rc < 0) { printk(KERN_ERR "cciss: Unable to get major number " - "%d for %s\n", MAJOR_NR+i, hba[i]->devname); + "%d for %s\n", hba[i]->major, hba[i]->devname); release_io_mem(hba[i]); free_hba(i); return -1; + } else { + if (i < MAX_CTLR_ORIG) { + hba[i]->major = MAJOR_NR + i; + map_major_to_ctlr[MAJOR_NR + i] = i; + } else { + hba[i]->major = rc; + map_major_to_ctlr[rc] = i; + } } + /* make sure the board interrupts are off */ hba[i]->access.set_intr_mask(hba[i], CCISS_INTR_OFF); if (request_irq(hba[i]->intr, do_cciss_intr, @@ -2877,7 +3127,8 @@ printk(KERN_ERR "cciss: Unable to get irq %d for %s\n", hba[i]->intr, hba[i]->devname); - unregister_blkdev( MAJOR_NR+i, hba[i]->devname); + unregister_blkdev( hba[i]->major, hba[i]->devname); + map_major_to_ctlr[hba[i]->major] = 0; release_io_mem(hba[i]); free_hba(i); return -1; @@ -2906,7 +3157,8 @@ hba[i]->errinfo_pool, hba[i]->errinfo_pool_dhandle); free_irq(hba[i]->intr, hba[i]); - unregister_blkdev(MAJOR_NR+i, hba[i]->devname); + unregister_blkdev(hba[i]->major, hba[i]->devname); + map_major_to_ctlr[hba[i]->major] = 0; release_io_mem(hba[i]); free_hba(i); printk( KERN_ERR "cciss: out of memory"); @@ -2933,16 +3185,16 @@ cciss_procinit(i); - q = BLK_DEFAULT_QUEUE(MAJOR_NR + i); + q = BLK_DEFAULT_QUEUE(hba[i]->major); q->queuedata = hba[i]; blk_init_queue(q, do_cciss_request); blk_queue_bounce_limit(q, hba[i]->pdev->dma_mask); blk_queue_headactive(q, 0); /* fill in the other Kernel structs */ - blksize_size[MAJOR_NR+i] = hba[i]->blocksizes; - hardsect_size[MAJOR_NR+i] = hba[i]->hardsizes; - read_ahead[MAJOR_NR+i] = READ_AHEAD; + blksize_size[hba[i]->major] = hba[i]->blocksizes; + hardsect_size[hba[i]->major] = hba[i]->hardsizes; + read_ahead[hba[i]->major] = READ_AHEAD; /* Set the pointers to queue functions */ q->back_merge_fn = cpq_back_merge_fn; @@ -2951,7 +3203,7 @@ /* Fill in the gendisk data */ - hba[i]->gendisk.major = MAJOR_NR + i; + hba[i]->gendisk.major = hba[i]->major; hba[i]->gendisk.major_name = "cciss"; hba[i]->gendisk.minor_shift = NWD_SHIFT; hba[i]->gendisk.max_p = MAX_PART; @@ -2966,7 +3218,7 @@ cciss_geninit(i); for(j=0; jgendisk), - MKDEV(MAJOR_NR+i, j <<4), + MKDEV(hba[i]->major, j <<4), MAX_PART, &cciss_fops, hba[i]->drv[j].nr_blocks); @@ -2993,20 +3245,24 @@ "already be removed \n"); return; } - /* Turn board interrupts off and send the flush cache command */ - /* sendcmd will turn off interrupt, and send the flush... - * To write all data in the battery backed cache to disks */ + kill_monitor_thread(hba[i]); + /* no sense in trying to flush a dead board's cache. */ + if (CTLR_IS_ALIVE(hba[i])) { + /* Turn board interrupts off and flush the cache */ + /* write all data in the battery backed cache to disks */ memset(flush_buf, 0, 4); - return_code = sendcmd(CCISS_CACHE_FLUSH, i, flush_buf, 4,0,0,0, NULL); - if (return_code != IO_OK) { + return_code = sendcmd(CCISS_CACHE_FLUSH, i, flush_buf, + 4, 0, 0, 0, NULL); + if (return_code != IO_OK) printk(KERN_WARNING - "Error Flushing cache on controller %d\n", i); + "cciss%d: Error flushing cache\n", i); } free_irq(hba[i]->intr, hba[i]); pci_set_drvdata(pdev, NULL); iounmap((void*)hba[i]->vaddr); cciss_unregister_scsi(i); /* unhook from SCSI subsystem */ - unregister_blkdev(MAJOR_NR+i, hba[i]->devname); + unregister_blkdev(hba[i]->major, hba[i]->devname); + map_major_to_ctlr[hba[i]->major] = 0; remove_proc_entry(hba[i]->devname, proc_cciss); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/block/cciss.h linux-2.4.23-pre8/drivers/block/cciss.h --- linux-2.4.22/drivers/block/cciss.h 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/block/cciss.h 2003-10-22 22:47:29.000000000 +0000 @@ -40,6 +40,7 @@ struct ctlr_info { int ctlr; + int major; char devname[8]; char *product_name; char firm_ver[4]; // Firmware version @@ -91,6 +92,40 @@ #ifdef CONFIG_CISS_SCSI_TAPE void *scsi_ctlr; /* ptr to structure containing scsi related stuff */ #endif +#ifdef CONFIG_CISS_MONITOR_THREAD + struct timer_list watchdog; + struct task_struct *monitor_thread; + unsigned int monitor_period; + unsigned int monitor_deadline; + unsigned char alive; + unsigned char monitor_started; +#define CCISS_MIN_PERIOD 10 +#define CCISS_MAX_PERIOD 3600 +#define CTLR_IS_ALIVE(h) (h->alive) +#define ASSERT_CTLR_ALIVE(h) { h->alive = 1; \ + h->monitor_period = 0; \ + h->monitor_started = 0; } +#define MONITOR_STATUS_PATTERN "Status: %s\n" +#define CTLR_STATUS(h) CTLR_IS_ALIVE(h) ? "operational" : "failed" +#define MONITOR_PERIOD_PATTERN "Monitor thread period: %d\n" +#define MONITOR_PERIOD_VALUE(h) (h->monitor_period) +#define MONITOR_DEADLINE_PATTERN "Monitor thread deadline: %d\n" +#define MONITOR_DEADLINE_VALUE(h) (h->monitor_deadline) +#define START_MONITOR_THREAD(h, cmd, count, cciss_monitor, rc) \ + start_monitor_thread(h, cmd, count, cciss_monitor, rc) +#else + +#define MONITOR_PERIOD_PATTERN "%s" +#define MONITOR_PERIOD_VALUE(h) "" +#define MONITOR_DEADLINE_PATTERN "%s" +#define MONITOR_DEADLINE_VALUE(h) "" +#define MONITOR_STATUS_PATTERN "%s\n" +#define CTLR_STATUS(h) "" +#define CTLR_IS_ALIVE(h) (1) +#define ASSERT_CTLR_ALIVE(h) +#define START_MONITOR_THREAD(a,b,c,d,rc) (*rc == 0) + +#endif }; /* Defining the diffent access_menthods */ diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/block/cciss_scsi.c linux-2.4.23-pre8/drivers/block/cciss_scsi.c --- linux-2.4.22/drivers/block/cciss_scsi.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/block/cciss_scsi.c 2003-10-22 22:47:30.000000000 +0000 @@ -71,16 +71,7 @@ #endif #endif -static struct cciss_scsi_hba_t ccissscsi[MAX_CTLR] = { - { name: "cciss0", ndevices: 0 }, - { name: "cciss1", ndevices: 0 }, - { name: "cciss2", ndevices: 0 }, - { name: "cciss3", ndevices: 0 }, - { name: "cciss4", ndevices: 0 }, - { name: "cciss5", ndevices: 0 }, - { name: "cciss6", ndevices: 0 }, - { name: "cciss7", ndevices: 0 }, -}; +static struct cciss_scsi_hba_t ccissscsi[MAX_CTLR]; /* We need one Scsi_Host_Template *per controller* instead of the usual one Scsi_Host_Template per controller *type*. This @@ -92,11 +83,7 @@ (that's called from cciss.c:cciss_init_one()) */ static -Scsi_Host_Template driver_template[MAX_CTLR] = -{ - CCISS_SCSI, CCISS_SCSI, CCISS_SCSI, CCISS_SCSI, - CCISS_SCSI, CCISS_SCSI, CCISS_SCSI, CCISS_SCSI, -}; +Scsi_Host_Template driver_template[MAX_CTLR]; #pragma pack(1) struct cciss_scsi_cmd_stack_elem_t { @@ -803,13 +790,7 @@ sh->this_id = SELF_SCSI_ID; - /* This is a bit kludgey, using the adapter name to figure out */ - /* which scsi host template we've got, won't scale beyond 9 ctlrs. */ - i = tpnt->name[5] - '0'; - -# if MAX_CTLR > 9 -# error "cciss_scsi.c: MAX_CTLR > 9, code maintenance needed." -# endif + i = simple_strtol((char *)&tpnt->name[5], NULL, 10); if (i<0 || i>=MAX_CTLR || hba[i] == NULL) { /* we didn't find ourself... we shouldn't get here. */ @@ -1528,9 +1509,10 @@ unsigned long flags; CPQ_TAPE_LOCK(ctlr, flags); - driver_template[ctlr].name = ccissscsi[ctlr].name; - driver_template[ctlr].proc_name = ccissscsi[ctlr].name; - driver_template[ctlr].module = THIS_MODULE;; + + sprintf( ccissscsi[ctlr].name, "cciss%d", ctlr ); + + init_driver_template(ctlr); /* Since this is really a block driver, the SCSI core may not be initialized yet, in which case, calling scsi_register_module diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/block/cciss_scsi.h linux-2.4.23-pre8/drivers/block/cciss_scsi.h --- linux-2.4.22/drivers/block/cciss_scsi.h 2003-06-13 14:51:32.000000000 +0000 +++ linux-2.4.23-pre8/drivers/block/cciss_scsi.h 2003-10-22 22:47:39.000000000 +0000 @@ -89,7 +89,7 @@ }; struct cciss_scsi_hba_t { - char *name; + char name[32]; int ndevices; #define CCISS_MAX_SCSI_DEVS_PER_HBA 16 struct cciss_scsi_dev_t dev[CCISS_MAX_SCSI_DEVS_PER_HBA]; diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/block/ll_rw_blk.c linux-2.4.23-pre8/drivers/block/ll_rw_blk.c --- linux-2.4.22/drivers/block/ll_rw_blk.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/block/ll_rw_blk.c 2003-10-22 22:47:43.000000000 +0000 @@ -121,6 +121,10 @@ unsigned long blk_max_low_pfn, blk_max_pfn; int blk_nohighio = 0; +int block_dump = 0; + +static struct timer_list writeback_timer; + static inline int get_max_sectors(kdev_t dev) { if (!max_sectors[MAJOR(dev)]) @@ -1293,6 +1297,9 @@ if (waitqueue_active(&bh->b_wait)) wake_up(&bh->b_wait); + if (block_dump) + printk(KERN_DEBUG "%s: %s block %lu/%u on %s\n", current->comm, rw == WRITE ? "WRITE" : "READ", bh->b_rsector, count, kdevname(bh->b_rdev)); + put_bh(bh); switch (rw) { case WRITE: @@ -1413,6 +1420,11 @@ extern int stram_device_init (void); #endif +static void blk_writeback_timer(unsigned long data) +{ + wakeup_bdflush(); + wakeup_kupdate(); +} /** * end_that_request_first - end I/O on one buffer. @@ -1469,10 +1481,18 @@ return 0; } +extern int laptop_mode; + void end_that_request_last(struct request *req) { struct completion *waiting = req->waiting; + /* + * schedule the writeout of pending dirty data when the disk is idle + */ + if (laptop_mode && req->cmd == READ) + mod_timer(&writeback_timer, jiffies + 5 * HZ); + req_finished_io(req); blkdev_release_request(req); if (waiting) @@ -1500,6 +1520,9 @@ blk_max_low_pfn = max_low_pfn - 1; blk_max_pfn = max_pfn - 1; + init_timer(&writeback_timer); + writeback_timer.function = blk_writeback_timer; + #ifdef CONFIG_AMIGA_Z2RAM z2_init(); #endif diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/block/umem.c linux-2.4.23-pre8/drivers/block/umem.c --- linux-2.4.22/drivers/block/umem.c 2003-06-13 14:51:32.000000000 +0000 +++ linux-2.4.23-pre8/drivers/block/umem.c 2003-10-22 22:49:11.000000000 +0000 @@ -1307,7 +1307,7 @@ release_mem_region(card->mem_base, card->mem_len); failed_req_mem: #endif - iounmap((void *) card->csr_base); + iounmap((void *) card->csr_remap); failed_remap_csr: release_mem_region(card->csr_base, card->csr_len); failed_req_csr: diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/bluetooth/Makefile.lib linux-2.4.23-pre8/drivers/bluetooth/Makefile.lib --- linux-2.4.22/drivers/bluetooth/Makefile.lib 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.4.23-pre8/drivers/bluetooth/Makefile.lib 2003-10-22 22:48:56.000000000 +0000 @@ -0,0 +1 @@ +obj-$(CONFIG_BLUEZ_HCIBFUSB) += firmware_class.o diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/bluetooth/bfusb.c linux-2.4.23-pre8/drivers/bluetooth/bfusb.c --- linux-2.4.22/drivers/bluetooth/bfusb.c 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/bluetooth/bfusb.c 2003-10-22 22:47:41.000000000 +0000 @@ -32,21 +32,18 @@ #include #include +#include #include #include #include -#include "bfusb.h" - #ifndef CONFIG_BLUEZ_HCIBFUSB_DEBUG #undef BT_DBG #define BT_DBG(D...) #endif -#define VERSION "1.0" - -static struct usb_driver bfusb_driver; +#define VERSION "1.1" static struct usb_device_id bfusb_table[] = { /* AVM BlueFRITZ! USB */ @@ -576,12 +573,12 @@ } -static int bfusb_load_firmware(struct bfusb *bfusb) +static int bfusb_load_firmware(struct bfusb *bfusb, unsigned char *firmware, int count) { - unsigned char *buf, *ptr; - int err, pipe, len, count, size, sent = 0; + unsigned char *buf; + int err, pipe, len, size, sent = 0; - BT_DBG("bfusb %p udev %p", bfusb, bfusb->udev); + BT_DBG("bfusb %p udev %p firmware %p count %d", bfusb, bfusb->udev, firmware, count); BT_INFO("BlueFRITZ! USB loading firmware"); @@ -596,15 +593,12 @@ return -ENOMEM; } - count = BFUSB_FIRMWARE_SIZE; - ptr = &bfusb_firmware[0]; - pipe = usb_sndbulkpipe(bfusb->udev, bfusb->bulk_out_ep); while (count) { size = min_t(uint, count, BFUSB_MAX_BLOCK_SIZE + 3); - memcpy(buf, ptr + sent, size); + memcpy(buf, firmware + sent, size); err = usb_bulk_msg(bfusb->udev, pipe, buf, size, &len, BFUSB_BLOCK_TIMEOUT); @@ -647,6 +641,8 @@ static void *bfusb_probe(struct usb_device *udev, unsigned int ifnum, const struct usb_device_id *id) { + const struct firmware *firmware; + char device[16]; struct usb_interface *iface; struct usb_interface_descriptor *iface_desc; struct usb_endpoint_descriptor *bulk_out_ep; @@ -692,11 +688,20 @@ skb_queue_head_init(&bfusb->pending_q); skb_queue_head_init(&bfusb->completed_q); - if (bfusb_load_firmware(bfusb) < 0) { - BT_ERR("Firmware loading failed"); + snprintf(device, sizeof(device), "bfusb%3.3d%3.3d", udev->bus->busnum, udev->devnum); + + if (request_firmware(&firmware, "bfubase.frm", device) < 0) { + BT_ERR("Firmware request failed"); goto error; } + if (bfusb_load_firmware(bfusb, firmware->data, firmware->size) < 0) { + BT_ERR("Firmware loading failed"); + goto release; + } + + release_firmware(firmware); + /* Initialize and register HCI device */ hdev = &bfusb->hdev; @@ -717,6 +722,9 @@ return bfusb; +release: + release_firmware(firmware); + error: kfree(bfusb); diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.22/drivers/bluetooth/bfusb.h linux-2.4.23-pre8/drivers/bluetooth/bfusb.h --- linux-2.4.22/drivers/bluetooth/bfusb.h 2003-08-25 11:44:41.000000000 +0000 +++ linux-2.4.23-pre8/drivers/bluetooth/bfusb.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,52261 +0,0 @@ -/* - * - * AVM BlueFRITZ! USB firmware - * - * Version 03.17.46 - * - * Copyright (C) 2002-2003 AVM GmbH. All rights reserved. - * - * - * You may only use and redistribute this Software in binary form provided - * that the following conditions are met: - * - * Redistribution of this Software in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the distribution. - * The name of AVM may not be used to endorse or promote products derived - * from this Software without specific prior written permission by AVM. - * - * Disclaimer/Limitation of Liablity - * This Software has been produced with due care and checked for correctness - * in accordance with available technology. The information in this Software - * is subject to change without notice for the purpose of technical - * improvement. You bear all risk with regard to hazards and impairments of - * quality which may arise in connection with the use of this Software. - * - * THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY - * APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT - * HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT - * WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE - * OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU - * ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - * - * IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING - * WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR - * REDISTRIBUTE THE SOFTWARE AS PERMITTED ABOVE, BE LIABLE TO YOU FOR - * DAMAGES, INCLUDING ANY DIRECT, INDIRECT, GENERAL, SPECIAL, EXEMPLARY, - * INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY - * TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, BUSINESS INTERRUPTION, - * PROFITS, DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY - * YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY - * OTHER SOFTWARE), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGES. YOU ACKNOWLEDGE AND AGREE THAT PURCHASE OR USE OF THIS SOFTWARE - * WILL NOT CREATE OR GIVE GROUNDS FOR A LICENSE BY IMPLICATION, ESTOPPEL, - * OR OTHERWISE IN ANY INTELLECTUAL PROPERTY RIGHTS (PATENT, COPYRIGHT, - * TRADE SECRET, MASK WORK, OR OTHER PROPRIETARY RIGHT) EMBODIED IN ANY - * OTHER AVM HARDWARE OR SOFTWARE EITHER SOLELY OR IN COMBINATION WITH THIS - * SOFTWARE. - * - */ - -#define BFUSB_FIRMWARE_SIZE 417605 - -static unsigned char bfusb_firmware[] = { - 0xed, 0x09, 0x00, 0x00, 0x00, 0x71, 0x56, 0xaf, - 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x48, 0x8c, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x01, 0x00, 0x01, 0x00, 0xff, 0x21, 0x46, - 0x22, 0x0f, 0xff, 0xff, 0xff, 0xaa, 0x99, 0x55, - 0x66, 0x30, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, - 0x07, 0x30, 0x01, 0x60, 0x01, 0x00, 0x00, 0x00, - 0x11, 0x30, 0x01, 0x20, 0x01, 0x00, 0x80, 0x3f, - 0x2d, 0x30, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x01, - 0xc6, 0x30, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, - 0x09, 0x30, 0x00, 0x20, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x30, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, - 0x01, 0x30, 0x00, 0x40, 0x00, 0x50, 0x00, 0x99, - 0xc6, 0x00, 0x12, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x40, 0x04, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x12, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x40, 0x04, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xed, 0x09, 0x00, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xed, 0x09, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x90, 0x00, - 0x00, 0x00, 0x00, 0xff, 0x10, 0x00, 0x68, 0x00, - 0x1e, 0x00, 0x07, 0x80, 0x01, 0xe0, 0x00, 0x78, - 0x00, 0x1e, 0x00, 0x07, 0x80, 0x01, 0xe0, 0x00, - 0x78, 0x00, 0x1e, 0x00, 0x07, 0xe0, 0x01, 0xe8, - 0x00, 0x78, 0x00, 0x1e, 0x80, 0x07, 0xa0, 0x01, - 0xa8, 0x00, 0x7a, 0x00, 0x1a, 0x80, 0x06, 0x80, - 0x01, 0xa0, 0x00, 0x6a, 0x00, 0x18, 0x80, 0x07, - 0xa0, 0x01, 0x88, 0x00, 0x60, 0x00, 0x18, 0x00, - 0x06, 0x00, 0x01, 0x80, 0x3f, 0xc4, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0x05, 0xfc, 0x00, 0xff, - 0x00, 0x3f, 0xc0, 0x0f, 0xf0, 0x03, 0xfc, 0x00, - 0xff, 0x21, 0x37, 0xc0, 0x0b, 0xf0, 0x03, 0x3d, - 0x00, 0xcf, 0x00, 0xb3, 0xd1, 0x0f, 0xc1, 0x03, - 0xf4, 0x00, 0x4d, 0x00, 0x3b, 0xc8, 0x0f, 0xf2, - 0x03, 0x7c, 0x00, 0xff, 0x00, 0x37, 0x00, 0x8f, - 0xc0, 0x43, 0x14, 0x00, 0xef, 0x01, 0x3f, 0xcc, - 0x0f, 0xd0, 0x03, 0xf4, 0x00, 0xc7, 0x20, 0x33, - 0xc4, 0x0f, 0xf0, 0x03, 0xf0, 0x00, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x10, 0xec, 0x00, 0xbb, - 0x00, 0x2e, 0xc0, 0x0b, 0xb0, 0x02, 0xec, 0x0c, - 0xbf, 0xed, 0x09, 0x00, 0x03, 0x00, 0x10, 0x23, - 0xc4, 0x0b, 0xf5, 0x06, 0x0c, 0x00, 0x8f, 0x40, - 0x32, 0xc0, 0x0b, 0x90, 0x03, 0xa4, 0x00, 0x88, - 0x00, 0x22, 0xd0, 0x0e, 0xa4, 0x02, 0xe9, 0x40, - 0xba, 0x50, 0x3a, 0xc0, 0x0b, 0x82, 0x02, 0x24, - 0x00, 0xa7, 0x50, 0x2e, 0xc0, 0x0b, 0x97, 0x82, - 0xe1, 0xe0, 0x8b, 0x40, 0x36, 0xc8, 0x0b, 0xb0, - 0x02, 0xe0, 0x04, 0x30, 0x00, 0x00, 0x00, 0x00, - 0x88, 0x05, 0xcc, 0x00, 0xb3, 0x00, 0x2c, 0xc0, - 0x0b, 0x30, 0x02, 0xcc, 0x00, 0xb3, 0x00, 0x2c, - 0xc0, 0x09, 0x30, 0x02, 0x8c, 0x80, 0x83, 0x40, - 0x20, 0xc8, 0x0b, 0x00, 0x02, 0xe4, 0x00, 0x83, - 0x00, 0x28, 0xc4, 0x0b, 0x11, 0x02, 0x84, 0x14, - 0xb1, 0x00, 0x24, 0xc0, 0x0b, 0x80, 0x8e, 0x04, - 0x00, 0x83, 0x01, 0x24, 0xcc, 0x8b, 0x10, 0x12, - 0xc4, 0x00, 0x83, 0x10, 0x20, 0xc0, 0x0b, 0x30, - 0x02, 0xe2, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, - 0xc0, 0x15, 0xac, 0x00, 0xbb, 0x00, 0x2e, 0xc0, - 0x0b, 0xb0, 0x02, 0xec, 0x00, 0xbb, 0x00, 0x2a, - 0xc0, 0x0b, 0xb0, 0x02, 0xac, 0x00, 0x8b, 0x00, - 0x26, 0xc0, 0x0b, 0x90, 0x02, 0xa4, 0x24, 0x8b, - 0x18, 0x22, 0xc0, 0x0b, 0xb0, 0x02, 0xec, 0x00, - 0xbb, 0x00, 0x2a, 0xe0, 0x0b, 0x90, 0x02, 0x24, - 0x00, 0xab, 0x02, 0x2e, 0xc0, 0x0b, 0x98, 0x02, - 0xe2, 0x00, 0x8b, 0x00, 0x26, 0xc0, 0x0b, 0xb0, - 0x02, 0xf0, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, - 0x40, 0x15, 0xec, 0x00, 0xfb, 0x00, 0x3e, 0xc0, - 0x0f, 0xb0, 0x03, 0xec, 0x00, 0xf3, 0x01, 0x3e, - 0xc1, 0x0d, 0xb0, 0x02, 0xac, 0x00, 0xcb, 0x00, - 0x32, 0xc0, 0x0f, 0x90, 0x03, 0xc9, 0x00, 0xc9, - 0x40, 0x3a, 0x80, 0x5f, 0xb0, 0x43, 0xec, 0x00, - 0xfb, 0x00, 0x36, 0x70, 0x0f, 0x88, 0x03, 0x21, - 0x80, 0x4b, 0x00, 0x3e, 0xed, 0x09, 0x00, 0x04, - 0x00, 0xc0, 0x0f, 0x8e, 0x03, 0xe6, 0x02, 0xcb, - 0x00, 0x32, 0xc0, 0x0f, 0xb0, 0x03, 0xd0, 0x04, - 0x70, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0xbc, - 0x00, 0xff, 0x00, 0x3f, 0xc0, 0x0f, 0xf0, 0x03, - 0xfc, 0x04, 0xff, 0x00, 0x37, 0xc0, 0x0f, 0xf0, - 0x03, 0x7c, 0x00, 0xff, 0x02, 0x3b, 0xc0, 0x4f, - 0xd0, 0x23, 0xbe, 0x40, 0xfc, 0x04, 0x3f, 0xa4, - 0x0e, 0xa0, 0x03, 0xf8, 0x00, 0xfe, 0x00, 0x3b, - 0xc0, 0x8f, 0xc2, 0x03, 0xf0, 0x00, 0xff, 0x00, - 0x3e, 0xc0, 0x0f, 0xc0, 0x23, 0xf4, 0x00, 0xf7, - 0x00, 0x3f, 0xc0, 0x0f, 0xf0, 0x03, 0xf8, 0x00, - 0x60, 0x00, 0x00, 0x00, 0x00, 0x40, 0x10, 0xac, - 0x00, 0xfb, 0x00, 0x3e, 0xc0, 0x0f, 0xb0, 0x03, - 0xec, 0x00, 0xfb, 0x20, 0x3e, 0xc0, 0x0f, 0x30, - 0x03, 0x2c, 0x00, 0xeb, 0x80, 0x3e, 0xc0, 0x8f, - 0xb0, 0x03, 0xa9, 0x20, 0xfb, 0xc0, 0x32, 0xc0, - 0x0f, 0x90, 0x03, 0x64, 0x02, 0xc9, 0x00, 0x3e, - 0x82, 0x0f, 0xb0, 0x43, 0xe8, 0x00, 0xeb, 0x00, - 0x32, 0xc0, 0x2c, 0x94, 0x03, 0xe4, 0x80, 0xfb, - 0x08, 0x32, 0xc2, 0x0c, 0xb0, 0x03, 0xd0, 0x04, - 0x20, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x05, 0x2c, - 0x00, 0xbb, 0x00, 0x2e, 0xc0, 0x0b, 0xb0, 0x02, - 0xec, 0x00, 0xbf, 0x60, 0x2f, 0xc0, 0x8b, 0xf8, - 0x02, 0x2c, 0x00, 0x87, 0x00, 0x0f, 0xc0, 0x0b, - 0x90, 0x02, 0xae, 0x00, 0xbb, 0x80, 0x22, 0xc0, - 0x0e, 0xb0, 0x82, 0x2e, 0x00, 0x8b, 0x00, 0x06, - 0xc0, 0x4b, 0x30, 0x02, 0xc8, 0x00, 0x0f, 0x00, - 0x23, 0xc0, 0x48, 0x98, 0x02, 0xe7, 0x80, 0xbf, - 0x80, 0x36, 0xf2, 0x0a, 0xb0, 0x02, 0xf2, 0x00, - 0x40, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x05, 0x4c, - 0x00, 0xb3, 0x00, 0x2c, 0xc0, 0x0b, 0x30, 0x02, - 0xcc, 0x00, 0xb3, 0x80, 0x2c, 0xc0, 0x0b, 0xed, - 0x09, 0x00, 0x05, 0x00, 0x38, 0x00, 0x2c, 0x04, - 0x83, 0x00, 0x0c, 0xc0, 0x03, 0x00, 0x02, 0xce, - 0x00, 0xb8, 0x00, 0x20, 0x41, 0x0a, 0x38, 0x02, - 0x4c, 0x00, 0xa3, 0x00, 0x2c, 0xc0, 0x1b, 0x00, - 0x42, 0xc4, 0x00, 0xa3, 0x00, 0xa0, 0xc0, 0x08, - 0x00, 0x82, 0xe3, 0x04, 0xb3, 0x80, 0x20, 0xc0, - 0x08, 0x30, 0x02, 0xf8, 0x00, 0x50, 0x00, 0x00, - 0x00, 0x00, 0x20, 0x01, 0x1e, 0x00, 0xb7, 0x80, - 0x2d, 0xe0, 0x0b, 0x78, 0x02, 0xde, 0x00, 0xb7, - 0x81, 0x2d, 0xe0, 0x0b, 0x78, 0x82, 0x1e, 0x00, - 0x87, 0x80, 0x2d, 0xe0, 0x0b, 0x58, 0x02, 0xde, - 0x00, 0x34, 0xc0, 0x21, 0xe0, 0x0a, 0x68, 0x00, - 0x0a, 0x20, 0xa6, 0x80, 0x25, 0xa0, 0x0b, 0x48, - 0x00, 0xf6, 0x00, 0xa7, 0xe1, 0x21, 0xe0, 0x08, - 0x79, 0x02, 0xda, 0x00, 0xb7, 0x88, 0x25, 0xe0, - 0x0a, 0x78, 0x02, 0xc8, 0x00, 0x40, 0x00, 0x00, - 0x00, 0x00, 0x48, 0x08, 0x0c, 0x00, 0xf3, 0x00, - 0x3c, 0xc0, 0x0f, 0x30, 0x03, 0xcc, 0x00, 0xf3, - 0x00, 0x3c, 0xc0, 0x0f, 0x30, 0x03, 0x0c, 0x00, - 0xa3, 0x00, 0x3c, 0xc0, 0x0f, 0x80, 0x03, 0xcc, - 0xe0, 0xfa, 0x00, 0x30, 0x40, 0x0e, 0x10, 0x03, - 0x44, 0x00, 0xe1, 0x00, 0x3c, 0xd0, 0x0f, 0x22, - 0x02, 0xc4, 0x20, 0xe3, 0x00, 0x30, 0xc4, 0x0c, - 0x20, 0x83, 0xcc, 0x40, 0xf3, 0x20, 0x32, 0xc0, - 0x0c, 0x30, 0x43, 0xd2, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x40, 0x1d, 0xbc, 0x00, 0xff, 0x00, - 0x3f, 0xc0, 0x0f, 0xf0, 0x03, 0xfc, 0x00, 0xff, - 0x00, 0x3f, 0xd4, 0x0b, 0x74, 0x03, 0xfc, 0x40, - 0xff, 0x00, 0x3f, 0xc0, 0x0f, 0xd1, 0x03, 0xbc, - 0x48, 0xfc, 0x10, 0x3f, 0xc0, 0x0e, 0xf0, 0x03, - 0xfc, 0x00, 0xdf, 0x02, 0x37, 0xc4, 0x0f, 0xf0, - 0x03, 0xf4, 0x00, 0xdf, 0x22, 0xbf, 0xc0, 0x0f, - 0xf0, 0x43, 0xed, 0x09, 0x00, 0x06, 0x00, 0xf8, - 0x00, 0xff, 0x08, 0x3f, 0xc0, 0x0d, 0xf0, 0x03, - 0xd0, 0x06, 0x60, 0x00, 0x00, 0x00, 0x00, 0xa8, - 0x05, 0xec, 0x00, 0xfb, 0x00, 0x3e, 0xc0, 0x0f, - 0xb0, 0x03, 0xec, 0x00, 0xfb, 0xc8, 0x32, 0xc1, - 0x8f, 0xb3, 0x01, 0xec, 0x00, 0xdb, 0x60, 0x3e, - 0xe0, 0x0c, 0x90, 0x03, 0xe8, 0x00, 0xf9, 0x80, - 0x32, 0x00, 0x0f, 0xb0, 0x03, 0x2c, 0x01, 0xfb, - 0x80, 0x72, 0xc0, 0x0c, 0x80, 0x03, 0xc6, 0x00, - 0x6b, 0x24, 0x22, 0xc5, 0x0f, 0xa8, 0x03, 0x28, - 0x00, 0xfb, 0x00, 0x3e, 0xc0, 0x0f, 0xb0, 0x03, - 0xea, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x48, - 0x11, 0x9c, 0x00, 0xb7, 0x00, 0x2d, 0xc0, 0x0b, - 0x70, 0x02, 0xdc, 0x00, 0xb3, 0x60, 0xa1, 0xd8, - 0x0b, 0x70, 0x02, 0xdc, 0x00, 0xe7, 0x14, 0x2f, - 0xc8, 0x08, 0x50, 0x02, 0xdc, 0x00, 0xbd, 0x00, - 0x21, 0x80, 0x0b, 0x60, 0x02, 0x18, 0x00, 0xb6, - 0x00, 0x23, 0xc0, 0x0d, 0x40, 0x03, 0xd4, 0x04, - 0xf3, 0x68, 0x35, 0xc0, 0x0b, 0xf0, 0x43, 0x5c, - 0x00, 0xb7, 0x20, 0x2d, 0xc0, 0x0b, 0x70, 0x02, - 0xd2, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0xc0, - 0x00, 0x9e, 0x00, 0xb7, 0x80, 0x2d, 0xe0, 0x0b, - 0x78, 0x02, 0xde, 0x00, 0xb7, 0x80, 0x21, 0xe0, - 0x0b, 0x7a, 0x02, 0xde, 0x00, 0x97, 0x90, 0x2d, - 0xe4, 0x28, 0x78, 0x02, 0xdf, 0x00, 0xb7, 0xc0, - 0x61, 0x60, 0x0b, 0x18, 0x02, 0x16, 0x00, 0xb1, - 0x84, 0x21, 0xc0, 0x09, 0x78, 0x02, 0xfe, 0x00, - 0x97, 0xa0, 0x25, 0xe8, 0x0b, 0x68, 0x02, 0x1e, - 0x00, 0xb7, 0xa0, 0x2d, 0xe0, 0x0b, 0x78, 0x02, - 0xf0, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x48, - 0x14, 0xcc, 0x00, 0xb3, 0x00, 0x2c, 0xc0, 0x0b, - 0x30, 0x02, 0xcc, 0x00, 0xb3, 0x00, 0x20, 0xc0, - 0x0b, 0x30, 0x02, 0xcc, 0x00, 0xed, 0x09, 0x00, - 0x07, 0x00, 0xb3, 0x00, 0x2c, 0xc0, 0x08, 0x10, - 0x02, 0xce, 0x00, 0xb3, 0x00, 0x20, 0xc0, 0x0b, - 0x30, 0x0a, 0x0c, 0x00, 0xb3, 0x01, 0xa0, 0x92, - 0x09, 0xb9, 0x82, 0x8e, 0x00, 0xb3, 0x00, 0x24, - 0xc0, 0x8b, 0x39, 0x02, 0x4c, 0x00, 0xb3, 0x00, - 0x2c, 0xc0, 0x8b, 0x30, 0x02, 0xd2, 0x04, 0x30, - 0x00, 0x00, 0x00, 0x00, 0xe8, 0x15, 0xa8, 0x00, - 0xfa, 0x00, 0x3e, 0x80, 0x0f, 0xa0, 0x03, 0xe8, - 0x00, 0xfa, 0x02, 0x32, 0x80, 0x0b, 0xa0, 0x23, - 0xe8, 0x00, 0xda, 0x00, 0x3e, 0x80, 0x0c, 0xec, - 0x13, 0xdb, 0x00, 0xfe, 0xc3, 0xb3, 0x80, 0x0f, - 0xe0, 0x03, 0x38, 0x00, 0xfe, 0x00, 0x73, 0x80, - 0x0d, 0xec, 0x02, 0xfb, 0x28, 0xda, 0x00, 0xb6, - 0x80, 0x0f, 0xe0, 0x03, 0x39, 0x10, 0xfa, 0x00, - 0x3e, 0x80, 0x0f, 0xa0, 0x03, 0xfa, 0x04, 0x60, - 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0xe0, 0x00, - 0xf8, 0x00, 0x3e, 0x00, 0x0f, 0x80, 0x03, 0xe0, - 0x00, 0xf8, 0x00, 0x3e, 0x00, 0x0f, 0x80, 0x02, - 0xe0, 0x00, 0xe8, 0x00, 0x3e, 0x00, 0x0f, 0x89, - 0x03, 0xe2, 0x00, 0xf8, 0xc0, 0x3e, 0x10, 0x07, - 0x00, 0x03, 0xe0, 0x00, 0xf8, 0x00, 0x3e, 0x10, - 0x0f, 0x80, 0x01, 0xe2, 0x00, 0xf8, 0x40, 0x3e, - 0x00, 0x0f, 0x82, 0x03, 0xe1, 0x65, 0xf8, 0x00, - 0x3e, 0x10, 0x0f, 0x80, 0x03, 0xd2, 0x00, 0x30, - 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0xe4, 0x00, - 0xf9, 0x00, 0x3e, 0x40, 0x0f, 0x90, 0x03, 0xe4, - 0x00, 0xf9, 0x80, 0x3c, 0x40, 0x8c, 0x10, 0x0b, - 0x24, 0x00, 0xf9, 0x00, 0x3e, 0x40, 0x0f, 0x90, - 0x02, 0x64, 0x00, 0xc9, 0x00, 0x3c, 0x42, 0x2c, - 0x90, 0x03, 0x44, 0x00, 0xd9, 0x40, 0x3c, 0x44, - 0x0d, 0x90, 0x03, 0x24, 0x00, 0xf1, 0x02, 0x32, - 0x40, 0x0f, 0x98, 0x03, 0xe4, 0x00, 0xf1, 0x00, - 0xed, 0x09, 0x00, 0x08, 0x00, 0x32, 0x40, 0x0f, - 0x90, 0x03, 0xc2, 0x04, 0x30, 0x00, 0x00, 0x00, - 0x00, 0x80, 0x04, 0x64, 0x00, 0xb9, 0x00, 0x2e, - 0x40, 0x0b, 0x90, 0x02, 0xe4, 0x00, 0xb9, 0x01, - 0x2e, 0x40, 0x08, 0x90, 0x02, 0x24, 0x00, 0xb9, - 0x00, 0x2e, 0x40, 0x0b, 0x10, 0x02, 0x25, 0x00, - 0x89, 0x40, 0x2e, 0x50, 0x08, 0x94, 0x02, 0x24, - 0x00, 0x89, 0xc0, 0x26, 0x50, 0x08, 0x90, 0x02, - 0x24, 0x00, 0xb9, 0x00, 0x2a, 0x40, 0x0b, 0x94, - 0x42, 0xe7, 0x20, 0xb9, 0x00, 0x2a, 0x48, 0x0b, - 0x90, 0x02, 0xe0, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x00, 0x18, 0x05, 0x24, 0x00, 0xb9, 0x00, 0x2e, - 0x40, 0x0b, 0x90, 0x02, 0xe4, 0x00, 0xb9, 0x10, - 0x2e, 0x40, 0x08, 0x91, 0x02, 0x24, 0x00, 0xb9, - 0x80, 0x2e, 0x40, 0x0b, 0x90, 0x02, 0xe6, 0x00, - 0x89, 0x88, 0x2e, 0x40, 0x09, 0x90, 0x82, 0x64, - 0x02, 0x99, 0x08, 0x2a, 0x42, 0x09, 0x90, 0x0a, - 0x24, 0x00, 0xb9, 0x08, 0x22, 0x40, 0x0b, 0x92, - 0x82, 0xec, 0x84, 0xb9, 0x02, 0x22, 0x40, 0x0b, - 0x90, 0x02, 0xc6, 0x00, 0x40, 0x00, 0x00, 0x00, - 0x00, 0x08, 0x04, 0x04, 0x00, 0xb1, 0x00, 0x2c, - 0x40, 0x0b, 0x10, 0x02, 0xc4, 0x00, 0xb1, 0x29, - 0x2c, 0x40, 0x08, 0x12, 0x82, 0x04, 0x00, 0xb1, - 0x28, 0x2c, 0x59, 0x0b, 0x90, 0x02, 0xa7, 0x00, - 0x81, 0x40, 0x2c, 0xc0, 0x09, 0x10, 0x02, 0x04, - 0x00, 0x81, 0x00, 0x24, 0x51, 0x18, 0x14, 0x06, - 0x04, 0x00, 0xb1, 0x42, 0x68, 0x50, 0x4b, 0x14, - 0x02, 0xc5, 0x00, 0xb1, 0x01, 0x28, 0x50, 0x0b, - 0x10, 0x02, 0xc2, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xb8, 0x0d, 0x60, 0x00, 0xf8, 0x00, 0x3e, - 0x00, 0x0f, 0x80, 0x03, 0xe0, 0x00, 0xf8, 0x20, - 0x3e, 0x00, 0x2c, 0x82, 0x03, 0x20, 0x00, 0xf8, - 0x23, 0x3e, 0x00, 0xed, 0x09, 0x00, 0x09, 0x00, - 0x0f, 0x80, 0x03, 0xe0, 0x00, 0xc8, 0x00, 0x3e, - 0x01, 0x4d, 0x80, 0x03, 0x60, 0x00, 0xd8, 0x00, - 0x3e, 0x00, 0x0d, 0x80, 0x03, 0x20, 0x00, 0xf8, - 0x00, 0x32, 0x00, 0x8f, 0x80, 0x03, 0xe0, 0x00, - 0xf8, 0x00, 0x32, 0x00, 0x0f, 0x80, 0x03, 0xee, - 0x03, 0x50, 0x00, 0x00, 0x00, 0x00, 0x98, 0x1d, - 0xe4, 0x00, 0xf9, 0x00, 0x3e, 0x40, 0x0f, 0x90, - 0x03, 0xe4, 0x00, 0xf9, 0x00, 0x3e, 0x50, 0x1f, - 0x90, 0x03, 0xe4, 0xa0, 0xf9, 0x00, 0x3e, 0x45, - 0x4f, 0xd2, 0x93, 0x74, 0x02, 0xfd, 0x00, 0x3f, - 0x50, 0x0e, 0xd4, 0x03, 0xf5, 0x00, 0xfd, 0x41, - 0x37, 0x50, 0xcf, 0xd0, 0x03, 0xf4, 0x00, 0xf9, - 0x40, 0x3e, 0x50, 0x0f, 0xd4, 0x43, 0x7d, 0x00, - 0xf9, 0x40, 0x3e, 0x40, 0x0f, 0x90, 0x03, 0xe6, - 0x06, 0x70, 0x00, 0x00, 0x00, 0x00, 0x18, 0x05, - 0xe4, 0x00, 0xf9, 0x00, 0x3e, 0x40, 0x0d, 0x90, - 0x03, 0xe4, 0x00, 0xfd, 0x20, 0x32, 0x48, 0x0f, - 0xd2, 0x03, 0xe4, 0x00, 0xfd, 0x00, 0x3e, 0x50, - 0x0f, 0x90, 0x03, 0xf5, 0x00, 0xfd, 0x00, 0x3a, - 0x41, 0x0e, 0x90, 0x03, 0xe4, 0x80, 0xf9, 0x20, - 0x3b, 0x58, 0x0f, 0x94, 0x03, 0xf4, 0x00, 0xed, - 0x21, 0x32, 0x51, 0x0c, 0xd6, 0x03, 0xf4, 0xa0, - 0xfd, 0x00, 0x3f, 0x50, 0x0f, 0x90, 0x03, 0xc6, - 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x38, 0x10, - 0xe0, 0x00, 0xb8, 0x00, 0x2e, 0x00, 0x0b, 0x80, - 0x02, 0xe0, 0x00, 0xb8, 0x00, 0x22, 0x10, 0x0b, - 0x81, 0x02, 0xe0, 0x20, 0xb8, 0x00, 0x2e, 0x04, - 0x0b, 0x82, 0x82, 0xe0, 0x84, 0xb8, 0x2a, 0x22, - 0x00, 0x0d, 0x80, 0x02, 0xe1, 0x00, 0x9c, 0x41, - 0x32, 0x10, 0x0b, 0x82, 0x02, 0xe0, 0x00, 0xa8, - 0x40, 0xb6, 0x08, 0x0a, 0x86, 0x02, 0xe1, 0x80, - 0xb8, 0x40, 0x2e, 0x08, 0x0b, 0x80, 0xed, 0x09, - 0x00, 0x0a, 0x00, 0x02, 0xce, 0x04, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x05, 0xc4, 0x00, 0xb1, - 0x00, 0x2c, 0x40, 0x0b, 0x10, 0x02, 0xc4, 0x00, - 0xb1, 0x10, 0x20, 0x44, 0x0b, 0x10, 0x02, 0xc4, - 0x80, 0xb1, 0x10, 0x2c, 0x48, 0x43, 0x12, 0x02, - 0xc4, 0x00, 0xb1, 0x00, 0xa5, 0x70, 0x09, 0x5c, - 0x02, 0xd7, 0x00, 0xb5, 0xc0, 0x28, 0x78, 0x0a, - 0x10, 0x06, 0xe4, 0x00, 0x81, 0x48, 0x24, 0x50, - 0x08, 0x11, 0x02, 0xc4, 0x20, 0xb1, 0x40, 0x2c, - 0x40, 0x0b, 0x10, 0x02, 0xc2, 0x01, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x18, 0x15, 0xa4, 0x00, 0xb9, - 0x00, 0x2e, 0x40, 0x0b, 0x90, 0x02, 0xe4, 0x00, - 0xb9, 0x00, 0x22, 0x40, 0x0b, 0x90, 0x02, 0xe4, - 0x00, 0xb9, 0x01, 0x2e, 0x40, 0x0b, 0x90, 0x02, - 0xe4, 0x10, 0xb9, 0x20, 0x26, 0x40, 0x09, 0xd0, - 0x06, 0xf4, 0x00, 0x9d, 0x00, 0xa6, 0x40, 0x0b, - 0x92, 0x12, 0xe4, 0x00, 0xa9, 0x00, 0x24, 0x40, - 0x0a, 0x90, 0x02, 0xe4, 0x80, 0xbb, 0x01, 0x2e, - 0x40, 0x0b, 0x90, 0x02, 0xc6, 0x04, 0x60, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x15, 0xe4, 0x00, 0xf9, - 0x00, 0x3e, 0x40, 0x0d, 0x90, 0x03, 0xe4, 0x00, - 0xf9, 0x00, 0x12, 0x40, 0x0f, 0x90, 0x03, 0xe4, - 0x00, 0xf9, 0x00, 0x3e, 0x40, 0x0f, 0x90, 0x03, - 0xe5, 0x20, 0xf9, 0x08, 0x36, 0x50, 0x4d, 0x9c, - 0x43, 0xe5, 0x50, 0xf9, 0x50, 0x2a, 0x60, 0x0f, - 0x9a, 0x03, 0xe4, 0x00, 0xe9, 0x01, 0x36, 0x41, - 0x0c, 0x92, 0x03, 0xe4, 0x00, 0xf9, 0x00, 0x3e, - 0x40, 0x0f, 0x90, 0x03, 0xe8, 0x04, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x28, 0x01, 0xa4, 0x00, 0xf9, - 0x00, 0x3e, 0x40, 0x0f, 0x90, 0x03, 0xe4, 0x00, - 0xf1, 0x01, 0xbe, 0x40, 0x0f, 0x90, 0x01, 0xe4, - 0x00, 0xf9, 0x00, 0x3e, 0x40, 0x8f, 0x92, 0x03, - 0xe4, 0xed, 0x09, 0x00, 0x0b, 0x00, 0x00, 0xf9, - 0x00, 0x30, 0x40, 0x0f, 0x99, 0x03, 0xe4, 0x00, - 0xf9, 0x00, 0x3a, 0x48, 0x8f, 0x90, 0x03, 0xe7, - 0x00, 0xf1, 0x00, 0x3a, 0x40, 0x0f, 0x94, 0x03, - 0xe4, 0x00, 0xf9, 0x08, 0x3e, 0x40, 0x0f, 0x90, - 0x03, 0xca, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, - 0x28, 0x10, 0xa0, 0x00, 0xf8, 0x00, 0x3e, 0x00, - 0x0e, 0x80, 0x03, 0xe0, 0x00, 0xf8, 0x00, 0x3e, - 0x00, 0x0c, 0x80, 0x02, 0xe0, 0x00, 0xf8, 0x00, - 0x3e, 0x00, 0x2e, 0x80, 0x03, 0x21, 0x00, 0xc8, - 0x00, 0x32, 0x00, 0x0f, 0x80, 0x03, 0xa0, 0x80, - 0xf0, 0x00, 0x3e, 0x00, 0x0f, 0x80, 0x03, 0xe0, - 0x40, 0xf8, 0x20, 0x32, 0x00, 0x0c, 0x84, 0x03, - 0xe3, 0x42, 0xc8, 0x04, 0x3e, 0x00, 0x0f, 0x80, - 0x03, 0xca, 0x04, 0x20, 0x00, 0x00, 0x00, 0x00, - 0x28, 0x05, 0x28, 0x00, 0xba, 0x00, 0x2e, 0x80, - 0x0b, 0xa0, 0x02, 0xe8, 0x00, 0xbe, 0x00, 0x2e, - 0x80, 0x08, 0xa2, 0x02, 0xe8, 0x00, 0xba, 0x80, - 0x2e, 0x80, 0x08, 0xa0, 0x02, 0x38, 0x40, 0xae, - 0xd0, 0x02, 0xa0, 0x0b, 0xa0, 0x02, 0xe9, 0x10, - 0xba, 0x00, 0x33, 0x84, 0x4b, 0xa0, 0x02, 0xca, - 0x10, 0xbe, 0xc0, 0xa2, 0x80, 0x0d, 0xec, 0x02, - 0xf8, 0x10, 0x8e, 0x00, 0x2f, 0xb0, 0x0b, 0xa0, - 0x02, 0xca, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, - 0x28, 0x05, 0x4c, 0x00, 0xb3, 0x00, 0x2c, 0xc0, - 0x0a, 0x30, 0x02, 0xcc, 0x00, 0xb3, 0x60, 0x2c, - 0xc0, 0x09, 0x18, 0x02, 0x4c, 0x08, 0x21, 0x80, - 0x2c, 0xc0, 0x0a, 0x30, 0x02, 0x0f, 0x40, 0x8b, - 0x90, 0xa0, 0xc0, 0x1b, 0x30, 0x02, 0x8d, 0x04, - 0xb3, 0x00, 0x2c, 0xc0, 0x0b, 0x30, 0x00, 0xc4, - 0x00, 0xb3, 0x80, 0x20, 0xc0, 0x08, 0x3c, 0x82, - 0xce, 0x10, 0x83, 0x80, 0x2c, 0xc2, 0x0b, 0x30, - 0x02, 0xca, 0x00, 0x50, 0xed, 0x09, 0x00, 0x0c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x1c, - 0x00, 0xb7, 0x00, 0x2d, 0xc0, 0x0b, 0x70, 0x02, - 0xdc, 0x00, 0xb5, 0x00, 0x2d, 0xe0, 0x09, 0x70, - 0x02, 0xdc, 0xc0, 0xb7, 0x08, 0x2c, 0xec, 0x48, - 0xfa, 0x02, 0x16, 0x00, 0xa5, 0x00, 0x21, 0xd0, - 0x0b, 0x50, 0x02, 0xd4, 0x00, 0xb7, 0x00, 0x21, - 0x80, 0x0b, 0x73, 0x02, 0xdc, 0x00, 0xb3, 0x0a, - 0x20, 0xc8, 0x09, 0x74, 0x02, 0xce, 0x04, 0x86, - 0x40, 0x2d, 0x82, 0x8b, 0x70, 0x02, 0xe8, 0x00, - 0x40, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x08, 0x1e, - 0x00, 0xf7, 0x80, 0x3d, 0xe0, 0x0e, 0x78, 0x03, - 0xde, 0x00, 0xf7, 0x80, 0x3c, 0xe0, 0x2d, 0x78, - 0x43, 0xde, 0x00, 0xf7, 0x80, 0x3d, 0xe0, 0x0e, - 0x7e, 0x02, 0x3e, 0x00, 0xcf, 0x82, 0x31, 0xa0, - 0x0f, 0x68, 0x03, 0x9e, 0x00, 0xb4, 0x80, 0x3d, - 0xe0, 0x0f, 0x78, 0x03, 0xd6, 0x00, 0xf7, 0x80, - 0x31, 0xe0, 0x0c, 0x78, 0x03, 0xde, 0x00, 0xc7, - 0x84, 0x3d, 0xe0, 0x07, 0x78, 0x03, 0xea, 0x02, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x1d, 0xac, - 0x00, 0xfb, 0x00, 0x3e, 0xc0, 0x0f, 0xb0, 0x03, - 0xec, 0x00, 0xfb, 0x00, 0x3e, 0xc0, 0x0e, 0xb0, - 0x03, 0xed, 0x00, 0xfb, 0x00, 0x3e, 0xc8, 0x0f, - 0x30, 0x0b, 0xec, 0x00, 0xfb, 0x00, 0x3e, 0x80, - 0x0f, 0x80, 0x03, 0xe4, 0x00, 0xf8, 0x00, 0x36, - 0xc0, 0x0f, 0xb0, 0x02, 0xec, 0x00, 0xfb, 0x00, - 0x3e, 0xdc, 0x0f, 0xb0, 0x03, 0xec, 0x00, 0xfa, - 0x04, 0x3e, 0x80, 0x0f, 0xb0, 0x03, 0xc2, 0x06, - 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0xfe, - 0x00, 0xff, 0x80, 0x3f, 0xe0, 0x0f, 0xf8, 0x03, - 0xfe, 0x00, 0xff, 0x80, 0x3f, 0xe0, 0x0f, 0xf8, - 0x01, 0x7f, 0x00, 0xff, 0x80, 0x33, 0xf0, 0x0c, - 0xf8, 0x43, 0xfe, 0x02, 0xdf, 0x80, 0x3f, 0xed, - 0x09, 0x00, 0x0d, 0x00, 0x60, 0x0c, 0xf9, 0x03, - 0xba, 0x00, 0xff, 0x80, 0x3f, 0xe0, 0x0f, 0xf8, - 0x03, 0x14, 0x80, 0xcd, 0x80, 0x3b, 0xf0, 0x2c, - 0xf8, 0x03, 0xfa, 0x00, 0xff, 0x84, 0x3f, 0xe0, - 0x0f, 0xf8, 0x03, 0xc0, 0x00, 0x70, 0x00, 0x00, - 0x00, 0x00, 0xa8, 0x11, 0x9c, 0x00, 0xb7, 0x00, - 0x2d, 0xc0, 0x0b, 0x70, 0x02, 0xdc, 0x00, 0xb4, - 0x11, 0x2d, 0xc0, 0x0b, 0x70, 0x02, 0xdc, 0x00, - 0xb7, 0x00, 0x21, 0xc0, 0x28, 0x70, 0x03, 0xfc, - 0x42, 0xd6, 0x00, 0x39, 0x40, 0x0d, 0x50, 0x4b, - 0x10, 0x00, 0xc7, 0x10, 0x39, 0xc1, 0x0f, 0xf0, - 0x02, 0x14, 0x00, 0xd5, 0x02, 0x23, 0xc0, 0x08, - 0x70, 0x03, 0xd8, 0x00, 0xb4, 0x00, 0x3d, 0x40, - 0x0f, 0x70, 0x02, 0xea, 0x04, 0x60, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x9c, 0x00, 0xb7, 0x00, - 0x2d, 0xc0, 0x0b, 0x70, 0x02, 0xdc, 0x00, 0xb7, - 0x00, 0x2d, 0xc0, 0x0b, 0x51, 0x02, 0xdc, 0x00, - 0xb1, 0x00, 0x21, 0xc0, 0x09, 0x70, 0x82, 0xdc, - 0x00, 0x96, 0x00, 0x2c, 0x00, 0x09, 0x20, 0x42, - 0x08, 0x00, 0xa4, 0x00, 0x2d, 0xd0, 0x0b, 0x70, - 0x02, 0x34, 0x00, 0x95, 0x00, 0x25, 0xc0, 0x08, - 0x60, 0x02, 0xd8, 0x00, 0xb7, 0x10, 0x2d, 0x80, - 0x0b, 0x70, 0x02, 0xc0, 0x00, 0x20, 0x00, 0x00, - 0x00, 0x00, 0x20, 0x14, 0xcc, 0x00, 0xb3, 0x00, - 0x2c, 0xc0, 0x0b, 0x30, 0x02, 0xcc, 0x00, 0xb2, - 0x00, 0x2c, 0xc0, 0x0b, 0x30, 0x02, 0xcc, 0x00, - 0xb3, 0x00, 0x20, 0xc0, 0x09, 0x38, 0x22, 0x8d, - 0x00, 0x0b, 0xc0, 0x28, 0x00, 0x29, 0x04, 0x02, - 0x01, 0x10, 0x90, 0x40, 0x28, 0xe0, 0x0a, 0x36, - 0x02, 0x04, 0x00, 0x81, 0x00, 0xa4, 0xc0, 0x88, - 0x1e, 0x02, 0xc1, 0x00, 0xb0, 0x00, 0x28, 0x00, - 0x0a, 0x30, 0x02, 0xc8, 0x04, 0x30, 0x00, 0x00, - 0x00, 0x00, 0xed, 0x09, 0x00, 0x0e, 0x00, 0xa8, - 0x15, 0xac, 0x00, 0xfb, 0x00, 0x3e, 0xc0, 0x0f, - 0xb0, 0x03, 0xec, 0x00, 0xf2, 0x00, 0x3e, 0xc0, - 0x0f, 0xb0, 0x02, 0xfc, 0x00, 0xfb, 0x00, 0xb3, - 0xc0, 0x0d, 0xfc, 0x02, 0xe0, 0x12, 0x59, 0xd0, - 0x3e, 0xe0, 0x0d, 0xbc, 0x03, 0x2e, 0x00, 0xeb, - 0x80, 0x3e, 0xc2, 0x0b, 0xf4, 0x03, 0x0c, 0x00, - 0x92, 0x04, 0xbf, 0xc0, 0x08, 0x84, 0x03, 0xe5, - 0x00, 0xf1, 0x00, 0x2e, 0x40, 0x0b, 0xb0, 0x03, - 0xea, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x00, 0xec, 0x00, 0xfb, 0x00, 0x3e, 0xc0, 0x0f, - 0xb0, 0x03, 0xec, 0x00, 0xf8, 0x00, 0x3e, 0xc0, - 0x0f, 0x90, 0x02, 0xec, 0x00, 0xf9, 0x00, 0x3e, - 0xc0, 0x0e, 0xb0, 0x03, 0xe1, 0x90, 0xf9, 0x50, - 0x78, 0xe0, 0x0e, 0x9a, 0x03, 0xa6, 0x00, 0xeb, - 0x80, 0x3e, 0x80, 0x0f, 0xb0, 0x0b, 0xec, 0x00, - 0xfb, 0x40, 0x3a, 0xc0, 0x8f, 0x81, 0x13, 0xa5, - 0xc1, 0xf8, 0x40, 0x3e, 0x00, 0x0f, 0xb0, 0x03, - 0xe0, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x10, 0xfc, 0x00, 0xff, 0x00, 0x3f, 0xc0, 0x0f, - 0xf0, 0x03, 0xfc, 0x00, 0xfc, 0x00, 0x3b, 0xc0, - 0x0f, 0xf8, 0x03, 0xbc, 0x00, 0xe7, 0x10, 0x33, - 0xc0, 0x0b, 0xf0, 0x83, 0x30, 0x00, 0xfd, 0x00, - 0x37, 0x81, 0x4c, 0xe0, 0x43, 0x7c, 0x20, 0xf4, - 0x08, 0x37, 0x40, 0x0d, 0xf0, 0x02, 0x3c, 0x80, - 0xdf, 0x00, 0x33, 0xc0, 0x0c, 0x40, 0x03, 0x30, - 0x00, 0xfd, 0x83, 0xb3, 0x44, 0x8c, 0xf0, 0x03, - 0xc0, 0x44, 0x30, 0x00, 0x00, 0x00, 0x00, 0x81, - 0x04, 0x6c, 0x00, 0xbb, 0x00, 0x2e, 0xc0, 0x0b, - 0xb0, 0x02, 0xec, 0x00, 0xb8, 0x08, 0x22, 0xc0, - 0x0b, 0xb8, 0x02, 0xec, 0x00, 0xbb, 0x00, 0x22, - 0xc0, 0x0b, 0x30, 0x22, 0x27, 0x00, 0xb9, 0xc0, - 0x22, 0x80, 0x0a, 0x80, 0x03, 0xed, 0x09, 0x00, - 0x0f, 0x00, 0xe4, 0x00, 0xb8, 0x00, 0x20, 0x60, - 0x0f, 0x30, 0x0a, 0xac, 0x00, 0xfb, 0x08, 0x3e, - 0xc0, 0x08, 0x8c, 0x82, 0x27, 0x90, 0xb8, 0xc0, - 0x22, 0x01, 0x08, 0xb0, 0x02, 0xe0, 0x40, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x05, 0x2c, 0x00, - 0xbb, 0x00, 0x2e, 0xc0, 0x0b, 0xb0, 0x02, 0xec, - 0x00, 0xbb, 0x80, 0x2a, 0xc0, 0x0b, 0xb2, 0x02, - 0xec, 0x00, 0xab, 0x00, 0x22, 0xc0, 0x0b, 0xb0, - 0x0a, 0x63, 0x18, 0x99, 0x88, 0x22, 0x41, 0x18, - 0xb0, 0x06, 0xe8, 0x01, 0xbb, 0x04, 0x26, 0xe1, - 0x0b, 0xb0, 0x12, 0xa4, 0x10, 0x89, 0x00, 0x20, - 0xc0, 0x48, 0x98, 0x12, 0x26, 0x00, 0xb8, 0x20, - 0x20, 0xc0, 0x08, 0xb0, 0x42, 0xe0, 0x00, 0x40, - 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x0c, 0x00, - 0xb3, 0x00, 0x2c, 0xc0, 0x0b, 0x30, 0x02, 0xcc, - 0x00, 0xb0, 0x00, 0x20, 0xc0, 0x0b, 0x30, 0x02, - 0xcc, 0x00, 0xb3, 0x00, 0xa0, 0xc0, 0x0b, 0xb0, - 0x02, 0x00, 0x00, 0xb1, 0x00, 0x20, 0x40, 0x0a, - 0x10, 0x02, 0x80, 0x00, 0xb3, 0x00, 0x20, 0xc0, - 0x09, 0xb0, 0x02, 0x04, 0x00, 0x91, 0x00, 0x2c, - 0xc0, 0x48, 0x10, 0x02, 0x04, 0x00, 0xb0, 0x00, - 0x20, 0x40, 0x28, 0x30, 0x00, 0xc2, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x6c, 0x00, - 0xfb, 0x00, 0x3e, 0xc0, 0x0f, 0xb0, 0x03, 0xec, - 0x00, 0xf9, 0x00, 0x3a, 0xc0, 0x0f, 0xb0, 0x03, - 0xfc, 0x00, 0xeb, 0x00, 0x21, 0xc0, 0x0f, 0xb0, - 0x03, 0x64, 0x04, 0xb9, 0x00, 0x36, 0x01, 0x08, - 0xa0, 0x02, 0x68, 0x00, 0xf8, 0x00, 0x36, 0x40, - 0xaf, 0xb0, 0x03, 0xa4, 0x08, 0xc1, 0x00, 0x33, - 0xc0, 0x0c, 0x80, 0x0b, 0x20, 0x00, 0xf8, 0x00, - 0x32, 0x80, 0x0c, 0xb0, 0x03, 0xc0, 0x03, 0x50, - 0x00, 0x00, 0x00, 0x00, 0xa0, 0x1d, 0xfc, 0x00, - 0xed, 0x09, 0x00, 0x10, 0x00, 0xff, 0x00, 0x3f, - 0xc0, 0x0f, 0xf0, 0x03, 0xfc, 0x00, 0xfc, 0x00, - 0x3f, 0xc0, 0x0f, 0xd0, 0x03, 0xfc, 0x00, 0xfd, - 0x00, 0x3f, 0xc0, 0x0f, 0xf0, 0x07, 0xf4, 0x00, - 0xfd, 0x00, 0xbf, 0x00, 0x0f, 0xc0, 0x03, 0xf0, - 0x00, 0xfc, 0x00, 0x3f, 0x40, 0x0f, 0xf0, 0x03, - 0xf4, 0x00, 0xfd, 0x00, 0x3f, 0xc1, 0x0f, 0xd0, - 0x03, 0xf4, 0x08, 0xfc, 0x00, 0x3f, 0x00, 0x0f, - 0xf0, 0x03, 0x68, 0x06, 0x70, 0x00, 0x00, 0x00, - 0x00, 0xc0, 0x05, 0xfc, 0x00, 0xff, 0x00, 0x3f, - 0xc0, 0x0f, 0xc0, 0x03, 0x3c, 0xc8, 0xff, 0x00, - 0x3f, 0xc0, 0xcc, 0xd0, 0x02, 0xf5, 0x00, 0xff, - 0x21, 0x33, 0xc0, 0x0e, 0xf2, 0x03, 0xf4, 0x00, - 0xfd, 0x10, 0x33, 0x04, 0x0c, 0xf0, 0x0b, 0x34, - 0x00, 0xff, 0x01, 0x3f, 0xc0, 0x8f, 0xf1, 0x03, - 0xf4, 0x00, 0xff, 0x44, 0x33, 0xc1, 0x0c, 0xc0, - 0x03, 0x3c, 0x40, 0xff, 0x00, 0x3f, 0xc4, 0x4f, - 0xf0, 0x22, 0xf0, 0x00, 0x70, 0x00, 0x00, 0x00, - 0x00, 0x80, 0x10, 0xec, 0x00, 0xbb, 0x00, 0x2e, - 0xc0, 0x0b, 0xb0, 0x02, 0x3d, 0x88, 0xbf, 0x40, - 0x22, 0xd0, 0x08, 0xb0, 0x02, 0xee, 0x00, 0xbf, - 0x9c, 0x23, 0xc4, 0x08, 0xf4, 0x02, 0xe4, 0x00, - 0xba, 0x01, 0x22, 0x88, 0x08, 0xb4, 0x02, 0x2c, - 0x00, 0xbb, 0x00, 0x3e, 0x40, 0x08, 0xf0, 0x02, - 0xe4, 0x00, 0xbb, 0x00, 0x2a, 0xc0, 0x0d, 0x82, - 0x12, 0x2c, 0x00, 0xbb, 0x00, 0x2e, 0xc8, 0x0b, - 0xb0, 0x02, 0xe0, 0x04, 0x30, 0x00, 0x00, 0x00, - 0x00, 0x88, 0x05, 0xcc, 0x00, 0xb3, 0x00, 0x2c, - 0xc0, 0x0b, 0xa0, 0x02, 0x0d, 0x80, 0xb3, 0x10, - 0x24, 0xc4, 0x08, 0x30, 0x02, 0x4c, 0x80, 0xb3, - 0x20, 0x20, 0xc0, 0x08, 0x34, 0x02, 0xc4, 0x00, - 0xb1, 0x20, 0x20, 0x00, 0x28, 0x21, 0x02, 0x44, - 0x00, 0xb3, 0x00, 0xed, 0x09, 0x00, 0x11, 0x00, - 0x2e, 0xc0, 0x8a, 0x32, 0x42, 0xc4, 0xa0, 0xb3, - 0x20, 0x20, 0xc0, 0x28, 0x80, 0x82, 0x0c, 0x80, - 0xb3, 0x00, 0x2c, 0xc8, 0x0b, 0x30, 0x02, 0xe2, - 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x15, - 0x2c, 0x00, 0xbb, 0x00, 0x2e, 0xc0, 0x0b, 0xb0, - 0x02, 0x2c, 0x00, 0xbb, 0x00, 0x26, 0xc1, 0x28, - 0x92, 0x02, 0xec, 0x80, 0xbb, 0x00, 0x22, 0xc0, - 0x28, 0xb0, 0x02, 0xe6, 0x10, 0xb9, 0x80, 0x26, - 0xa2, 0x09, 0xb0, 0x82, 0x6c, 0x00, 0xbb, 0x00, - 0x2e, 0xc0, 0x88, 0xb0, 0x02, 0xe4, 0x40, 0xbb, - 0x00, 0x0a, 0xc0, 0x09, 0xb0, 0x0a, 0x2c, 0x00, - 0xbb, 0x00, 0x2e, 0xc0, 0x0b, 0xb0, 0x02, 0xf0, - 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x40, 0x15, - 0xec, 0x00, 0xfb, 0x00, 0x3e, 0xc0, 0x0f, 0xbc, - 0x83, 0x2c, 0x00, 0xfb, 0x00, 0x3e, 0xc0, 0x0c, - 0xb0, 0x03, 0x6e, 0x00, 0xfb, 0x00, 0x32, 0xc0, - 0x04, 0xb0, 0x02, 0xe2, 0x10, 0xb9, 0x80, 0x32, - 0x70, 0x0c, 0xbc, 0x03, 0x64, 0x40, 0xfb, 0x02, - 0x3e, 0x60, 0x0e, 0xb0, 0x43, 0xe6, 0x00, 0xbb, - 0x00, 0x30, 0xc0, 0x0c, 0x08, 0x07, 0x2c, 0x00, - 0xfb, 0x00, 0x3e, 0xc0, 0x0f, 0xb0, 0x03, 0xd0, - 0x04, 0x70, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, - 0xbc, 0x00, 0xff, 0x00, 0x3f, 0xc0, 0x0f, 0xda, - 0x03, 0xfc, 0x08, 0xf7, 0x00, 0x3b, 0xc0, 0x0f, - 0xf8, 0x03, 0xfc, 0x00, 0xfb, 0x02, 0x3f, 0xc0, - 0x0d, 0xf0, 0x03, 0xf4, 0x00, 0xfa, 0x00, 0x38, - 0xc0, 0x0e, 0xf1, 0x03, 0xbe, 0x00, 0xff, 0x00, - 0x3b, 0x30, 0x0e, 0xf0, 0x03, 0xf4, 0x00, 0xff, - 0x02, 0x3f, 0xc0, 0x0f, 0xd2, 0x03, 0xfc, 0x00, - 0xff, 0x00, 0x3f, 0xc0, 0x0f, 0xf0, 0x03, 0xf8, - 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x40, 0x10, - 0xac, 0x00, 0xfb, 0x00, 0x3e, 0xc0, 0xed, 0x09, - 0x00, 0x12, 0x00, 0x0f, 0xb8, 0x03, 0x2c, 0x00, - 0xfb, 0x00, 0x3e, 0xc0, 0x0f, 0xb8, 0x03, 0xe4, - 0x00, 0xc3, 0x08, 0x32, 0xc0, 0x0e, 0xb1, 0x07, - 0xa5, 0x00, 0xcb, 0x00, 0x72, 0xd0, 0x2d, 0xa0, - 0x03, 0x64, 0x00, 0xfb, 0x00, 0x3e, 0xc0, 0x0e, - 0xb0, 0x03, 0x2c, 0x00, 0xfb, 0x00, 0x2e, 0xc0, - 0x0f, 0x80, 0x03, 0x2c, 0x00, 0xfb, 0x00, 0x3e, - 0xc0, 0x0f, 0xb0, 0x03, 0xd0, 0x04, 0x20, 0x00, - 0x00, 0x00, 0x00, 0xc8, 0x05, 0x2c, 0x00, 0xbb, - 0x00, 0x2e, 0xc0, 0x4b, 0x34, 0x02, 0x3c, 0x00, - 0xbf, 0xf0, 0x2d, 0xc8, 0x0b, 0xb5, 0x02, 0xec, - 0x00, 0x8f, 0x00, 0x21, 0xe8, 0x03, 0xfd, 0x02, - 0xe4, 0x94, 0x8b, 0x00, 0x22, 0xc0, 0x08, 0x38, - 0x02, 0xef, 0x00, 0x3f, 0x02, 0x2c, 0xa0, 0x08, - 0xf0, 0x03, 0x6c, 0x00, 0x3f, 0x00, 0x2e, 0xc0, - 0x0b, 0xb0, 0x0a, 0x2c, 0x00, 0xbb, 0x00, 0x2e, - 0xc2, 0x0b, 0xb0, 0x02, 0xf2, 0x00, 0x40, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0x05, 0x4c, 0x00, 0xb3, - 0x00, 0x2c, 0xc0, 0x0b, 0x30, 0x82, 0x0c, 0x00, - 0xb3, 0x00, 0x2c, 0xc0, 0x0b, 0x34, 0x00, 0xcc, - 0x00, 0xa3, 0x00, 0x20, 0xc0, 0x0b, 0x34, 0x02, - 0x84, 0x00, 0x8b, 0x00, 0x60, 0x00, 0x08, 0x08, - 0x02, 0xcf, 0x20, 0xb3, 0x00, 0x28, 0x68, 0x08, - 0x30, 0x02, 0x04, 0x00, 0xbb, 0x02, 0x2c, 0xcc, - 0x0b, 0x00, 0x02, 0x0c, 0x00, 0xb3, 0x00, 0x2c, - 0xd2, 0x0b, 0x30, 0x02, 0xf8, 0x00, 0x50, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x01, 0x1e, 0x00, 0xb7, - 0x80, 0x2d, 0xe1, 0x0b, 0xf8, 0x02, 0x1e, 0x08, - 0xb7, 0x82, 0x2d, 0xe0, 0x0b, 0x78, 0x02, 0xd6, - 0x00, 0xa7, 0x80, 0x21, 0xe0, 0x0b, 0x78, 0x00, - 0xdc, 0x00, 0x86, 0x84, 0x21, 0xa0, 0x18, 0x78, - 0x02, 0xde, 0x20, 0xb7, 0x80, 0x2f, 0x64, 0x08, - 0x78, 0xed, 0x09, 0x00, 0x13, 0x00, 0x02, 0x56, - 0x00, 0xb7, 0x80, 0x2d, 0xe0, 0x0b, 0x68, 0x02, - 0x1e, 0x00, 0xb7, 0x80, 0x2d, 0xe4, 0x0b, 0x78, - 0x02, 0xc8, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, - 0x68, 0x08, 0x0c, 0x00, 0xf3, 0x00, 0x3c, 0xc0, - 0x0f, 0x10, 0x03, 0x0c, 0x00, 0xf3, 0x00, 0x1c, - 0xc5, 0x0f, 0x30, 0x03, 0xec, 0x82, 0xe3, 0x00, - 0x30, 0xc0, 0x0e, 0x30, 0x03, 0xad, 0x40, 0xc3, - 0x00, 0x80, 0x00, 0x0c, 0x10, 0x83, 0xcc, 0x00, - 0xf3, 0x00, 0x3c, 0xc2, 0x8e, 0xb0, 0x03, 0x04, - 0x00, 0xf3, 0x10, 0x3c, 0xc4, 0x0f, 0x81, 0x03, - 0x0c, 0x00, 0xf3, 0x20, 0x3c, 0xc0, 0x0f, 0x30, - 0x03, 0xd2, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x40, 0x1d, 0xbc, 0x00, 0xff, 0x00, 0x3f, 0xc0, - 0x0f, 0x70, 0x03, 0xfd, 0x60, 0xff, 0x00, 0x3f, - 0xc4, 0x0f, 0xf0, 0x03, 0xfc, 0x00, 0xdf, 0x10, - 0x3f, 0xd0, 0x0f, 0xf0, 0x03, 0xfc, 0x80, 0xff, - 0x00, 0x3f, 0x84, 0x2e, 0xf0, 0x03, 0xfc, 0x00, - 0xff, 0x00, 0x3d, 0xc0, 0x0f, 0xf4, 0x03, 0xf4, - 0x40, 0xff, 0x10, 0x37, 0xc5, 0x0f, 0xf0, 0x03, - 0xfc, 0x00, 0xff, 0x00, 0x3f, 0xc1, 0x0f, 0xf0, - 0x03, 0xd0, 0x06, 0x60, 0x00, 0x00, 0x00, 0x00, - 0xa8, 0x01, 0xec, 0x00, 0xeb, 0x00, 0x3e, 0xc0, - 0x0f, 0xb0, 0x03, 0xed, 0x80, 0xcb, 0x01, 0x3e, - 0xc0, 0x0f, 0x98, 0x07, 0xac, 0x00, 0xcb, 0xd8, - 0x32, 0xd0, 0x07, 0xb1, 0x03, 0x6c, 0x00, 0xfb, - 0x00, 0x32, 0x80, 0x8e, 0x80, 0x03, 0xac, 0x00, - 0xeb, 0x10, 0x3c, 0x40, 0x0c, 0xb5, 0x03, 0x2e, - 0x02, 0xeb, 0x00, 0x3e, 0xc0, 0x0f, 0x80, 0x03, - 0xec, 0x00, 0x7b, 0x00, 0x3e, 0xe0, 0x0d, 0xb0, - 0x03, 0xea, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x68, 0x11, 0x9c, 0x00, 0xb7, 0x00, 0x2d, 0xc0, - 0x0b, 0x70, 0x02, 0xcc, 0xed, 0x09, 0x00, 0x14, - 0x00, 0x00, 0x87, 0x29, 0x2d, 0xc0, 0x0b, 0x70, - 0x42, 0x1c, 0x02, 0x8f, 0x20, 0xa1, 0xd8, 0x5b, - 0x71, 0x03, 0x9c, 0x00, 0xb6, 0x00, 0x21, 0x80, - 0x08, 0x70, 0x4a, 0x1c, 0x00, 0xc7, 0x00, 0x2d, - 0x00, 0x0f, 0x70, 0x03, 0xbc, 0x00, 0x87, 0x40, - 0x2d, 0xc0, 0x0b, 0x70, 0x02, 0xdc, 0x00, 0xf7, - 0x00, 0x2f, 0xc0, 0x08, 0x70, 0x02, 0xd2, 0x04, - 0x60, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x9e, - 0x00, 0xb7, 0x80, 0x2d, 0xe0, 0x0b, 0x78, 0x02, - 0xde, 0x80, 0x87, 0xb0, 0x2d, 0xe4, 0x0b, 0x78, - 0x02, 0x9e, 0x04, 0x87, 0xa4, 0x21, 0xe8, 0x0b, - 0x78, 0x02, 0x5f, 0x00, 0xa3, 0x80, 0x24, 0xe0, - 0x0b, 0x18, 0x02, 0xde, 0x00, 0xb7, 0xa0, 0x2f, - 0xe0, 0x09, 0x7a, 0x02, 0xde, 0x00, 0xa7, 0x80, - 0x2d, 0xe0, 0x0b, 0x48, 0x02, 0xde, 0x00, 0xb7, - 0x80, 0x2d, 0xe0, 0x09, 0x78, 0x02, 0xf0, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x48, 0x14, 0xcc, - 0x00, 0xb3, 0x00, 0x2c, 0xc0, 0x0b, 0x1e, 0x02, - 0xcc, 0x00, 0x83, 0x02, 0x2c, 0xc0, 0x0b, 0x18, - 0x02, 0x86, 0x40, 0x83, 0x00, 0x20, 0xc1, 0x0b, - 0x30, 0x22, 0xcd, 0x80, 0xb3, 0x90, 0x20, 0xf8, - 0x0b, 0x30, 0x02, 0x0c, 0x00, 0x8b, 0x00, 0x6c, - 0xa0, 0x0b, 0x30, 0x00, 0x8c, 0x00, 0xa3, 0x00, - 0x2c, 0xc0, 0x0b, 0xb6, 0x02, 0xcc, 0x10, 0xb3, - 0x00, 0x2c, 0xc0, 0x08, 0x30, 0x02, 0xd2, 0x04, - 0x30, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x15, 0xa8, - 0x00, 0xea, 0x00, 0x3e, 0x80, 0x0f, 0xec, 0x03, - 0xe8, 0x02, 0xc2, 0x00, 0x3e, 0x80, 0x0f, 0xaa, - 0x03, 0xa8, 0x00, 0xca, 0x00, 0x32, 0x80, 0x0f, - 0xa0, 0x03, 0x79, 0x00, 0xee, 0x00, 0x37, 0xb2, - 0x6f, 0xe0, 0x03, 0xa8, 0x00, 0xfa, 0x00, 0x3f, - 0x98, 0x0d, 0xa0, 0x23, 0x28, 0x28, 0xea, 0xed, - 0x09, 0x00, 0x15, 0x00, 0x00, 0x3e, 0x80, 0x0f, - 0xe0, 0x03, 0xe8, 0x11, 0xfa, 0x00, 0x3e, 0x80, - 0x1d, 0xa0, 0x03, 0xfa, 0x04, 0x60, 0x00, 0x00, - 0x00, 0x00, 0x48, 0x00, 0xe0, 0x00, 0xf8, 0x00, - 0x3e, 0x00, 0x0f, 0x81, 0x03, 0xe0, 0x00, 0xf8, - 0x00, 0x2e, 0x00, 0x0f, 0x80, 0x02, 0x60, 0x00, - 0xf8, 0x00, 0x3e, 0x00, 0x0f, 0x84, 0x03, 0xa0, - 0x00, 0xf8, 0x00, 0xbe, 0x00, 0x0c, 0x00, 0x03, - 0xe0, 0x00, 0xe8, 0x04, 0x3e, 0x20, 0x0d, 0x80, - 0x03, 0xa0, 0x00, 0xd8, 0x00, 0x3e, 0x10, 0x0f, - 0x80, 0x03, 0xe0, 0x05, 0xe8, 0x01, 0x36, 0x10, - 0x0f, 0x80, 0x03, 0xd2, 0x00, 0x30, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x10, 0xe4, 0x00, 0xf9, 0x00, - 0x3e, 0x40, 0x0f, 0x90, 0x03, 0xa4, 0x00, 0xc9, - 0x00, 0x3a, 0x60, 0x0f, 0x90, 0x03, 0xe6, 0x00, - 0xd9, 0x02, 0x3e, 0x40, 0x0f, 0x98, 0x07, 0xe4, - 0x00, 0xf1, 0x00, 0x34, 0x40, 0x05, 0x90, 0x03, - 0x44, 0x00, 0xc9, 0x00, 0x22, 0x40, 0x29, 0x90, - 0x03, 0xe4, 0x00, 0xf9, 0x05, 0x3a, 0x50, 0x0b, - 0x90, 0x02, 0x24, 0x00, 0xf9, 0x00, 0x3e, 0x40, - 0x0f, 0x90, 0x03, 0xc2, 0x04, 0x30, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x04, 0x64, 0x00, 0xe9, 0x00, - 0x2e, 0x40, 0x4b, 0x14, 0x02, 0x24, 0x00, 0x89, - 0x00, 0x22, 0x64, 0x4b, 0x94, 0x02, 0xc6, 0x40, - 0x89, 0x00, 0x2e, 0x40, 0x4b, 0x93, 0x02, 0xe6, - 0x00, 0xb9, 0x00, 0x26, 0x40, 0x00, 0x90, 0x03, - 0x65, 0x00, 0x89, 0x00, 0x38, 0x50, 0x18, 0x90, - 0x02, 0xe4, 0x00, 0xb9, 0x02, 0x2e, 0x60, 0x0b, - 0x90, 0x0a, 0xa4, 0x00, 0xb9, 0x02, 0x0e, 0x58, - 0x0b, 0x90, 0x02, 0xe0, 0x00, 0x10, 0x00, 0x00, - 0x00, 0x00, 0x18, 0x05, 0x24, 0x00, 0xb9, 0x00, - 0x2e, 0x40, 0x0b, 0x98, 0x02, 0x84, 0x00, 0x89, - 0x00, 0x2a, 0xed, 0x09, 0x00, 0x16, 0x00, 0x40, - 0x0b, 0x98, 0x02, 0xe4, 0x00, 0x19, 0x00, 0x2e, - 0x44, 0x0b, 0x90, 0x02, 0xe4, 0xa0, 0xb9, 0x00, - 0xa2, 0x40, 0x0b, 0x91, 0x02, 0x64, 0x02, 0x89, - 0x00, 0x2a, 0x48, 0x0b, 0x90, 0x00, 0xe4, 0x00, - 0xa9, 0x00, 0x6e, 0x40, 0x0b, 0x90, 0x02, 0xa4, - 0x01, 0xb9, 0x00, 0x2e, 0x40, 0x0b, 0x90, 0x02, - 0xc6, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x04, 0x04, 0x00, 0xa1, 0x00, 0x2c, 0x40, 0x0b, - 0x18, 0x02, 0x05, 0x02, 0x81, 0x00, 0x20, 0x40, - 0x0b, 0x18, 0x02, 0xe4, 0x00, 0x81, 0x00, 0x2c, - 0x4a, 0x0b, 0x12, 0x86, 0xc5, 0x00, 0xb1, 0x01, - 0x04, 0x50, 0x0a, 0x10, 0x02, 0x46, 0xa0, 0x81, - 0x2a, 0x68, 0xc0, 0x18, 0x14, 0x02, 0xc5, 0x00, - 0xb1, 0x40, 0x2c, 0x40, 0x01, 0x14, 0x22, 0x85, - 0x00, 0xb1, 0x00, 0x2c, 0x50, 0x0b, 0x10, 0x02, - 0xc2, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, - 0x0d, 0x60, 0x00, 0xf8, 0x00, 0x3e, 0x00, 0x0f, - 0x80, 0x03, 0xa0, 0x00, 0xc8, 0x00, 0x3a, 0x01, - 0x0f, 0x80, 0x03, 0xc1, 0x40, 0xd8, 0x50, 0x2e, - 0x08, 0x0f, 0x82, 0x12, 0xe0, 0x00, 0xf8, 0x00, - 0x32, 0x00, 0x0f, 0x80, 0x03, 0x60, 0x80, 0xc8, - 0x20, 0x3a, 0x00, 0x0f, 0x80, 0x03, 0xe0, 0x00, - 0xe8, 0x00, 0x3a, 0x81, 0x0f, 0x80, 0x03, 0xa0, - 0x00, 0xf8, 0x00, 0x3e, 0x00, 0x0f, 0x80, 0x03, - 0xee, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00, 0x98, - 0x1d, 0xe4, 0x00, 0xf9, 0x00, 0x3e, 0x40, 0x0f, - 0xd0, 0x03, 0xe5, 0x00, 0xf9, 0x41, 0x3e, 0x50, - 0x0f, 0x50, 0x03, 0xf4, 0x08, 0xf9, 0x40, 0x3e, - 0x40, 0x0f, 0x90, 0x03, 0xf5, 0x00, 0xfd, 0x68, - 0x3b, 0xd0, 0x0d, 0xd4, 0x01, 0x94, 0xa0, 0xf9, - 0x28, 0x3b, 0x40, 0x0f, 0x94, 0x13, 0xf4, 0x04, - 0xf9, 0x40, 0x3e, 0x40, 0x07, 0xed, 0x09, 0x00, - 0x17, 0x00, 0xd0, 0x03, 0x64, 0x08, 0xd9, 0x00, - 0x3e, 0x40, 0x0f, 0x90, 0x03, 0xe6, 0x06, 0x70, - 0x00, 0x00, 0x00, 0x00, 0x18, 0x05, 0xe4, 0x00, - 0xf9, 0x00, 0x3e, 0x40, 0x0f, 0xd0, 0x13, 0xe4, - 0x90, 0xcd, 0x28, 0x37, 0x48, 0x0f, 0xd0, 0x03, - 0xf4, 0x00, 0xfd, 0x00, 0x3b, 0x48, 0x0f, 0x50, - 0x03, 0x74, 0xc0, 0xf9, 0x10, 0x36, 0x40, 0x0f, - 0xd0, 0x03, 0xf4, 0xc0, 0xf9, 0x00, 0x2b, 0x40, - 0x0f, 0x90, 0x03, 0xc4, 0x00, 0xc9, 0x10, 0x3d, - 0x40, 0x0c, 0x90, 0x03, 0xe4, 0x40, 0xc9, 0x00, - 0x7f, 0x40, 0x0f, 0x90, 0x03, 0xc6, 0x01, 0x30, - 0x00, 0x00, 0x00, 0x00, 0x38, 0x10, 0xe0, 0x00, - 0xb8, 0x00, 0x2e, 0x00, 0x0b, 0x80, 0x02, 0xe0, - 0xa0, 0x88, 0x05, 0x22, 0x04, 0x0b, 0x80, 0x03, - 0xa0, 0xa0, 0xb0, 0x30, 0x2e, 0x05, 0x0b, 0x84, - 0x02, 0x20, 0xc0, 0xb8, 0x40, 0x22, 0x02, 0x0e, - 0x81, 0x02, 0xe0, 0xc0, 0xb8, 0x48, 0x66, 0x00, - 0x09, 0x84, 0x80, 0xe0, 0x20, 0x88, 0x14, 0x2e, - 0x00, 0x0d, 0x82, 0x02, 0xe0, 0x80, 0xd8, 0x01, - 0x3a, 0x02, 0x0b, 0x80, 0x02, 0xce, 0x04, 0x30, - 0x00, 0x00, 0x00, 0x00, 0x08, 0x05, 0xc4, 0x00, - 0xb1, 0x00, 0x2c, 0x40, 0x0b, 0x10, 0x02, 0xc4, - 0xc0, 0x81, 0x00, 0x2c, 0x40, 0x0b, 0x30, 0x02, - 0xc4, 0x80, 0xb1, 0x28, 0x28, 0x40, 0x1b, 0x11, - 0x28, 0x04, 0x80, 0xb1, 0x10, 0x20, 0x45, 0x09, - 0x10, 0x02, 0xc4, 0x80, 0xb1, 0x30, 0x22, 0x40, - 0x0a, 0x13, 0x12, 0xc4, 0x03, 0xa1, 0x01, 0x2c, - 0x40, 0x00, 0x12, 0x82, 0xc4, 0x90, 0x81, 0x00, - 0x2c, 0x40, 0x0b, 0x10, 0x02, 0xc2, 0x01, 0x30, - 0x00, 0x00, 0x00, 0x00, 0x18, 0x15, 0xa4, 0x00, - 0xb9, 0x00, 0x6e, 0x40, 0x0b, 0x90, 0x02, 0xe4, - 0x00, 0x8b, 0x00, 0x2a, 0x40, 0x0b, 0x90, 0x02, - 0xed, 0x09, 0x00, 0x18, 0x00, 0xa6, 0x00, 0xb9, - 0x00, 0x2e, 0x40, 0x0b, 0x90, 0x02, 0x27, 0x00, - 0xb1, 0x40, 0x20, 0x40, 0x0a, 0x90, 0x82, 0xe4, - 0x00, 0xb9, 0x00, 0x26, 0x60, 0x0b, 0x90, 0x52, - 0x64, 0x80, 0xa9, 0x00, 0x2e, 0x40, 0x09, 0x90, - 0x82, 0xe4, 0x00, 0x99, 0x06, 0x2a, 0x40, 0x0b, - 0x90, 0x02, 0xc6, 0x04, 0x60, 0x00, 0x00, 0x00, - 0x00, 0xa0, 0x15, 0xe4, 0x00, 0xf9, 0x00, 0x3e, - 0x41, 0x0f, 0x91, 0x03, 0xe4, 0x02, 0xc1, 0x00, - 0x3e, 0x40, 0x0f, 0x98, 0x03, 0xe4, 0x00, 0xf9, - 0x00, 0x3a, 0x40, 0x0f, 0x90, 0x12, 0x25, 0x00, - 0xf9, 0x50, 0x32, 0x50, 0x0f, 0x90, 0x03, 0xe4, - 0x00, 0xf9, 0x00, 0x32, 0x60, 0x8e, 0x90, 0x03, - 0xe4, 0x00, 0xe9, 0x00, 0x1e, 0x40, 0x48, 0x9c, - 0x03, 0xe4, 0x00, 0xc9, 0x00, 0x2e, 0x40, 0x0b, - 0x90, 0x03, 0xe8, 0x04, 0x70, 0x00, 0x00, 0x00, - 0x00, 0x28, 0x01, 0xa4, 0x00, 0xf9, 0x00, 0x3e, - 0x40, 0x0f, 0x90, 0x03, 0xc4, 0x00, 0xf9, 0x04, - 0x36, 0x40, 0x0f, 0x94, 0x03, 0xe4, 0x20, 0xf9, - 0x00, 0x3e, 0x40, 0x0f, 0x10, 0x03, 0xa4, 0x00, - 0xf9, 0x82, 0xba, 0x48, 0x05, 0x90, 0x13, 0xe4, - 0x10, 0xf9, 0x00, 0x36, 0x40, 0x0c, 0x90, 0x03, - 0xe6, 0x00, 0xd9, 0x00, 0x3e, 0x40, 0x0f, 0x99, - 0x03, 0xe4, 0x04, 0xf9, 0x00, 0x12, 0x40, 0x0f, - 0x90, 0x03, 0xca, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x28, 0x10, 0xa0, 0x00, 0xf8, 0x00, 0x3e, - 0x00, 0x0f, 0x88, 0x03, 0xe0, 0x02, 0xc8, 0x00, - 0x3a, 0x00, 0x0f, 0x88, 0x03, 0xe0, 0x00, 0xf8, - 0x00, 0x32, 0x00, 0x0c, 0x88, 0x03, 0x60, 0x28, - 0xe8, 0x40, 0x32, 0x11, 0x07, 0x84, 0x03, 0xe2, - 0x00, 0xc8, 0x00, 0x3a, 0x20, 0x0f, 0x80, 0x03, - 0xe0, 0x10, 0xc8, 0x00, 0x3e, 0x02, 0x0c, 0x80, - 0x43, 0xe0, 0x00, 0xed, 0x09, 0x00, 0x19, 0x00, - 0xf8, 0x00, 0x3e, 0x04, 0x0f, 0x80, 0x03, 0xca, - 0x04, 0x20, 0x00, 0x00, 0x00, 0x00, 0x28, 0x05, - 0x28, 0x00, 0xba, 0x00, 0x2e, 0x80, 0x43, 0xe6, - 0x02, 0xe8, 0x00, 0x8e, 0x40, 0x0e, 0x80, 0x0b, - 0xe4, 0x03, 0xb8, 0x80, 0xbe, 0xf0, 0x22, 0x80, - 0x08, 0xec, 0x02, 0x3a, 0x00, 0x8a, 0x01, 0xa2, - 0x80, 0x0b, 0xa0, 0x02, 0xfb, 0x80, 0x8a, 0x00, - 0x29, 0x92, 0x0b, 0xa0, 0x03, 0xa8, 0x08, 0x0a, - 0x02, 0x2d, 0x80, 0x48, 0xa0, 0x02, 0xe8, 0x00, - 0xba, 0x00, 0x2f, 0x80, 0x0b, 0xa0, 0x02, 0xca, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x05, - 0x4c, 0x00, 0xb3, 0x00, 0x2c, 0xc0, 0x0b, 0x18, - 0x02, 0xcc, 0x00, 0x83, 0xf0, 0x28, 0x44, 0x0b, - 0x10, 0x02, 0x82, 0x00, 0xb0, 0x00, 0xa4, 0x60, - 0x09, 0x18, 0x0a, 0x0c, 0x00, 0xb3, 0x02, 0x20, - 0xc0, 0x4b, 0x11, 0x02, 0x8c, 0x00, 0x83, 0x00, - 0x20, 0xc0, 0x09, 0x30, 0x02, 0xac, 0x00, 0xb3, - 0x00, 0x2c, 0xe0, 0x08, 0x30, 0x32, 0xec, 0x08, - 0xb3, 0x00, 0x2c, 0xe0, 0x0b, 0x30, 0x02, 0xca, - 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x01, - 0x1c, 0x00, 0xb7, 0x00, 0x2d, 0xc0, 0x0b, 0x70, - 0x02, 0xdc, 0xc0, 0x84, 0x00, 0x2d, 0xc0, 0x0b, - 0x70, 0x02, 0x90, 0x00, 0xb5, 0x80, 0x20, 0xf0, - 0x89, 0x70, 0x82, 0x0e, 0x28, 0x9f, 0x30, 0xa9, - 0xc8, 0x09, 0x50, 0x02, 0xde, 0x00, 0x83, 0xa0, - 0x29, 0xc0, 0x0b, 0x70, 0x02, 0xbc, 0x80, 0x97, - 0x00, 0x2d, 0xd0, 0xe8, 0x72, 0x02, 0xdc, 0x80, - 0xb7, 0x00, 0x2d, 0xc0, 0x0b, 0x70, 0x02, 0xe8, - 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x08, - 0x1e, 0x00, 0xf7, 0x80, 0x2d, 0xe0, 0x0f, 0x78, - 0x03, 0xfe, 0xc0, 0xc7, 0x80, 0x39, 0xe0, 0x0f, - 0x78, 0x03, 0x92, 0x00, 0xf4, 0x80, 0xed, 0x09, - 0x00, 0x1a, 0x00, 0x35, 0xe0, 0x2d, 0x78, 0x03, - 0x5e, 0x00, 0xf7, 0xa8, 0x21, 0xf4, 0x0f, 0x58, - 0x03, 0xfe, 0x00, 0xc7, 0xe2, 0x39, 0xe0, 0x0f, - 0x7e, 0x03, 0x9e, 0x08, 0xf7, 0x80, 0x3d, 0xe0, - 0x08, 0x7e, 0x03, 0xdf, 0x00, 0xf7, 0x80, 0x2d, - 0xe0, 0x4f, 0x78, 0x23, 0xea, 0x02, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x4d, 0xac, 0x00, 0xfb, - 0x00, 0x3e, 0xc0, 0x0f, 0xb0, 0x03, 0xec, 0x80, - 0xf8, 0x00, 0x3e, 0xc0, 0x0f, 0xb0, 0x03, 0xb0, - 0x00, 0xfd, 0x00, 0x3e, 0xc0, 0x0e, 0xb0, 0x01, - 0xec, 0x00, 0xe3, 0x60, 0xb6, 0xc0, 0x8f, 0x90, - 0x03, 0xec, 0x12, 0xdb, 0x04, 0x3e, 0xc0, 0x8f, - 0xb0, 0x03, 0xac, 0x42, 0xeb, 0x00, 0x36, 0x00, - 0x47, 0xb0, 0x03, 0xec, 0x00, 0xfb, 0x00, 0x3e, - 0x80, 0x0d, 0xb0, 0x03, 0xc2, 0x06, 0x60, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x05, 0xfe, 0x00, 0xff, - 0x80, 0x3f, 0xe0, 0x0f, 0xf8, 0x03, 0xfe, 0x00, - 0xff, 0x80, 0x3f, 0xe4, 0x0f, 0xf1, 0x03, 0xfa, - 0x00, 0xce, 0x80, 0x33, 0xe1, 0x8f, 0xf8, 0x42, - 0x3e, 0x00, 0x6f, 0x80, 0x1b, 0xe0, 0x6c, 0xd9, - 0x03, 0xbc, 0x80, 0xff, 0x80, 0x2f, 0xe4, 0x0e, - 0xf9, 0x03, 0x3e, 0x00, 0xff, 0x88, 0x33, 0xa0, - 0x0f, 0xf9, 0x03, 0x3e, 0x00, 0xff, 0x80, 0x3f, - 0xe0, 0x0d, 0xf8, 0x03, 0xc0, 0x00, 0x70, 0x00, - 0x00, 0x00, 0x00, 0xa8, 0x11, 0x9c, 0x00, 0xb7, - 0x00, 0x2d, 0xc4, 0x0b, 0x50, 0x82, 0xdc, 0x40, - 0xb4, 0x10, 0x2d, 0x40, 0x0b, 0x70, 0x02, 0xf8, - 0x00, 0x8e, 0x10, 0x25, 0xc0, 0x0b, 0x70, 0x02, - 0x5d, 0x88, 0xb7, 0x00, 0x21, 0xc4, 0x08, 0x50, - 0x02, 0x11, 0x40, 0xb7, 0x00, 0x2d, 0xc0, 0x28, - 0x70, 0x03, 0x5c, 0x00, 0xb7, 0x00, 0x21, 0x88, - 0x0b, 0xf0, 0x02, 0x9c, 0x00, 0xf7, 0x00, 0x2d, - 0x40, 0xed, 0x09, 0x00, 0x1b, 0x00, 0x0b, 0x70, - 0x02, 0xea, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x9c, 0x00, 0xb7, 0x00, 0x2d, 0xc0, - 0x0b, 0x60, 0x02, 0xdc, 0x00, 0xb7, 0x00, 0x2d, - 0xc0, 0x1b, 0x51, 0x06, 0x90, 0x02, 0x86, 0x00, - 0x2d, 0x40, 0x0b, 0x10, 0x02, 0x5c, 0x08, 0xa7, - 0x10, 0x29, 0xc2, 0x0a, 0x10, 0x82, 0x9c, 0x40, - 0xb7, 0x00, 0x2f, 0xd1, 0x0a, 0x70, 0x26, 0x9c, - 0x00, 0x97, 0x00, 0x25, 0x80, 0x1b, 0x70, 0x02, - 0x1c, 0x00, 0xb7, 0x10, 0x2d, 0xc0, 0x09, 0x70, - 0x02, 0xc0, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, - 0x20, 0x14, 0xcc, 0x00, 0xb3, 0x00, 0x2c, 0xc0, - 0x0b, 0x34, 0x02, 0xcc, 0x00, 0xb0, 0x00, 0x2c, - 0xc0, 0x0b, 0x38, 0x02, 0xc0, 0x00, 0x82, 0x00, - 0x2c, 0xc0, 0x83, 0x30, 0x02, 0x4d, 0x20, 0xb3, - 0x40, 0x22, 0xe0, 0x08, 0x18, 0x02, 0x80, 0x41, - 0xb3, 0x00, 0x2c, 0x44, 0x28, 0x30, 0x06, 0xcc, - 0x00, 0xbb, 0x02, 0x24, 0x80, 0x0b, 0x3c, 0x0a, - 0x2c, 0x00, 0xb3, 0x00, 0x6c, 0x01, 0x0b, 0x30, - 0x02, 0xc8, 0x04, 0x30, 0x00, 0x00, 0x00, 0x00, - 0xa8, 0x15, 0xac, 0x00, 0xfb, 0x00, 0x3e, 0xc0, - 0x0f, 0xb4, 0x03, 0xfc, 0x00, 0xfb, 0x00, 0x3e, - 0xc0, 0x0f, 0xb8, 0x83, 0xa4, 0x00, 0xc8, 0x00, - 0x3a, 0xc0, 0x8f, 0xb0, 0x0b, 0x2e, 0x00, 0xef, - 0x00, 0x7b, 0xc0, 0x0e, 0xb4, 0x23, 0xac, 0x00, - 0xff, 0x00, 0x3c, 0xd0, 0x8e, 0xf0, 0x02, 0xbc, - 0x00, 0xdf, 0x00, 0x36, 0xc0, 0x0b, 0x78, 0x83, - 0x3c, 0x00, 0xfb, 0x00, 0x3e, 0x00, 0x0d, 0xb0, - 0x03, 0xea, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x00, 0xec, 0x00, 0xfb, 0x00, 0x3e, 0xc1, - 0x0f, 0xb4, 0x03, 0xec, 0x00, 0xf3, 0x40, 0x3e, - 0xc0, 0x07, 0x90, 0x03, 0xf7, 0x00, 0xfd, 0x00, - 0x10, 0x40, 0x0f, 0x90, 0xed, 0x09, 0x00, 0x1c, - 0x00, 0x03, 0xaf, 0x10, 0xbb, 0xa2, 0x7e, 0xc0, - 0x0f, 0xb0, 0x8b, 0x6d, 0x00, 0x7b, 0x00, 0x3e, - 0xc0, 0x0f, 0x30, 0x02, 0x6c, 0x00, 0xdb, 0x00, - 0x3a, 0xd1, 0x0f, 0xb0, 0x83, 0xec, 0x00, 0xeb, - 0x00, 0x2e, 0x00, 0x0d, 0xb0, 0x03, 0xe0, 0x00, - 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x10, 0xfc, - 0x00, 0xff, 0x00, 0x3f, 0xc0, 0x0f, 0xd0, 0x83, - 0x3c, 0x00, 0xff, 0xc0, 0xb1, 0x68, 0x0c, 0xf1, - 0x23, 0xb4, 0x02, 0xcc, 0xc0, 0x33, 0xe0, 0x2c, - 0xf9, 0x03, 0x5a, 0x04, 0xe3, 0x00, 0x32, 0xc0, - 0x0c, 0x70, 0x03, 0x38, 0x00, 0xff, 0x00, 0x37, - 0xd0, 0x0d, 0xb0, 0x03, 0x3c, 0x00, 0xdb, 0x00, - 0x23, 0x88, 0x0f, 0xf0, 0x03, 0xbc, 0x00, 0xcf, - 0x01, 0x3f, 0x44, 0x0e, 0xf0, 0x03, 0xc0, 0x44, - 0x30, 0x00, 0x00, 0x00, 0x00, 0x81, 0x04, 0x6c, - 0x00, 0xbb, 0x00, 0x2e, 0xc0, 0x0b, 0x36, 0x02, - 0x2c, 0x00, 0xbb, 0x00, 0x2a, 0xc0, 0x4d, 0xb8, - 0x02, 0xe5, 0x00, 0xd9, 0x82, 0x22, 0xc0, 0x08, - 0xbc, 0x82, 0xea, 0x02, 0xab, 0x00, 0x22, 0xc0, - 0x4d, 0x90, 0x23, 0xe8, 0x00, 0xbb, 0x00, 0x26, - 0xf0, 0x88, 0xb0, 0x02, 0xec, 0x00, 0xbb, 0x00, - 0x2a, 0xb8, 0x8b, 0xb0, 0x0a, 0x2c, 0x02, 0xab, - 0x00, 0x2e, 0x00, 0x0a, 0xb0, 0x02, 0xe0, 0x40, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x80, 0x05, 0x2c, - 0x00, 0xbb, 0x00, 0x2e, 0xc0, 0x0b, 0xb1, 0x06, - 0x2c, 0x00, 0xb8, 0x00, 0x22, 0xc0, 0x09, 0xb0, - 0x02, 0xc8, 0x20, 0xa0, 0x00, 0x62, 0xc8, 0x08, - 0xb0, 0x02, 0xe8, 0x82, 0xab, 0x02, 0x22, 0xc0, - 0x48, 0xb2, 0x02, 0x2c, 0x00, 0xbb, 0x00, 0x2e, - 0xd0, 0x0b, 0xb0, 0x12, 0x6c, 0x00, 0xbb, 0x04, - 0x6a, 0x80, 0x0b, 0xb0, 0x02, 0x2c, 0x00, 0x8b, - 0x00, 0x2c, 0x80, 0x08, 0xb0, 0x02, 0xe0, 0xed, - 0x09, 0x00, 0x1d, 0x00, 0x00, 0x40, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x04, 0x0c, 0x00, 0xb3, 0x00, - 0x2c, 0xc0, 0x0b, 0x30, 0x0a, 0x0c, 0x00, 0xb0, - 0x00, 0x68, 0xc0, 0x09, 0x38, 0x02, 0xc8, 0x10, - 0xa0, 0x04, 0x20, 0xc0, 0x08, 0x30, 0x02, 0xc8, - 0x00, 0xa3, 0x00, 0x20, 0xc0, 0x0b, 0x30, 0x4a, - 0xc0, 0x00, 0xb3, 0x04, 0x2e, 0xc0, 0x09, 0x30, - 0x00, 0xcc, 0x00, 0xb3, 0x00, 0x28, 0x80, 0x1b, - 0xb0, 0x02, 0x0c, 0x00, 0xa3, 0x00, 0x2c, 0x20, - 0x28, 0x30, 0x02, 0xc2, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x0d, 0x6c, 0x00, 0xbb, 0x00, - 0x3e, 0xc0, 0x0b, 0xb0, 0x03, 0x3c, 0x00, 0xf8, - 0x00, 0x32, 0xc0, 0x0c, 0xb0, 0x03, 0xe0, 0x00, - 0xa8, 0x00, 0x22, 0xc0, 0x4c, 0xb0, 0x03, 0x68, - 0x00, 0xef, 0x00, 0x33, 0xc0, 0x0c, 0xb0, 0x23, - 0x28, 0x00, 0xfb, 0x00, 0x3e, 0xc0, 0x0f, 0xb0, - 0x21, 0x6c, 0x00, 0x7b, 0x00, 0x3a, 0x80, 0x0f, - 0xb0, 0x23, 0x2c, 0x00, 0xcb, 0x00, 0x3e, 0xc0, - 0x0e, 0xb0, 0x03, 0xc0, 0x03, 0x50, 0x00, 0x00, - 0x00, 0x00, 0xa0, 0x1d, 0xfc, 0x00, 0xff, 0x00, - 0x3f, 0xc0, 0x0f, 0xc0, 0x03, 0xfc, 0x00, 0xfc, - 0x00, 0x37, 0x40, 0x8f, 0xc0, 0x07, 0xf0, 0x00, - 0xdc, 0x00, 0x3f, 0x40, 0x0f, 0xc0, 0x22, 0xf0, - 0x00, 0xff, 0x00, 0x3f, 0xc0, 0x0d, 0xf0, 0x03, - 0xb0, 0x00, 0xff, 0x00, 0x35, 0x80, 0x0e, 0xf0, - 0x03, 0xbc, 0x00, 0xff, 0x00, 0x3f, 0x80, 0x1f, - 0xf0, 0x23, 0xfc, 0x08, 0xdf, 0x00, 0x3f, 0x00, - 0x0b, 0xf0, 0x03, 0xe8, 0x06, 0x50, 0x00, 0x00, - 0x00, 0x00, 0xc0, 0x15, 0xfc, 0x00, 0xff, 0x00, - 0x3f, 0xc0, 0x0f, 0xf0, 0x03, 0xfc, 0x00, 0xff, - 0x30, 0x37, 0xc2, 0x0f, 0xf2, 0x33, 0xfc, 0x80, - 0xee, 0x21, 0x3f, 0xc1, 0x0d, 0xf1, 0xa3, 0x5c, - 0x00, 0xcf, 0xed, 0x09, 0x00, 0x1e, 0x00, 0x00, - 0x2f, 0xca, 0x0f, 0xf0, 0x03, 0x3c, 0x20, 0xef, - 0x00, 0x37, 0x10, 0x0c, 0xf0, 0x03, 0xb0, 0x00, - 0xfc, 0x00, 0x31, 0x01, 0x0f, 0xd0, 0x03, 0xbc, - 0x00, 0xef, 0x20, 0x3f, 0xc0, 0x0f, 0xf0, 0x03, - 0xf0, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x10, 0xec, 0x00, 0xbb, 0x00, 0x2e, 0xc0, 0x0b, - 0xb0, 0x02, 0xec, 0x00, 0x37, 0x70, 0x22, 0x90, - 0x0b, 0xa1, 0x12, 0xe8, 0x40, 0x8a, 0x10, 0x2f, - 0xd0, 0x08, 0xb4, 0x12, 0x3c, 0x52, 0x8b, 0x10, - 0x26, 0xd0, 0x0b, 0xf4, 0x02, 0x3c, 0x00, 0xdf, - 0x00, 0x20, 0x00, 0x8a, 0xb4, 0x42, 0xa0, 0x10, - 0xbb, 0x00, 0xa2, 0x00, 0x0b, 0x90, 0x02, 0xed, - 0xa0, 0x8f, 0x40, 0x2e, 0xc0, 0x0b, 0xb0, 0x02, - 0xe0, 0x04, 0x30, 0x00, 0x00, 0x00, 0x00, 0x88, - 0x05, 0xcc, 0x00, 0xb3, 0x00, 0x2c, 0xc0, 0x0b, - 0x30, 0x02, 0xcc, 0x00, 0xb3, 0x01, 0x04, 0x40, - 0x8b, 0x10, 0x20, 0xc4, 0x00, 0xa1, 0x00, 0x2c, - 0xd0, 0x0b, 0x32, 0x06, 0xcc, 0x00, 0x83, 0x00, - 0x2c, 0xc0, 0x0b, 0x34, 0x02, 0x0c, 0x00, 0x83, - 0x02, 0x2c, 0x08, 0x09, 0x34, 0x20, 0x80, 0x00, - 0xb1, 0x00, 0x20, 0x00, 0x1b, 0x10, 0x02, 0xcc, - 0x40, 0x83, 0x40, 0x2c, 0xc0, 0x0b, 0x30, 0x02, - 0xe2, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0xc0, - 0x15, 0xac, 0x00, 0xbb, 0x00, 0x2e, 0xc0, 0x0b, - 0xb0, 0x02, 0xec, 0x04, 0xbb, 0x00, 0x26, 0xc0, - 0x0b, 0xb0, 0x02, 0xec, 0x02, 0xab, 0x00, 0x2e, - 0xc0, 0x18, 0xb0, 0x02, 0x2c, 0x00, 0x8b, 0x00, - 0x26, 0xc0, 0x0b, 0xb0, 0x0a, 0x2c, 0x00, 0x93, - 0x04, 0x22, 0xc0, 0x09, 0xb0, 0x02, 0x20, 0x20, - 0xbb, 0x80, 0x2a, 0xa0, 0x0b, 0x90, 0x02, 0xec, - 0x10, 0x8b, 0x04, 0x6e, 0xc1, 0x0b, 0xb0, 0x02, - 0xf0, 0x04, 0x60, 0x00, 0x00, 0xed, 0x09, 0x00, - 0x1f, 0x00, 0x00, 0x00, 0x40, 0x05, 0xec, 0x00, - 0xfb, 0x00, 0x3e, 0xc0, 0x0f, 0xb0, 0x03, 0xec, - 0x00, 0xfb, 0x00, 0x36, 0xc0, 0x0f, 0xb0, 0x03, - 0xec, 0x00, 0xea, 0x20, 0x3e, 0xc0, 0x0f, 0xb0, - 0x13, 0xec, 0x00, 0xcb, 0x00, 0x3e, 0xc0, 0x0f, - 0xb0, 0x03, 0x2c, 0x00, 0xcb, 0x05, 0x36, 0x10, - 0x0d, 0xb0, 0x03, 0xa7, 0x04, 0xf8, 0x01, 0x32, - 0x08, 0x47, 0x98, 0x03, 0xac, 0x00, 0x6b, 0x00, - 0x3e, 0xc0, 0x0f, 0xb0, 0x03, 0xd0, 0x04, 0x70, - 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0xbc, 0x00, - 0xff, 0x00, 0x3f, 0xc0, 0x0f, 0xf0, 0x03, 0xfc, - 0x00, 0x77, 0x00, 0x3b, 0x80, 0x0f, 0xe0, 0x03, - 0xd8, 0x00, 0xde, 0x00, 0x3d, 0xc0, 0x0f, 0x70, - 0x11, 0xdc, 0x00, 0xff, 0x00, 0x37, 0xc0, 0x4f, - 0xb0, 0x03, 0xec, 0x00, 0xdf, 0x00, 0x3f, 0x28, - 0x0a, 0x30, 0x03, 0xfd, 0x00, 0xf7, 0x00, 0x27, - 0x80, 0x0f, 0xfa, 0x07, 0xfc, 0x00, 0xff, 0x00, - 0x37, 0xc0, 0x0f, 0xf0, 0x63, 0xf8, 0x00, 0x60, - 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0xac, 0x00, - 0xfb, 0x00, 0x3e, 0xc0, 0x0f, 0xb0, 0x03, 0xec, - 0x00, 0xfb, 0x00, 0x32, 0x40, 0x0f, 0x90, 0x03, - 0xe4, 0x00, 0xf9, 0x00, 0x3e, 0xc0, 0x0f, 0xb0, - 0x03, 0xac, 0x00, 0xcb, 0x08, 0x3e, 0xc0, 0x0f, - 0x30, 0x03, 0x0c, 0x00, 0xcb, 0x00, 0x3e, 0xc0, - 0x0c, 0xb0, 0x0b, 0x2e, 0x00, 0xf9, 0x00, 0x32, - 0x10, 0x0c, 0xb0, 0x03, 0xec, 0x04, 0xfb, 0x00, - 0xf6, 0xc0, 0x0f, 0xb0, 0x03, 0x50, 0x04, 0x20, - 0x00, 0x00, 0x00, 0x00, 0xc8, 0x05, 0x2c, 0x00, - 0xbb, 0x00, 0x2e, 0xc0, 0x0b, 0xb0, 0x02, 0xec, - 0x00, 0xbf, 0x04, 0x22, 0xc0, 0x0b, 0xb0, 0x02, - 0xec, 0x00, 0xbb, 0x00, 0x2f, 0xc0, 0x0b, 0xf0, - 0x02, 0xfe, 0x20, 0x8f, 0x20, 0x2f, 0xc0, 0x0b, - 0xed, 0x09, 0x00, 0x20, 0x00, 0xf5, 0x82, 0x3e, - 0x28, 0xaf, 0x00, 0x22, 0xc1, 0x08, 0xfd, 0x02, - 0x2e, 0x50, 0xbb, 0x00, 0x0a, 0x96, 0x0a, 0xb8, - 0x12, 0xfc, 0x18, 0xbf, 0x88, 0x22, 0xc0, 0x0b, - 0xb0, 0x02, 0xf2, 0x00, 0x40, 0x00, 0x00, 0x00, - 0x00, 0xe0, 0x05, 0x4c, 0x00, 0xb3, 0x00, 0x2c, - 0xc0, 0x0b, 0x30, 0x02, 0xcc, 0x00, 0xb3, 0x00, - 0x20, 0xc0, 0x0b, 0x30, 0x02, 0x4c, 0x00, 0xb3, - 0x04, 0x0c, 0xc0, 0x0b, 0x30, 0x02, 0x8c, 0x00, - 0x83, 0x00, 0x2c, 0xc0, 0x0b, 0x38, 0x22, 0x0e, - 0x00, 0x23, 0x01, 0x26, 0x00, 0x09, 0x30, 0x42, - 0x04, 0x00, 0xb0, 0x00, 0x28, 0x00, 0x0b, 0x11, - 0x02, 0x6d, 0x20, 0xb3, 0x80, 0x00, 0xc0, 0x0b, - 0x30, 0x02, 0x78, 0x00, 0x50, 0x00, 0x00, 0x00, - 0x00, 0x20, 0x01, 0x1e, 0x00, 0xb7, 0x80, 0x2d, - 0xe0, 0x0b, 0x78, 0x02, 0xde, 0x00, 0xb7, 0x80, - 0x21, 0xa8, 0x0b, 0x69, 0x02, 0xda, 0x00, 0xb7, - 0x80, 0x2d, 0xe0, 0x0b, 0x78, 0x02, 0xdf, 0x00, - 0x87, 0x80, 0x2d, 0xe0, 0x0b, 0x78, 0x12, 0x1e, - 0x00, 0xa3, 0x90, 0x21, 0xe0, 0x09, 0x78, 0xa2, - 0x1e, 0x00, 0xbf, 0x98, 0x29, 0x20, 0x0b, 0x78, - 0x02, 0xde, 0x00, 0xb3, 0x80, 0x25, 0xe0, 0x0b, - 0x78, 0x02, 0xc8, 0x00, 0x40, 0x00, 0x00, 0x00, - 0x00, 0x48, 0x08, 0x0c, 0x00, 0xf3, 0x00, 0x3c, - 0xc0, 0x0f, 0x30, 0x03, 0xcc, 0x00, 0xf3, 0x00, - 0x30, 0x40, 0x0f, 0x10, 0x03, 0x44, 0x00, 0xf1, - 0x00, 0x3c, 0xc0, 0x0f, 0x30, 0x13, 0x8c, 0xc2, - 0xc3, 0x00, 0x3c, 0xc0, 0x8f, 0x30, 0x03, 0x0c, - 0x00, 0xc3, 0x10, 0x3c, 0x10, 0x8d, 0x31, 0x03, - 0x0c, 0x00, 0xf1, 0x00, 0x38, 0x84, 0x0f, 0x30, - 0x01, 0xcc, 0xa4, 0xf3, 0x00, 0xb0, 0xc0, 0x0f, - 0x30, 0x03, 0x52, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x40, 0x1d, 0xed, 0x09, 0x00, 0x21, 0x00, - 0xbc, 0x00, 0xff, 0x00, 0x3f, 0xc0, 0x0f, 0xf0, - 0x03, 0xfc, 0x00, 0xff, 0x10, 0x3f, 0xc8, 0x0f, - 0xf0, 0x03, 0xfc, 0x00, 0xff, 0x00, 0x3f, 0xd0, - 0x0f, 0xf0, 0x83, 0xfd, 0x44, 0xff, 0x10, 0x37, - 0xc2, 0x0f, 0xf4, 0x0b, 0xfc, 0x00, 0xbf, 0x10, - 0x3f, 0xc4, 0x0e, 0xf0, 0x03, 0xfc, 0x00, 0xf7, - 0x06, 0x3f, 0x84, 0x1e, 0xf1, 0x03, 0xfc, 0x04, - 0xff, 0x00, 0x3b, 0xc0, 0x0f, 0xf0, 0x03, 0xd0, - 0x06, 0x60, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x05, - 0xec, 0x00, 0xfb, 0x00, 0x3e, 0xc0, 0x0f, 0xb0, - 0x03, 0xec, 0x00, 0xfb, 0x08, 0x76, 0xc0, 0x0c, - 0xb8, 0x03, 0x2c, 0x00, 0xfb, 0x00, 0x32, 0xfc, - 0x0c, 0xb0, 0x03, 0xec, 0x80, 0xf3, 0x80, 0xa2, - 0xe0, 0x0c, 0xb2, 0x23, 0x2c, 0x00, 0xfb, 0x90, - 0x3a, 0xe0, 0x0c, 0xb0, 0x03, 0xe4, 0x00, 0xf8, - 0x00, 0x32, 0x80, 0x0b, 0x90, 0x07, 0xec, 0x04, - 0xfb, 0x20, 0x32, 0xc0, 0x0f, 0xb0, 0x03, 0xea, - 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x48, 0x11, - 0x9c, 0x00, 0xb7, 0x00, 0x2d, 0xc0, 0x0b, 0x70, - 0x02, 0xdc, 0x00, 0xb7, 0x20, 0x2d, 0x80, 0x08, - 0x60, 0x02, 0x18, 0x00, 0xb7, 0x04, 0x23, 0xc0, - 0x08, 0x72, 0x02, 0xdd, 0x80, 0xb7, 0x40, 0x21, - 0xc0, 0x08, 0x30, 0x03, 0x5c, 0xc8, 0x37, 0x10, - 0x23, 0xc0, 0x08, 0x74, 0x02, 0xdc, 0x00, 0xb7, - 0x00, 0x29, 0x80, 0x0b, 0x70, 0x02, 0xdd, 0x08, - 0xb7, 0x08, 0x29, 0xc0, 0x0b, 0x70, 0x02, 0xd2, - 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, - 0x9e, 0x00, 0xb7, 0x80, 0x29, 0xe0, 0x0b, 0x78, - 0x02, 0xde, 0x10, 0x37, 0x90, 0x2c, 0x60, 0x88, - 0x18, 0x02, 0x96, 0x00, 0xb1, 0x80, 0x25, 0xe8, - 0x28, 0x7a, 0x02, 0xde, 0x80, 0xb7, 0xa2, 0x20, - 0xe0, 0x08, 0x7b, 0x02, 0x1e, 0xc0, 0xed, 0x09, - 0x00, 0x22, 0x00, 0xb7, 0xa0, 0x29, 0xf0, 0x08, - 0x7a, 0x10, 0x5e, 0x00, 0xb7, 0x80, 0x21, 0xa1, - 0x0b, 0x78, 0x42, 0x5e, 0x08, 0xb3, 0x90, 0x61, - 0xe0, 0x0b, 0x78, 0x02, 0xf0, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x48, 0x14, 0xcc, 0x00, 0xb3, - 0x00, 0x2c, 0xc0, 0x0b, 0x30, 0x02, 0xcc, 0x00, - 0xb3, 0x00, 0x2c, 0xc0, 0x28, 0x30, 0x0a, 0x8c, - 0x00, 0xb3, 0x00, 0xa4, 0xc0, 0x88, 0x30, 0x22, - 0xcc, 0x00, 0xb3, 0x00, 0x20, 0xc0, 0x08, 0x30, - 0x02, 0x4c, 0x00, 0xb3, 0x01, 0x28, 0xd0, 0x08, - 0x30, 0x02, 0xcc, 0x80, 0xb3, 0x00, 0x28, 0xc0, - 0x0b, 0x38, 0x02, 0xcc, 0x00, 0xb3, 0x00, 0x28, - 0xc0, 0x0b, 0x30, 0x02, 0xd2, 0x04, 0x30, 0x00, - 0x00, 0x00, 0x00, 0xe8, 0x15, 0xa8, 0x00, 0xfa, - 0x00, 0x3e, 0x80, 0x0b, 0xa0, 0x03, 0xe8, 0x00, - 0xfa, 0x00, 0x37, 0x80, 0x0c, 0xe0, 0x03, 0x38, - 0x00, 0xfe, 0x00, 0x36, 0x80, 0x0c, 0xa0, 0x03, - 0xe8, 0x00, 0xfa, 0x00, 0x32, 0x80, 0x0c, 0xa0, - 0x03, 0x28, 0x00, 0xfa, 0x04, 0x3b, 0xa0, 0x2c, - 0xa0, 0x03, 0x78, 0x80, 0xf6, 0x89, 0x33, 0x90, - 0x0f, 0xa0, 0x03, 0xe8, 0x10, 0xfa, 0x00, 0x32, - 0x80, 0x0f, 0xa0, 0x03, 0xfa, 0x04, 0x60, 0x00, - 0x00, 0x00, 0x00, 0x48, 0x00, 0xe0, 0x00, 0xf8, - 0x00, 0x3e, 0x00, 0x0f, 0x80, 0x03, 0xe0, 0x00, - 0xb8, 0x00, 0x3e, 0x00, 0x0f, 0x80, 0x01, 0x40, - 0x00, 0xf8, 0x00, 0x3a, 0x00, 0x0f, 0x80, 0x13, - 0xe1, 0x01, 0xf8, 0x00, 0x36, 0x00, 0x2f, 0x80, - 0x43, 0xe0, 0x00, 0xf8, 0x02, 0x32, 0x00, 0x0f, - 0x80, 0x03, 0xe0, 0x00, 0xf8, 0x00, 0x3e, 0x20, - 0x09, 0x81, 0x07, 0xe0, 0x00, 0xf8, 0x00, 0x3e, - 0x00, 0x0d, 0x80, 0x03, 0xd2, 0x00, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x10, 0xe4, 0x00, 0xf9, - 0x00, 0xed, 0x09, 0x00, 0x23, 0x00, 0x3e, 0x40, - 0x0f, 0x90, 0x03, 0xe4, 0x00, 0xf9, 0x01, 0x3c, - 0x40, 0x0d, 0x90, 0x03, 0xe4, 0x00, 0xd1, 0x00, - 0x36, 0x40, 0x0f, 0x90, 0x03, 0x25, 0x00, 0xf9, - 0x00, 0x3e, 0x68, 0x0f, 0x1a, 0x03, 0x24, 0x00, - 0xf9, 0x01, 0x3a, 0x42, 0x0f, 0x1c, 0x03, 0x24, - 0x00, 0xc9, 0x80, 0xb2, 0x60, 0x4f, 0x98, 0x03, - 0xe4, 0x08, 0xf1, 0x00, 0x32, 0x40, 0x05, 0x90, - 0x03, 0xc2, 0x04, 0x30, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x04, 0x64, 0x00, 0xb9, 0x00, 0x2e, 0x40, - 0x0b, 0x90, 0x02, 0xe4, 0x00, 0xb9, 0x00, 0x0e, - 0x50, 0x08, 0x94, 0x00, 0xe4, 0x00, 0xa9, 0x40, - 0x22, 0x40, 0x0b, 0x90, 0x02, 0xa5, 0x00, 0xb9, - 0x00, 0x26, 0x48, 0x0b, 0x98, 0x0a, 0x24, 0x01, - 0xb9, 0x00, 0x2e, 0x40, 0x0b, 0x90, 0x0a, 0x04, - 0x40, 0xa9, 0x80, 0x22, 0x73, 0x0f, 0x98, 0x02, - 0xe7, 0xc8, 0xb9, 0x10, 0x22, 0x40, 0x0b, 0x90, - 0x02, 0xe0, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x18, 0x05, 0x24, 0x00, 0xb9, 0x00, 0x2e, 0x40, - 0x0b, 0x90, 0x02, 0xe4, 0x00, 0xb9, 0x00, 0x2e, - 0x42, 0x09, 0x90, 0x82, 0x64, 0x00, 0xa9, 0x08, - 0x26, 0x40, 0x0b, 0x10, 0x52, 0x25, 0x01, 0xb9, - 0x20, 0x2e, 0x40, 0x0a, 0x90, 0x02, 0x24, 0x40, - 0xb9, 0x00, 0x2e, 0x41, 0x0b, 0x90, 0x02, 0x24, - 0x00, 0xa9, 0x20, 0x02, 0x48, 0x0b, 0x96, 0x02, - 0xe4, 0x04, 0xb9, 0x00, 0x26, 0x40, 0x09, 0x90, - 0x02, 0xc6, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, - 0x08, 0x04, 0x04, 0x00, 0xb1, 0x00, 0x2c, 0x40, - 0x0b, 0x10, 0x02, 0xc4, 0x00, 0xb1, 0x40, 0x2c, - 0x41, 0x08, 0x10, 0x02, 0xc4, 0x00, 0xa1, 0x02, - 0x20, 0x4a, 0x0b, 0x10, 0x02, 0x84, 0xa0, 0xb1, - 0x00, 0x24, 0x40, 0x0b, 0x10, 0x02, 0x04, 0xa0, - 0xb1, 0x40, 0x2c, 0x50, 0xed, 0x09, 0x00, 0x24, - 0x00, 0x0b, 0x10, 0x02, 0x04, 0x08, 0xa9, 0x00, - 0x20, 0x40, 0x4b, 0x10, 0x20, 0xc5, 0x00, 0xb1, - 0x00, 0x84, 0x40, 0x0b, 0x10, 0x02, 0xc2, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0x0c, 0x60, - 0x00, 0xf8, 0x00, 0x3e, 0x00, 0x0f, 0x80, 0x03, - 0xe0, 0x00, 0xf8, 0x00, 0x3e, 0x00, 0x0d, 0x80, - 0x03, 0xe0, 0x00, 0xe8, 0x00, 0x36, 0x1c, 0x0f, - 0x80, 0x01, 0x20, 0x80, 0xf8, 0x00, 0x1e, 0x00, - 0x0f, 0x80, 0x03, 0x20, 0x80, 0xb0, 0x00, 0x7e, - 0x00, 0x0f, 0x80, 0x03, 0x28, 0x00, 0xe8, 0x00, - 0x32, 0x00, 0x0f, 0x80, 0x03, 0xe0, 0x00, 0xf8, - 0x02, 0x36, 0x00, 0x0d, 0x80, 0x03, 0xee, 0x03, - 0x50, 0x00, 0x00, 0x00, 0x00, 0x98, 0x1d, 0xa4, - 0x00, 0xf9, 0x00, 0x3e, 0x40, 0x0f, 0x90, 0x03, - 0xe4, 0x00, 0xf9, 0x40, 0x3f, 0x50, 0x0f, 0xd4, - 0x03, 0xf5, 0x00, 0xfd, 0x40, 0x3e, 0x40, 0x0b, - 0x96, 0x93, 0xe4, 0x00, 0xf9, 0x40, 0x3e, 0x50, - 0x0f, 0x94, 0x03, 0xe4, 0x08, 0xf9, 0x40, 0x3f, - 0x40, 0x05, 0x94, 0x03, 0xf4, 0x00, 0xf5, 0x42, - 0x3f, 0x40, 0x0e, 0xd0, 0x03, 0xe5, 0x00, 0xd9, - 0x40, 0x3a, 0x40, 0x0f, 0x90, 0x03, 0xe6, 0x06, - 0x70, 0x00, 0x00, 0x00, 0x00, 0x18, 0x05, 0xe4, - 0x00, 0xf9, 0x00, 0x3e, 0x40, 0x0f, 0x90, 0x03, - 0xe4, 0x00, 0xf9, 0x28, 0x3e, 0x48, 0x0f, 0x90, - 0x13, 0xe4, 0x04, 0xf9, 0x00, 0x26, 0x4c, 0x0e, - 0x92, 0x83, 0xf4, 0x02, 0xc5, 0x02, 0x3d, 0x40, - 0x0c, 0xd0, 0x03, 0x34, 0x80, 0xf9, 0x28, 0x34, - 0x44, 0x0f, 0xd0, 0x03, 0xf4, 0x00, 0xcd, 0x00, - 0x33, 0xc1, 0x0b, 0xd0, 0x03, 0x74, 0xc0, 0xfd, - 0x00, 0x3e, 0x40, 0x0f, 0x90, 0x03, 0xc6, 0x05, - 0x30, 0x00, 0x00, 0x00, 0x00, 0x38, 0x10, 0xe0, - 0x00, 0xb8, 0x00, 0x2e, 0x00, 0x0b, 0x80, 0xed, - 0x09, 0x00, 0x25, 0x00, 0x02, 0xe0, 0x00, 0xb8, - 0x20, 0x2e, 0x04, 0x0b, 0x84, 0x02, 0xe0, 0x00, - 0xbc, 0x10, 0x22, 0x0c, 0x08, 0x80, 0x82, 0xe0, - 0x10, 0x88, 0x40, 0x2e, 0x00, 0x8c, 0x81, 0x02, - 0xa0, 0x40, 0xb8, 0x20, 0x22, 0x08, 0x0b, 0x84, - 0x02, 0xe0, 0x10, 0xd8, 0x11, 0x36, 0x00, 0x0b, - 0x80, 0x42, 0xe0, 0xd0, 0xb8, 0x40, 0x2e, 0x00, - 0x0b, 0x80, 0x02, 0xce, 0x00, 0x30, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x05, 0xc4, 0x00, 0xb1, 0x00, - 0x2c, 0x40, 0x0b, 0x10, 0x02, 0xc4, 0x00, 0xb1, - 0x28, 0x2d, 0x60, 0x09, 0x59, 0x02, 0xd6, 0x40, - 0xb5, 0x00, 0x24, 0x48, 0x0a, 0x12, 0x02, 0xc4, - 0x40, 0x81, 0x10, 0x2c, 0x44, 0x09, 0x10, 0x12, - 0x04, 0x00, 0xb1, 0x28, 0x2c, 0x48, 0x09, 0x11, - 0x42, 0xc4, 0x00, 0x91, 0x00, 0x28, 0x40, 0x09, - 0x10, 0x02, 0xc4, 0x80, 0xb1, 0x10, 0x2c, 0x40, - 0x0b, 0x10, 0x02, 0xc2, 0x01, 0x30, 0x00, 0x00, - 0x00, 0x00, 0x18, 0x15, 0xa4, 0x00, 0xb9, 0x00, - 0x2e, 0x40, 0x0b, 0x90, 0x02, 0xe4, 0x00, 0xb9, - 0x02, 0x2e, 0x40, 0x8b, 0xd0, 0x02, 0xf4, 0x00, - 0xbd, 0x00, 0x02, 0x40, 0x08, 0x90, 0x02, 0xe4, - 0x00, 0xab, 0x02, 0x2e, 0x40, 0x28, 0x90, 0x02, - 0xa4, 0x00, 0xb9, 0x02, 0x2a, 0x48, 0x0b, 0x90, - 0x42, 0xec, 0x40, 0x9b, 0x04, 0x2e, 0x46, 0x0b, - 0x90, 0x02, 0xe4, 0x04, 0xb9, 0x00, 0x2e, 0x40, - 0x0b, 0x90, 0x02, 0xc6, 0x00, 0x60, 0x00, 0x00, - 0x00, 0x00, 0xa0, 0x15, 0xe4, 0x00, 0xf9, 0x00, - 0x3e, 0x40, 0x0b, 0x90, 0x03, 0xe4, 0x00, 0xf9, - 0x00, 0x3e, 0x54, 0x0d, 0x94, 0x03, 0xe5, 0x00, - 0xf9, 0x22, 0x36, 0x40, 0x0e, 0x90, 0x03, 0xe4, - 0x08, 0xc9, 0x00, 0x3e, 0x40, 0x0c, 0x90, 0x0b, - 0x24, 0x00, 0xf9, 0x00, 0x3e, 0x78, 0x09, 0x90, - 0x03, 0xe4, 0xed, 0x09, 0x00, 0x26, 0x00, 0x00, - 0xd9, 0xda, 0x3a, 0x40, 0x1d, 0x91, 0x03, 0xe4, - 0x09, 0xf9, 0x00, 0x1e, 0x40, 0x07, 0x90, 0x03, - 0xe8, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x28, - 0x01, 0xa4, 0x00, 0xf9, 0x00, 0x3e, 0x40, 0x0f, - 0x90, 0x03, 0xe4, 0x00, 0xf9, 0x00, 0x3e, 0x40, - 0x0f, 0x92, 0x03, 0xe4, 0x80, 0xf9, 0x20, 0x36, - 0x40, 0x4f, 0x90, 0x03, 0xe4, 0x02, 0x99, 0x00, - 0x3c, 0x42, 0x0e, 0x90, 0x03, 0x64, 0x00, 0xf9, - 0x00, 0x32, 0x40, 0x5f, 0x90, 0x42, 0xe6, 0x20, - 0xf9, 0x00, 0x36, 0x40, 0x0f, 0x98, 0x03, 0xe4, - 0x00, 0xf9, 0x00, 0x3e, 0x40, 0x0f, 0x90, 0x03, - 0xca, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x28, - 0x10, 0xa0, 0x00, 0xe8, 0x00, 0x3e, 0x00, 0x0f, - 0x80, 0x03, 0xe0, 0x00, 0xf8, 0x00, 0x32, 0x01, - 0x0f, 0x80, 0x43, 0x60, 0x00, 0xc8, 0x00, 0x3c, - 0x00, 0x0f, 0x80, 0x03, 0xa2, 0x00, 0xd8, 0x00, - 0x32, 0x00, 0x0c, 0x80, 0x03, 0x20, 0x00, 0xd0, - 0x00, 0x3a, 0x00, 0x4f, 0x81, 0x03, 0xe0, 0x00, - 0xf8, 0x08, 0x3a, 0x34, 0x0f, 0x80, 0x13, 0x20, - 0x42, 0xc8, 0x02, 0x3e, 0x00, 0x0f, 0x80, 0x03, - 0xca, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x28, - 0x05, 0x28, 0x00, 0xba, 0x00, 0x2e, 0x80, 0x0b, - 0xa0, 0x02, 0xe8, 0x00, 0xba, 0x00, 0x22, 0x80, - 0x0b, 0xa0, 0x03, 0x29, 0x40, 0x82, 0x00, 0x26, - 0x80, 0x0b, 0xa0, 0x03, 0x99, 0x02, 0x0e, 0x40, - 0x2b, 0x90, 0x08, 0x60, 0x02, 0xaa, 0x00, 0xaa, - 0x00, 0x2a, 0x81, 0x0a, 0xec, 0x03, 0x99, 0x80, - 0xb6, 0x48, 0x23, 0x90, 0x0b, 0xe8, 0x02, 0xb8, - 0x00, 0x8a, 0xa0, 0x2e, 0x80, 0x0b, 0xa0, 0x02, - 0x4a, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x28, - 0x05, 0x4c, 0x00, 0xa3, 0x00, 0x2c, 0xc0, 0x0b, - 0x30, 0x02, 0xcc, 0x00, 0xb3, 0xed, 0x09, 0x00, - 0x27, 0x00, 0x00, 0xa0, 0xc0, 0x0a, 0x38, 0x02, - 0x0f, 0x00, 0x83, 0x00, 0x24, 0xc0, 0x0b, 0x30, - 0x02, 0x88, 0x00, 0x83, 0x48, 0x28, 0xe0, 0x08, - 0x39, 0x02, 0x8c, 0x00, 0x93, 0x00, 0x28, 0xc0, - 0x00, 0x30, 0x82, 0x0d, 0x00, 0xb3, 0xc0, 0x68, - 0xc0, 0x0b, 0x30, 0x02, 0x0f, 0x24, 0x03, 0x80, - 0x2c, 0xc0, 0x0b, 0x30, 0x02, 0xca, 0x04, 0x50, - 0x00, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x1c, 0x00, - 0xb7, 0x00, 0x2d, 0xc0, 0x0b, 0x70, 0x02, 0xdc, - 0x00, 0xb7, 0x80, 0x21, 0xc0, 0x0b, 0x7c, 0x02, - 0x1f, 0x00, 0x87, 0x00, 0x6d, 0xc0, 0x0b, 0x70, - 0x02, 0x90, 0x00, 0x87, 0x88, 0x29, 0xc2, 0x08, - 0x70, 0x02, 0x8f, 0x00, 0x13, 0x20, 0x2b, 0xe0, - 0x0a, 0x70, 0x12, 0x9c, 0x00, 0x93, 0x01, 0x29, - 0xc0, 0x1b, 0x7c, 0x02, 0x8e, 0x00, 0x87, 0x00, - 0x2d, 0xc0, 0x4b, 0x70, 0x02, 0xe8, 0x00, 0x40, - 0x00, 0x00, 0x00, 0x00, 0xa8, 0x08, 0x1e, 0x00, - 0xe7, 0x80, 0x2d, 0xe0, 0x0f, 0x78, 0x03, 0xde, - 0x00, 0xff, 0x80, 0x21, 0xa0, 0x0f, 0x28, 0x0b, - 0x0e, 0x02, 0xc6, 0x80, 0x3d, 0xe0, 0x0f, 0x7f, - 0x03, 0x82, 0x00, 0xd7, 0x82, 0x29, 0xe0, 0x2c, - 0x38, 0x03, 0x9e, 0x00, 0xd7, 0xb4, 0x39, 0xf2, - 0x0f, 0x78, 0x03, 0x9e, 0x00, 0xf7, 0x80, 0x39, - 0xe0, 0x0b, 0x78, 0x03, 0x1e, 0x10, 0xc7, 0x80, - 0x3d, 0xe0, 0x0f, 0x78, 0x03, 0xea, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x08, 0x1d, 0xac, 0x00, - 0xfb, 0x00, 0x3e, 0xc0, 0x0f, 0xb0, 0x03, 0xec, - 0x00, 0xfb, 0x30, 0x3e, 0x80, 0x03, 0xa0, 0x03, - 0xac, 0x00, 0xfa, 0x00, 0x36, 0xc4, 0x0f, 0xb0, - 0x03, 0xe0, 0x04, 0x5b, 0x02, 0x3e, 0xc0, 0x0f, - 0xb0, 0x03, 0xec, 0x00, 0xeb, 0x10, 0x36, 0xd0, - 0x0f, 0xb0, 0x03, 0xac, 0x00, 0xfb, 0x04, 0x36, - 0xed, 0x09, 0x00, 0x28, 0x00, 0x80, 0x5f, 0x10, - 0x03, 0xe8, 0x00, 0xf9, 0x00, 0x3e, 0xc0, 0x0f, - 0xb0, 0x03, 0x42, 0x06, 0x60, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x05, 0xfe, 0x00, 0xff, 0x80, 0x3f, - 0xe0, 0x0f, 0xf8, 0x03, 0xfe, 0x00, 0xff, 0xc0, - 0x73, 0xe4, 0x0e, 0xd2, 0x43, 0xb2, 0x00, 0xf7, - 0x80, 0x13, 0xe0, 0x0c, 0xf8, 0x03, 0xba, 0x00, - 0x7e, 0xa0, 0x3f, 0xe0, 0x0c, 0xf8, 0x03, 0x3c, - 0x80, 0xdf, 0x80, 0x39, 0xe0, 0x2c, 0x78, 0x03, - 0x7e, 0x40, 0xe7, 0x80, 0x3b, 0xa0, 0x8f, 0xf8, - 0x03, 0xbe, 0x00, 0xc7, 0x80, 0x33, 0xe0, 0x0f, - 0xf8, 0x03, 0xc0, 0x00, 0x70, 0x00, 0x00, 0x00, - 0x00, 0xa8, 0x11, 0x9c, 0x00, 0xb7, 0x00, 0x2d, - 0xc0, 0x0b, 0x70, 0x02, 0xdc, 0x00, 0xb7, 0x00, - 0xa1, 0xc0, 0x0d, 0x52, 0x02, 0x10, 0x00, 0xb7, - 0x00, 0x35, 0xc0, 0x08, 0x70, 0x03, 0x50, 0x40, - 0xb4, 0x00, 0x2d, 0xc8, 0x0a, 0x52, 0x0a, 0x14, - 0x40, 0xdf, 0x12, 0x21, 0xc0, 0x0d, 0x60, 0x03, - 0x58, 0x00, 0xd7, 0x00, 0x3d, 0x80, 0x4b, 0x72, - 0x03, 0x9c, 0x40, 0xa7, 0x00, 0x29, 0xc0, 0x0f, - 0x70, 0x03, 0xea, 0x04, 0x60, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x9c, 0x00, 0xb7, 0x00, 0x2d, - 0xc0, 0x0b, 0x70, 0x02, 0xdc, 0x00, 0xb3, 0x00, - 0x20, 0x80, 0x4a, 0x01, 0x22, 0x90, 0x00, 0xbe, - 0x00, 0x20, 0xc0, 0x08, 0x70, 0x02, 0x90, 0x00, - 0xb6, 0x22, 0x2d, 0x00, 0x00, 0x70, 0x40, 0x0c, - 0x02, 0x87, 0x00, 0x2b, 0xc0, 0x0a, 0x50, 0x02, - 0x34, 0x08, 0x9d, 0x10, 0x21, 0x00, 0x0b, 0x70, - 0x22, 0x5c, 0x00, 0x87, 0x00, 0x29, 0xc0, 0x0b, - 0x70, 0x02, 0xc0, 0x00, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x20, 0x14, 0xcc, 0x00, 0xb3, 0x00, 0x2c, - 0xc0, 0x0b, 0x30, 0x02, 0xcc, 0x00, 0xb3, 0x00, - 0x20, 0x92, 0x08, 0xed, 0x09, 0x00, 0x29, 0x00, - 0x02, 0x02, 0x00, 0x80, 0xb2, 0x00, 0x24, 0xc0, - 0x28, 0xb0, 0x02, 0x00, 0x00, 0xb0, 0x00, 0x2c, - 0x00, 0x08, 0x10, 0x02, 0x04, 0x00, 0x83, 0x00, - 0x20, 0xe2, 0x0a, 0x00, 0x02, 0x42, 0x08, 0x91, - 0xa0, 0x24, 0x39, 0x0b, 0x18, 0x02, 0x84, 0x00, - 0xa1, 0x00, 0x28, 0xc0, 0x0a, 0x30, 0x02, 0x88, - 0x04, 0x10, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x15, - 0xac, 0x00, 0xfb, 0x00, 0x3e, 0xc0, 0x0f, 0xb0, - 0x03, 0xec, 0x00, 0xff, 0x00, 0x32, 0x60, 0x0a, - 0xb8, 0x03, 0xae, 0x00, 0xf9, 0x80, 0x33, 0xc0, - 0x0c, 0xf0, 0x02, 0xa4, 0x00, 0xfb, 0x00, 0x3c, - 0x00, 0x0c, 0xb0, 0x03, 0x0c, 0x00, 0x8f, 0x00, - 0x3b, 0xc2, 0x0a, 0xb0, 0x03, 0x2e, 0x00, 0x9b, - 0x48, 0x20, 0xa8, 0x9f, 0xb8, 0x25, 0xe0, 0x00, - 0xcb, 0x00, 0x3a, 0xc0, 0x0b, 0xb0, 0x02, 0xea, - 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, - 0xec, 0x00, 0xfb, 0x00, 0x3e, 0xc0, 0x0f, 0xb0, - 0x03, 0xec, 0x00, 0xfb, 0x00, 0x3c, 0x60, 0x0f, - 0xb8, 0x03, 0xee, 0x00, 0xf9, 0x80, 0x3e, 0xc0, - 0x0f, 0xb0, 0x03, 0xe0, 0x00, 0xfa, 0x40, 0x3e, - 0x00, 0x2f, 0xa0, 0x07, 0xec, 0x00, 0xfb, 0x00, - 0x3e, 0xc0, 0x0d, 0x90, 0x03, 0xe4, 0x40, 0xf9, - 0x00, 0x2e, 0x80, 0x4f, 0xb5, 0x03, 0xe0, 0x00, - 0xf3, 0x00, 0x1e, 0xc0, 0x0f, 0xb0, 0x03, 0x60, - 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x10, - 0xfc, 0x00, 0xff, 0x00, 0x3f, 0xc0, 0x0f, 0xf0, - 0x03, 0xfc, 0x00, 0xff, 0x00, 0x3f, 0x04, 0x0c, - 0x60, 0x03, 0x3c, 0x00, 0xfc, 0x80, 0x3f, 0xc0, - 0x0f, 0xb0, 0x03, 0x36, 0x00, 0xf5, 0xc0, 0x36, - 0x05, 0x4e, 0x94, 0x23, 0x36, 0x08, 0xd7, 0x00, - 0x37, 0xc0, 0x0c, 0xf0, 0x03, 0x78, 0x40, 0xef, - 0x80, 0x3f, 0xa0, 0x0c, 0xec, 0x03, 0xed, 0x09, - 0x00, 0x2a, 0x00, 0x24, 0x00, 0xdf, 0x00, 0x33, - 0xc0, 0x05, 0xf0, 0x03, 0xc0, 0x44, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x81, 0x04, 0x6c, 0x00, 0xbb, - 0x00, 0x2e, 0xc0, 0x0b, 0xb0, 0x02, 0xec, 0x00, - 0xbb, 0x00, 0x2e, 0x00, 0x08, 0xa0, 0x02, 0xac, - 0x00, 0xb8, 0x80, 0x26, 0xc0, 0x09, 0xb0, 0x02, - 0xa2, 0x60, 0xb8, 0x81, 0x22, 0x32, 0x2a, 0x04, - 0xd2, 0x24, 0x00, 0xab, 0x00, 0x2a, 0xc0, 0x0a, - 0x10, 0x02, 0x23, 0x00, 0xb9, 0x40, 0x2e, 0xa6, - 0x08, 0x04, 0x82, 0x23, 0x04, 0x99, 0x90, 0x22, - 0xc0, 0x0b, 0xb0, 0x02, 0xe0, 0x40, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x05, 0x2c, 0x00, 0xbb, - 0x00, 0x2e, 0xc0, 0x0b, 0xb0, 0x02, 0xec, 0x00, - 0xbb, 0x00, 0x2e, 0x40, 0x08, 0x90, 0x02, 0x60, - 0x00, 0xb9, 0x20, 0x2a, 0xc0, 0x0b, 0xb0, 0x02, - 0x20, 0x00, 0xba, 0x00, 0x26, 0x00, 0x48, 0xb0, - 0x02, 0x2c, 0x80, 0x9b, 0x00, 0x24, 0xc0, 0x08, - 0xb1, 0x02, 0x2c, 0x00, 0xba, 0x10, 0x2e, 0x80, - 0x08, 0x90, 0x02, 0x22, 0x24, 0xb9, 0x00, 0x22, - 0xc0, 0x09, 0xb0, 0x02, 0xe0, 0x00, 0x40, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x04, 0x0c, 0x00, 0xb3, - 0x00, 0x2c, 0xc0, 0x0b, 0x30, 0x02, 0xcc, 0x00, - 0xb3, 0x00, 0x2c, 0x40, 0x28, 0x10, 0x02, 0xc0, - 0x00, 0xb1, 0x00, 0x24, 0xc0, 0x09, 0x30, 0x02, - 0x80, 0x00, 0xb0, 0x00, 0x20, 0x00, 0x0a, 0x00, - 0x0a, 0x84, 0x00, 0x83, 0x00, 0x20, 0xc0, 0x08, - 0x00, 0x0a, 0x40, 0x00, 0xb0, 0x04, 0x2e, 0x00, - 0x18, 0x90, 0x02, 0x80, 0x00, 0x91, 0x00, 0xa0, - 0xc0, 0x0b, 0x30, 0x00, 0xc2, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x0d, 0x6c, 0x00, 0xfb, - 0x00, 0x3e, 0xc0, 0x0f, 0xb0, 0x03, 0xec, 0x00, - 0xff, 0x00, 0x3e, 0x00, 0x0c, 0x80, 0x03, 0x60, - 0x00, 0xed, 0x09, 0x00, 0x2b, 0x00, 0xf8, 0x00, - 0x3a, 0xc0, 0x0f, 0xf0, 0x03, 0x24, 0x00, 0xf8, - 0x00, 0x36, 0x00, 0x0c, 0x90, 0x03, 0x24, 0x08, - 0xdf, 0x00, 0x37, 0xc0, 0x0c, 0x90, 0x03, 0x60, - 0x00, 0xf8, 0x00, 0x3e, 0x01, 0x0c, 0x80, 0x0b, - 0x24, 0x00, 0xd9, 0x00, 0x32, 0xc0, 0x0d, 0xb0, - 0x03, 0xc0, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00, - 0xa0, 0x0d, 0xfc, 0x00, 0xff, 0x00, 0x3f, 0xc0, - 0x0f, 0xf0, 0x03, 0xfc, 0x00, 0xff, 0x00, 0x3f, - 0x00, 0x0f, 0xc0, 0x03, 0xb0, 0x00, 0xfc, 0x00, - 0x3f, 0xc0, 0x0f, 0xf0, 0x02, 0xf0, 0x00, 0xfc, - 0x02, 0x3f, 0x00, 0x0d, 0xc0, 0x03, 0x74, 0x00, - 0xef, 0x00, 0x3f, 0xc0, 0x0f, 0xc0, 0x13, 0x90, - 0x00, 0x7c, 0x02, 0x0f, 0x00, 0x07, 0x40, 0x03, - 0x74, 0x00, 0xdd, 0x00, 0x3f, 0xc0, 0x0f, 0xf0, - 0x03, 0xe8, 0x06, 0x70, 0x00, 0x00, 0x00, 0x00, - 0xc0, 0x05, 0xfc, 0x00, 0xdf, 0x00, 0x3f, 0x40, - 0x0c, 0xd0, 0x03, 0x7c, 0x00, 0xcd, 0x00, 0x3f, - 0x22, 0x0e, 0xf4, 0x03, 0x3d, 0x80, 0xcf, 0x00, - 0x37, 0x00, 0x0c, 0xf0, 0x03, 0xf5, 0x10, 0xed, - 0x00, 0x3b, 0xda, 0x0c, 0xf0, 0x03, 0xfc, 0x80, - 0xcc, 0x00, 0xb3, 0x40, 0x0d, 0x70, 0x03, 0xfc, - 0x00, 0xfc, 0x40, 0x3f, 0xc0, 0x0f, 0xf0, 0x03, - 0xfc, 0x00, 0xef, 0x00, 0x3f, 0xd0, 0x0f, 0xf0, - 0x03, 0xf0, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x10, 0xec, 0x00, 0xbb, 0x00, 0x2e, 0x56, - 0x28, 0xb2, 0x82, 0x2e, 0xa0, 0x8b, 0x00, 0x2e, - 0x00, 0x48, 0xb8, 0x02, 0x29, 0x80, 0x8b, 0x40, - 0x2e, 0xc0, 0x0d, 0xf4, 0x02, 0xec, 0x00, 0x8b, - 0x00, 0x21, 0xf0, 0x08, 0xf4, 0x02, 0xfd, 0x00, - 0xa9, 0x00, 0x22, 0x00, 0x0a, 0x90, 0x02, 0xed, - 0x40, 0xba, 0x20, 0x2e, 0xc0, 0x0b, 0xb0, 0x12, - 0xec, 0x00, 0xbb, 0x00, 0xed, 0x09, 0x00, 0x2c, - 0x00, 0x2e, 0xc0, 0x0b, 0xb0, 0x02, 0xe0, 0x04, - 0x30, 0x00, 0x00, 0x00, 0x00, 0x88, 0x05, 0xcc, - 0x00, 0xb3, 0x00, 0x2c, 0x89, 0x28, 0x90, 0x02, - 0x4c, 0x80, 0x83, 0x00, 0x2c, 0x20, 0x08, 0x30, - 0x02, 0x8f, 0x00, 0x82, 0x40, 0x2e, 0xc0, 0x08, - 0x34, 0x02, 0xec, 0x80, 0x83, 0x00, 0x28, 0xc8, - 0x08, 0x34, 0x02, 0x4c, 0x40, 0xa0, 0x00, 0xa0, - 0x00, 0x4a, 0x30, 0x02, 0xcc, 0x10, 0xb2, 0x20, - 0x2c, 0xc0, 0x0b, 0x30, 0x02, 0x0c, 0x00, 0xb3, - 0x00, 0x2c, 0xc8, 0x0b, 0x30, 0x02, 0xe2, 0x01, - 0x70, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x15, 0xac, - 0x00, 0xbb, 0x00, 0x2e, 0x82, 0x08, 0xb2, 0x02, - 0x2c, 0x02, 0x89, 0x00, 0x2e, 0x00, 0x08, 0x30, - 0x02, 0xac, 0x08, 0x8b, 0x88, 0x2e, 0xc8, 0x09, - 0xb0, 0x02, 0xee, 0x06, 0x8b, 0x00, 0x22, 0xc0, - 0x08, 0xb0, 0x02, 0xec, 0x04, 0xa8, 0x80, 0xa2, - 0x30, 0x0a, 0xb0, 0x02, 0xec, 0x00, 0xba, 0x00, - 0x2e, 0xc0, 0x0b, 0xb0, 0x02, 0xec, 0x00, 0xbb, - 0x00, 0x2e, 0xc0, 0x0b, 0xb0, 0x02, 0xf0, 0x04, - 0x60, 0x00, 0x00, 0x00, 0x00, 0x40, 0x15, 0xec, - 0x00, 0xdb, 0x00, 0x3e, 0x94, 0x0c, 0x92, 0x0b, - 0x4c, 0x00, 0xcb, 0x80, 0x3e, 0x80, 0x0e, 0xb0, - 0x07, 0xa6, 0x00, 0xcb, 0xc4, 0x3e, 0xd0, 0x4c, - 0xb0, 0x03, 0xcc, 0x00, 0xeb, 0x90, 0x3a, 0xc0, - 0x0c, 0xb0, 0x01, 0x6c, 0x00, 0x69, 0xa0, 0x22, - 0x10, 0x0d, 0xb9, 0x83, 0xec, 0x04, 0xfb, 0x02, - 0x3e, 0xc0, 0x0f, 0xb0, 0x03, 0xec, 0x00, 0xeb, - 0x00, 0x3e, 0xc0, 0x07, 0xb0, 0x03, 0xd0, 0x04, - 0x70, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0xbc, - 0x00, 0xff, 0x00, 0x3e, 0xa0, 0x0f, 0xf8, 0x83, - 0xfc, 0x20, 0xff, 0x90, 0x3d, 0x80, 0x0f, 0xf0, - 0x03, 0x5e, 0x40, 0xff, 0x00, 0x3f, 0x40, 0xed, - 0x09, 0x00, 0x2d, 0x00, 0x0b, 0xf0, 0x23, 0xfc, - 0x00, 0xfd, 0x81, 0x3f, 0xc0, 0x0f, 0xf0, 0x03, - 0xfc, 0x00, 0xf9, 0x00, 0x35, 0x40, 0xcf, 0xe0, - 0x03, 0xfc, 0x00, 0xbf, 0x00, 0x3f, 0xc1, 0x8f, - 0xf0, 0x03, 0xfc, 0x00, 0xff, 0x00, 0x3f, 0xc0, - 0x0f, 0xf0, 0x03, 0xf8, 0x00, 0x60, 0x00, 0x00, - 0x00, 0x00, 0x40, 0x10, 0xac, 0x00, 0xfb, 0x00, - 0x7e, 0xc4, 0x0c, 0x90, 0x0b, 0x2c, 0x00, 0xfb, - 0x00, 0x3f, 0x00, 0x0c, 0xb0, 0x03, 0x2c, 0x00, - 0xeb, 0x44, 0x3e, 0xc0, 0x0f, 0xb0, 0x03, 0xe4, - 0x02, 0xeb, 0x00, 0xb2, 0xe0, 0x0c, 0xb0, 0x0b, - 0xae, 0x00, 0xf9, 0x01, 0x36, 0x18, 0x2e, 0xb4, - 0x83, 0x6c, 0x00, 0xfa, 0x00, 0x32, 0xc0, 0x0f, - 0xb0, 0x03, 0xac, 0x00, 0xfb, 0x00, 0x3e, 0xc6, - 0x0c, 0xb0, 0x03, 0xd0, 0x04, 0x20, 0x00, 0x00, - 0x00, 0x00, 0xc8, 0x05, 0x2c, 0x00, 0xbb, 0x00, - 0x2e, 0xd0, 0x08, 0x34, 0x02, 0x2d, 0x01, 0xbb, - 0x50, 0x2e, 0x21, 0x08, 0xb8, 0x03, 0x6c, 0x10, - 0x8b, 0x20, 0x24, 0xc3, 0x0e, 0xfa, 0x02, 0xec, - 0x00, 0x8b, 0x50, 0x3f, 0xc0, 0x08, 0xf8, 0x02, - 0x1c, 0x00, 0xb9, 0x80, 0x22, 0x70, 0x08, 0xbc, - 0x02, 0x3c, 0x00, 0xba, 0x20, 0x37, 0xc0, 0x0b, - 0xb0, 0x02, 0xec, 0x00, 0xbb, 0x00, 0x2e, 0xd0, - 0x28, 0xb0, 0x02, 0xf2, 0x00, 0x40, 0x00, 0x00, - 0x00, 0x00, 0xe0, 0x05, 0x4c, 0x00, 0xb3, 0x00, - 0x2e, 0x72, 0x28, 0x30, 0x02, 0x8d, 0x00, 0xb3, - 0xc0, 0x2c, 0x44, 0x08, 0x31, 0x00, 0x0c, 0x20, - 0x91, 0x00, 0x2c, 0xe0, 0x0b, 0x30, 0x16, 0xcc, - 0x00, 0x8b, 0x40, 0x22, 0xc1, 0x08, 0x30, 0x42, - 0x0c, 0x00, 0x3a, 0x00, 0xa0, 0x70, 0x89, 0x3c, - 0x02, 0x4c, 0x00, 0xb0, 0x48, 0x28, 0xc8, 0x0b, - 0x30, 0x02, 0x8c, 0x00, 0xa3, 0x00, 0x28, 0xe0, - 0x0a, 0x30, 0xed, 0x09, 0x00, 0x2e, 0x00, 0x02, - 0xf8, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x20, - 0x01, 0x1e, 0x00, 0xb7, 0x80, 0x2d, 0x60, 0x28, - 0x78, 0x02, 0x9e, 0x01, 0xb7, 0x80, 0x2c, 0x60, - 0x08, 0x7c, 0x42, 0x0e, 0xe0, 0x87, 0x84, 0x25, - 0xe0, 0x1a, 0x78, 0x42, 0xd6, 0x00, 0x87, 0x88, - 0xad, 0xe0, 0x08, 0x38, 0x82, 0x1e, 0x00, 0xb5, - 0xc0, 0x20, 0x20, 0x28, 0x78, 0x82, 0x1e, 0x00, - 0x96, 0x84, 0x2d, 0xe6, 0x0b, 0x78, 0x02, 0xde, - 0x00, 0x37, 0x80, 0x2d, 0xe0, 0x1a, 0x78, 0x06, - 0xc8, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x48, - 0x08, 0x0c, 0x00, 0xf3, 0x00, 0x2c, 0x40, 0x0c, - 0xb0, 0x03, 0x8c, 0x00, 0xb3, 0x08, 0x3c, 0x40, - 0x0c, 0xb0, 0x02, 0x0c, 0xc0, 0xe1, 0x00, 0x3c, - 0x40, 0x0f, 0x30, 0x03, 0xec, 0x00, 0xc1, 0x00, - 0x30, 0xc0, 0x0c, 0x30, 0x02, 0x0c, 0x00, 0xf0, - 0x08, 0x30, 0x82, 0x0f, 0x30, 0x03, 0x4c, 0x00, - 0xfa, 0x10, 0x38, 0xc0, 0x0f, 0x30, 0x03, 0x8c, - 0x00, 0xf3, 0x00, 0x3e, 0xc4, 0x0e, 0x30, 0x03, - 0xd2, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, - 0x1d, 0xbc, 0x00, 0xff, 0x00, 0x3f, 0xc0, 0x6f, - 0xe1, 0x03, 0x7c, 0x00, 0xff, 0x10, 0x3f, 0x40, - 0x0f, 0xf0, 0x03, 0xfc, 0xc0, 0xff, 0x10, 0x3f, - 0xc0, 0x0f, 0xf0, 0x03, 0xfc, 0x00, 0xd7, 0x00, - 0x27, 0xd0, 0x0f, 0xf0, 0x83, 0xfd, 0x20, 0xfd, - 0x00, 0xbb, 0x00, 0x0f, 0xf1, 0x03, 0xfc, 0x20, - 0xfe, 0x04, 0x37, 0xc0, 0x0f, 0xf0, 0x03, 0xfc, - 0x00, 0xff, 0x00, 0x3f, 0xc0, 0x0d, 0xf0, 0x03, - 0xd0, 0x06, 0x60, 0x00, 0x00, 0x00, 0x00, 0xa8, - 0x05, 0xec, 0x00, 0xfb, 0x00, 0x3e, 0x40, 0x1c, - 0x38, 0x23, 0x2c, 0x00, 0xf9, 0x00, 0x3f, 0x80, - 0x0f, 0xb0, 0x03, 0x6c, 0x00, 0xc9, 0x00, 0x3c, - 0xc0, 0x0c, 0xb0, 0x03, 0xec, 0xed, 0x09, 0x00, - 0x2f, 0x00, 0x00, 0xfb, 0x00, 0x3e, 0xc8, 0x0c, - 0xb4, 0x03, 0xac, 0x80, 0xfb, 0x00, 0x72, 0xc0, - 0x4c, 0x30, 0x03, 0xbc, 0x00, 0xfb, 0x00, 0x3e, - 0xc4, 0x2c, 0xb0, 0x03, 0xec, 0x00, 0xfb, 0x00, - 0x3e, 0xc0, 0x0f, 0xb0, 0x03, 0xea, 0x00, 0x70, - 0x00, 0x00, 0x00, 0x00, 0x48, 0x11, 0x9c, 0x00, - 0xb7, 0x00, 0x2d, 0xc0, 0x2d, 0x70, 0x02, 0x1c, - 0x00, 0xb7, 0x00, 0x2d, 0x80, 0x8b, 0x70, 0x02, - 0xfc, 0x14, 0x87, 0x01, 0x2d, 0xc1, 0x0a, 0x75, - 0x12, 0xdc, 0x00, 0xb7, 0x00, 0x2d, 0xc0, 0x08, - 0x73, 0x02, 0xdc, 0x00, 0xb7, 0x00, 0x20, 0xc0, - 0x0a, 0x70, 0x02, 0x1c, 0x00, 0xb7, 0x00, 0x2d, - 0xc0, 0x08, 0x70, 0x02, 0xdc, 0x00, 0xb7, 0x04, - 0x3d, 0xc0, 0x0b, 0x70, 0x02, 0xd2, 0x04, 0x60, - 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x9e, 0x00, - 0xa7, 0x80, 0x2d, 0x60, 0x18, 0xf8, 0x02, 0x1e, - 0x00, 0xb7, 0x80, 0x2d, 0x20, 0x0b, 0x78, 0x02, - 0x5e, 0x00, 0x85, 0x80, 0x2f, 0xe0, 0x0a, 0x7a, - 0x02, 0xde, 0x00, 0xb7, 0x80, 0x2d, 0xe4, 0x08, - 0x78, 0x02, 0xde, 0x80, 0x93, 0x80, 0x29, 0xe1, - 0x28, 0x78, 0x02, 0x9e, 0x80, 0xb6, 0xc0, 0x2d, - 0xe8, 0x09, 0x78, 0x02, 0x5e, 0x00, 0xb7, 0x80, - 0x2d, 0xe0, 0x0b, 0x78, 0x02, 0xf0, 0x00, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x48, 0x14, 0xcc, 0x00, - 0xb3, 0x00, 0x2c, 0xd0, 0x09, 0x30, 0x02, 0x2c, - 0x00, 0xb1, 0x00, 0x2c, 0x10, 0x0b, 0x30, 0x02, - 0xcd, 0x04, 0x83, 0x00, 0x2c, 0x60, 0x28, 0x30, - 0x02, 0xc4, 0x00, 0xb1, 0x00, 0x2e, 0xc0, 0x08, - 0x30, 0x02, 0xcc, 0x00, 0xb3, 0x80, 0x20, 0xe2, - 0x0a, 0x3c, 0x82, 0x0c, 0x08, 0xb2, 0xc0, 0x2e, - 0xc0, 0x09, 0x30, 0x02, 0xcc, 0x00, 0xb3, 0x00, - 0x2c, 0xc1, 0x0b, 0x30, 0x02, 0xd2, 0x04, 0x30, - 0xed, 0x09, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xe8, 0x15, 0xa8, 0x00, 0xea, 0x00, 0x2f, - 0x98, 0x0c, 0xe4, 0x0b, 0x28, 0x00, 0xfa, 0xa0, - 0x3f, 0x94, 0x0f, 0xa0, 0x03, 0x79, 0x40, 0xce, - 0x40, 0x3d, 0xb0, 0x0c, 0xa0, 0x03, 0xe8, 0x00, - 0xfa, 0xa0, 0x3e, 0x80, 0x0c, 0xa0, 0x03, 0xe8, - 0x00, 0xfe, 0xa0, 0x33, 0x80, 0x0c, 0xee, 0x0b, - 0xa8, 0x00, 0xfe, 0x00, 0x3e, 0x80, 0x0d, 0xa0, - 0x03, 0xe8, 0x00, 0xfa, 0x00, 0x2e, 0x80, 0x0f, - 0xa0, 0x03, 0xfa, 0x04, 0x60, 0x00, 0x00, 0x00, - 0x00, 0x48, 0x00, 0xe0, 0x00, 0xf8, 0x00, 0x3e, - 0x02, 0x0f, 0x88, 0x03, 0xe0, 0x10, 0xf8, 0x01, - 0x3e, 0x00, 0x0f, 0x80, 0x03, 0xe0, 0x46, 0xf8, - 0x20, 0x3e, 0x24, 0x0f, 0x80, 0x03, 0xe0, 0x00, - 0xf8, 0x00, 0x3e, 0x00, 0x2f, 0x80, 0x03, 0xe0, - 0x00, 0xd8, 0xc0, 0xbe, 0x04, 0x0f, 0x04, 0x03, - 0xe0, 0x00, 0xf8, 0x08, 0x3e, 0x00, 0x0e, 0x80, - 0x03, 0xe0, 0x00, 0xf8, 0x00, 0x3a, 0x10, 0x0f, - 0x80, 0x03, 0xd2, 0x00, 0x30, 0x00, 0x00, 0x00, - 0x00, 0x08, 0x10, 0xe4, 0x00, 0xf9, 0x00, 0x3c, - 0x40, 0x0c, 0x92, 0x03, 0xe4, 0x00, 0xc9, 0xa0, - 0x3c, 0x60, 0x0c, 0x90, 0x03, 0xc5, 0x08, 0xc9, - 0xa0, 0x3e, 0x60, 0x0e, 0x10, 0x03, 0x24, 0x00, - 0xf9, 0xa0, 0x3e, 0x40, 0x0c, 0x9a, 0x03, 0xc4, - 0x00, 0xc1, 0x40, 0x32, 0x48, 0x0c, 0x9c, 0x02, - 0x64, 0x00, 0xb9, 0x00, 0x3e, 0x50, 0x28, 0x90, - 0x03, 0xe4, 0x00, 0xd9, 0x00, 0x3e, 0x60, 0x0f, - 0x90, 0x03, 0xc2, 0x04, 0x30, 0x00, 0x00, 0x00, - 0x00, 0x80, 0x04, 0x64, 0x00, 0xb9, 0x00, 0x2e, - 0x68, 0x28, 0x92, 0x02, 0xe5, 0x00, 0xd9, 0x40, - 0x2e, 0x44, 0x28, 0x90, 0x12, 0xe5, 0x80, 0x89, - 0x80, 0x2e, 0x60, 0x28, 0x90, 0x02, 0x24, 0x00, - 0xb9, 0x40, 0x26, 0xed, 0x09, 0x00, 0x31, 0x00, - 0x40, 0x08, 0x98, 0x02, 0xe4, 0x00, 0x89, 0xc0, - 0x22, 0x40, 0x08, 0x98, 0x02, 0xa4, 0x00, 0xb9, - 0x80, 0x2e, 0x40, 0x08, 0x90, 0x02, 0xe4, 0x00, - 0xb9, 0x00, 0x2e, 0x7c, 0x09, 0x90, 0x02, 0xe0, - 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x01, - 0x24, 0x00, 0xb9, 0x00, 0x6e, 0x48, 0x08, 0x90, - 0x02, 0xe5, 0x00, 0xa9, 0x00, 0x2e, 0x40, 0x08, - 0x90, 0x02, 0xe4, 0x00, 0x89, 0x01, 0x2e, 0xc4, - 0x08, 0x92, 0x02, 0x24, 0x00, 0xb9, 0x00, 0x26, - 0x40, 0x08, 0x90, 0x02, 0x66, 0x02, 0x89, 0x08, - 0x00, 0x40, 0x08, 0x90, 0x02, 0xe4, 0x00, 0xb9, - 0x88, 0x2e, 0x40, 0x0a, 0x90, 0x02, 0xe4, 0x00, - 0xb9, 0x00, 0x2e, 0x40, 0x0b, 0x90, 0x02, 0xc6, - 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, - 0x04, 0x00, 0xb1, 0x00, 0x2c, 0x50, 0x28, 0x14, - 0x02, 0xc4, 0x00, 0x91, 0x80, 0x2c, 0x48, 0x08, - 0x10, 0x02, 0x45, 0x00, 0x81, 0x00, 0x2e, 0x40, - 0x08, 0x10, 0x02, 0x05, 0x00, 0xb1, 0x80, 0x24, - 0x6a, 0x08, 0x12, 0x82, 0xc4, 0xa0, 0x81, 0x40, - 0x20, 0x70, 0x08, 0x10, 0x02, 0x84, 0xa0, 0xb1, - 0x44, 0x2c, 0x50, 0x08, 0x10, 0x00, 0xc4, 0x00, - 0xb1, 0x00, 0x2c, 0x50, 0x09, 0x10, 0x02, 0xc2, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0x0d, - 0x60, 0x00, 0xf8, 0x00, 0x3e, 0x00, 0x0c, 0x80, - 0x03, 0xe1, 0x40, 0xe8, 0x00, 0x3e, 0x00, 0x0c, - 0x85, 0x03, 0xe0, 0x00, 0xc8, 0x00, 0x3e, 0x00, - 0x0c, 0x80, 0x0b, 0x20, 0x00, 0xf8, 0x50, 0x34, - 0x1c, 0x0c, 0x82, 0x03, 0x60, 0x80, 0xc8, 0x00, - 0xb2, 0x00, 0x4c, 0xa0, 0x03, 0xe0, 0x80, 0xf8, - 0x00, 0x3c, 0x80, 0x0e, 0x80, 0x03, 0xe0, 0x00, - 0xd8, 0x01, 0x7e, 0x01, 0x8f, 0x80, 0x03, 0xee, - 0x03, 0x50, 0x00, 0x00, 0x00, 0x00, 0xed, 0x09, - 0x00, 0x32, 0x00, 0x98, 0x1d, 0xe4, 0x00, 0xf9, - 0x00, 0x3d, 0x50, 0x0f, 0xd0, 0x03, 0xe4, 0x04, - 0xfd, 0x00, 0x3f, 0x44, 0x0f, 0x90, 0x03, 0xf5, - 0x06, 0xfd, 0x40, 0x3f, 0x40, 0x0d, 0x94, 0x03, - 0xf4, 0x00, 0xfd, 0x00, 0x3e, 0x40, 0x2f, 0x90, - 0x03, 0xe4, 0x00, 0xfd, 0x40, 0x3f, 0x50, 0x6f, - 0xd4, 0x03, 0xe4, 0x00, 0xfd, 0x00, 0x3e, 0x50, - 0x0f, 0x90, 0x03, 0xe4, 0x00, 0xf9, 0x00, 0x76, - 0x40, 0x0f, 0x90, 0x03, 0xe6, 0x06, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x18, 0x15, 0xa4, 0x00, 0xf9, - 0x00, 0x3f, 0x42, 0x2c, 0xd0, 0x03, 0x34, 0x40, - 0xcd, 0x00, 0x3b, 0xc0, 0x0f, 0xd1, 0x03, 0xf5, - 0x80, 0xdd, 0x00, 0x13, 0x40, 0x0f, 0xd2, 0x03, - 0xed, 0x04, 0xfd, 0x10, 0x3f, 0x48, 0x0f, 0xd2, - 0x83, 0x34, 0x90, 0xbd, 0x20, 0x0b, 0x48, 0x0c, - 0xd2, 0x03, 0xa4, 0x90, 0xfd, 0x40, 0x37, 0x58, - 0x0c, 0x90, 0x03, 0xe4, 0x00, 0xf9, 0x00, 0x3f, - 0x40, 0x0f, 0x90, 0x03, 0xc6, 0x04, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x38, 0x10, 0xe0, 0x00, 0xb8, - 0x00, 0x2e, 0x18, 0x28, 0x82, 0x82, 0x20, 0x82, - 0x88, 0x00, 0x22, 0x00, 0x0b, 0x80, 0x02, 0xe0, - 0x00, 0x88, 0x51, 0x22, 0x00, 0x0e, 0x84, 0x03, - 0xe0, 0x80, 0xb8, 0x00, 0x26, 0x0a, 0x8b, 0x80, - 0x02, 0x20, 0x40, 0xb8, 0x68, 0x28, 0x9a, 0x0a, - 0x84, 0x02, 0x20, 0x00, 0xba, 0x20, 0x2c, 0x10, - 0x08, 0x80, 0x02, 0xe0, 0x00, 0xb8, 0x00, 0x2e, - 0x0a, 0x0b, 0x80, 0x02, 0xce, 0x06, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x04, 0xc4, 0x00, 0xb1, - 0x00, 0x2c, 0x42, 0x38, 0x10, 0x22, 0x04, 0x80, - 0x81, 0x00, 0x28, 0x44, 0x0b, 0x10, 0x02, 0xc5, - 0x00, 0x83, 0x00, 0x68, 0x60, 0x0b, 0x11, 0x02, - 0xc4, 0x80, 0xb1, 0x00, 0x2c, 0x4c, 0x0b, 0x10, - 0x0a, 0xed, 0x09, 0x00, 0x33, 0x00, 0x04, 0x0c, - 0x91, 0x12, 0x24, 0x44, 0x28, 0x11, 0x02, 0x84, - 0x40, 0xb1, 0x00, 0x2c, 0x4c, 0x09, 0x10, 0x02, - 0xc4, 0x00, 0xb1, 0x00, 0x2c, 0x40, 0x0b, 0x10, - 0x02, 0xc2, 0x01, 0x50, 0x00, 0x00, 0x00, 0x00, - 0x18, 0x05, 0xa4, 0x00, 0xb9, 0x01, 0x2e, 0x50, - 0x28, 0x10, 0x02, 0x24, 0x00, 0x89, 0x20, 0x22, - 0x44, 0x0b, 0x90, 0x02, 0x65, 0x14, 0x99, 0x08, - 0xaa, 0x40, 0x0a, 0x90, 0x02, 0xe4, 0x80, 0xb9, - 0x80, 0x26, 0x40, 0x0b, 0x90, 0x02, 0x24, 0x00, - 0xb9, 0x18, 0x22, 0x60, 0x2a, 0x94, 0x02, 0xa4, - 0x00, 0xb9, 0x00, 0x2e, 0x40, 0x89, 0x90, 0x02, - 0xe4, 0x00, 0x39, 0x04, 0x2e, 0x40, 0x0b, 0x90, - 0x02, 0xc6, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, - 0xa0, 0x05, 0xe4, 0x00, 0xf9, 0x00, 0x3e, 0x60, - 0x0c, 0x92, 0x0b, 0x24, 0x00, 0xc1, 0x00, 0x2a, - 0x60, 0x0f, 0x90, 0x03, 0xe5, 0x06, 0xc9, 0x00, - 0x3a, 0x50, 0x0f, 0x90, 0x03, 0xe4, 0x00, 0xf9, - 0x00, 0x3e, 0x40, 0x0f, 0x90, 0x07, 0x24, 0x00, - 0xd9, 0x01, 0x3a, 0x70, 0x0c, 0x90, 0x03, 0xa4, - 0x00, 0xf9, 0x40, 0x36, 0x40, 0x2d, 0x90, 0x03, - 0xe4, 0x00, 0xf9, 0x00, 0x3e, 0x40, 0x0f, 0x90, - 0x03, 0xe8, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x28, 0x01, 0xa4, 0x00, 0xf9, 0x00, 0x3e, 0x50, - 0x0f, 0x90, 0x03, 0xe4, 0x00, 0xf9, 0x04, 0x3e, - 0x40, 0x0f, 0x90, 0x03, 0xe4, 0x40, 0xe9, 0x01, - 0x36, 0x70, 0x0f, 0x90, 0x23, 0xa6, 0x00, 0xf9, - 0x00, 0x36, 0x40, 0x0f, 0x10, 0x07, 0xe4, 0x00, - 0xf9, 0x80, 0xac, 0x40, 0x8f, 0x92, 0x03, 0x64, - 0x00, 0xf9, 0xc0, 0x2c, 0x42, 0x0e, 0x90, 0x03, - 0xe4, 0x00, 0xf9, 0x00, 0x3e, 0x40, 0x0f, 0x90, - 0x03, 0xca, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, - 0x28, 0x00, 0xa0, 0x00, 0xed, 0x09, 0x00, 0x34, - 0x00, 0xf8, 0x00, 0x3c, 0x02, 0x0c, 0x8c, 0x03, - 0x20, 0x00, 0xf8, 0x80, 0x3e, 0x00, 0x0f, 0x81, - 0x03, 0xc0, 0x34, 0xf8, 0x00, 0x3e, 0x00, 0x0f, - 0x80, 0x03, 0x60, 0x00, 0xf8, 0x09, 0x3e, 0x00, - 0x2c, 0x80, 0x03, 0xe0, 0x10, 0x78, 0x08, 0x3e, - 0x11, 0x0c, 0x88, 0x03, 0x60, 0x00, 0xc8, 0x30, - 0x3e, 0x00, 0x2c, 0x80, 0x23, 0xe0, 0x00, 0xf8, - 0x00, 0x3e, 0x00, 0x0f, 0x80, 0x03, 0xca, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x28, 0x15, 0x28, - 0x00, 0xba, 0x00, 0x2f, 0xb0, 0x08, 0xe8, 0x02, - 0x3b, 0x60, 0xbe, 0x40, 0x2e, 0x88, 0x0b, 0xec, - 0x02, 0xfa, 0x20, 0xb2, 0x00, 0x2a, 0x80, 0x0b, - 0xa0, 0x82, 0x28, 0x00, 0xbe, 0x60, 0x2f, 0x80, - 0x08, 0xa0, 0x02, 0xea, 0x00, 0xbe, 0x61, 0x2f, - 0x94, 0x0a, 0x64, 0x00, 0x28, 0x00, 0x8e, 0xc0, - 0x2f, 0x91, 0x08, 0xa0, 0x02, 0xe8, 0x00, 0xba, - 0x00, 0x2f, 0x80, 0x0b, 0xa0, 0x02, 0xca, 0x00, - 0x40, 0x00, 0x00, 0x00, 0x00, 0x28, 0x05, 0x4c, - 0x00, 0xb3, 0x00, 0x2c, 0xe0, 0x09, 0x38, 0x02, - 0x24, 0x00, 0xb1, 0x10, 0x28, 0x40, 0x0b, 0x00, - 0x82, 0xcc, 0x00, 0xb1, 0x00, 0x2c, 0x60, 0x0b, - 0x10, 0x02, 0x0c, 0x01, 0xb3, 0x40, 0x2c, 0x00, - 0x08, 0x18, 0x02, 0xc6, 0x00, 0xbb, 0x00, 0x28, - 0xc0, 0x09, 0x10, 0x02, 0xcc, 0x00, 0x83, 0x80, - 0x2c, 0xc4, 0x1a, 0x30, 0x02, 0xcc, 0x00, 0xb3, - 0x00, 0x2c, 0xc0, 0x0b, 0x30, 0x02, 0xca, 0x00, - 0x50, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x1c, - 0x00, 0xb7, 0x00, 0x2d, 0xc2, 0x29, 0x70, 0x82, - 0x14, 0x00, 0xb7, 0x00, 0x2d, 0xc0, 0x09, 0x40, - 0x02, 0xdc, 0x10, 0xbf, 0x00, 0x2d, 0xc2, 0x0b, - 0x78, 0x02, 0x1c, 0x80, 0xb7, 0x00, 0x2c, 0x20, - 0x08, 0x70, 0x82, 0xdd, 0x00, 0xb5, 0x02, 0xed, - 0x09, 0x00, 0x35, 0x00, 0x2d, 0x40, 0x09, 0x30, - 0x02, 0x8c, 0x00, 0x87, 0x00, 0x2d, 0xc0, 0x00, - 0x70, 0x02, 0xdc, 0x00, 0x37, 0x00, 0x2d, 0x00, - 0x0b, 0x70, 0x02, 0xe8, 0x00, 0x40, 0x00, 0x00, - 0x00, 0x00, 0xa8, 0x08, 0x1e, 0x00, 0xf7, 0x80, - 0x3f, 0xa0, 0x0d, 0xf8, 0x0b, 0x16, 0x00, 0xf7, - 0x80, 0x3d, 0xe0, 0x0f, 0x48, 0x03, 0xde, 0x00, - 0xf7, 0x80, 0x3d, 0xe0, 0x0f, 0x78, 0x09, 0x5e, - 0x00, 0xf7, 0x80, 0x3d, 0x20, 0x0c, 0x78, 0x03, - 0xde, 0x00, 0xf7, 0x80, 0x3d, 0x20, 0x2d, 0x68, - 0x03, 0xdc, 0x00, 0xc7, 0x81, 0x3d, 0x80, 0x0e, - 0x78, 0x03, 0xde, 0x00, 0x77, 0x80, 0x3d, 0xe0, - 0x0f, 0x78, 0x03, 0xea, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x0d, 0xac, 0x00, 0xfb, 0x00, - 0x3e, 0xc0, 0x0e, 0xb0, 0x13, 0xf4, 0x00, 0xbb, - 0x00, 0x3e, 0xc0, 0x0f, 0xc0, 0x13, 0xec, 0x00, - 0xf3, 0x04, 0x3a, 0xc0, 0x0f, 0x10, 0x03, 0xed, - 0xe0, 0xfb, 0x00, 0x3f, 0x00, 0x0f, 0x90, 0x01, - 0xec, 0x00, 0xf9, 0x00, 0x3e, 0x00, 0x0e, 0xa0, - 0x03, 0x6c, 0x08, 0xf9, 0x01, 0x3e, 0xc0, 0x2f, - 0xb0, 0x03, 0xec, 0x00, 0xdb, 0x00, 0x3e, 0x40, - 0x0b, 0xb0, 0x03, 0xc2, 0x06, 0x60, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x05, 0xfe, 0x00, 0xff, 0x80, - 0x3f, 0xe0, 0x0d, 0xf8, 0x03, 0x3a, 0x40, 0xff, - 0x90, 0x3d, 0xe0, 0x0c, 0xf8, 0x03, 0x3e, 0x48, - 0xcf, 0x80, 0x3f, 0xe0, 0x0f, 0xf8, 0x03, 0x7e, - 0x04, 0xf7, 0x81, 0x3b, 0x20, 0x0c, 0xf8, 0x03, - 0xfe, 0x00, 0xff, 0x80, 0x33, 0xe0, 0x8c, 0xd8, - 0x03, 0xfe, 0x00, 0xf5, 0x90, 0x33, 0xe0, 0x0f, - 0xf8, 0x03, 0xfe, 0x00, 0xff, 0x85, 0x3f, 0xe0, - 0x0f, 0xf8, 0x03, 0xc0, 0x04, 0x70, 0x00, 0x00, - 0x00, 0x00, 0xa8, 0x11, 0x9c, 0x00, 0xb7, 0x00, - 0x2d, 0xc0, 0xed, 0x09, 0x00, 0x36, 0x00, 0x08, - 0xf0, 0x42, 0x1c, 0x00, 0xb5, 0x44, 0x2d, 0x40, - 0x08, 0xc0, 0x02, 0x3d, 0x48, 0x87, 0x10, 0x2d, - 0xc0, 0x0b, 0x70, 0x02, 0x1c, 0x00, 0xb7, 0x4c, - 0x21, 0x00, 0x08, 0x71, 0x13, 0xd4, 0x00, 0xb4, - 0x10, 0xa1, 0x40, 0x0a, 0x64, 0x02, 0xdc, 0x00, - 0xb6, 0x00, 0x21, 0x48, 0x0b, 0x70, 0x02, 0xdc, - 0x00, 0xb7, 0x00, 0x2d, 0x00, 0x0b, 0x70, 0x02, - 0xea, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x9c, 0x00, 0xb7, 0x00, 0x2d, 0x80, 0x09, - 0x50, 0x82, 0x1c, 0x04, 0xb7, 0x00, 0x2d, 0xc0, - 0x08, 0x70, 0x02, 0x1c, 0x00, 0x85, 0x08, 0x2d, - 0x42, 0x0b, 0x30, 0x02, 0x1c, 0x00, 0xb7, 0x10, - 0x28, 0x00, 0x08, 0x70, 0x02, 0xdc, 0x00, 0xb7, - 0x00, 0x21, 0x00, 0x2a, 0x60, 0x02, 0xdc, 0x00, - 0xbd, 0x00, 0x61, 0x40, 0x0b, 0x70, 0x02, 0xdc, - 0x00, 0xb7, 0x00, 0x2d, 0xc0, 0x0b, 0x70, 0x02, - 0xc0, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x20, - 0x14, 0xcc, 0x00, 0xb3, 0x00, 0x2e, 0xc0, 0x08, - 0x0c, 0x02, 0x08, 0x00, 0xb3, 0x00, 0x2c, 0xc0, - 0x08, 0x00, 0x02, 0x0a, 0x10, 0x83, 0xe0, 0x2c, - 0xd0, 0x0b, 0x30, 0x22, 0x0e, 0x00, 0xb3, 0x00, - 0x20, 0x00, 0x08, 0x30, 0x02, 0x8c, 0x00, 0xbb, - 0x89, 0x20, 0x00, 0x0a, 0x2c, 0x02, 0xcc, 0x08, - 0xb1, 0x00, 0x62, 0x40, 0x0b, 0x30, 0x02, 0xcc, - 0x00, 0xb3, 0x00, 0x2c, 0x40, 0x0b, 0x30, 0x02, - 0xc8, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0xa8, - 0x15, 0xac, 0x00, 0xfb, 0x00, 0x2e, 0xa0, 0x2d, - 0xb8, 0x0a, 0x24, 0x00, 0xfb, 0xa0, 0x3e, 0xc0, - 0x2c, 0x80, 0x43, 0x2c, 0x22, 0xcb, 0xc4, 0x2e, - 0xf0, 0x0f, 0xb0, 0x0b, 0x3e, 0x80, 0xfb, 0x80, - 0x3a, 0xc0, 0x2c, 0x30, 0x02, 0xec, 0x00, 0xf9, - 0xe0, 0x32, 0xc0, 0x0c, 0xb8, 0xed, 0x09, 0x00, - 0x37, 0x00, 0xa2, 0xec, 0x00, 0xfa, 0x80, 0xa2, - 0xc0, 0x0f, 0xb0, 0x03, 0xec, 0x00, 0xfb, 0x00, - 0x3e, 0xc0, 0x0f, 0xb0, 0x13, 0xea, 0x00, 0x60, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0xec, 0x00, - 0xfb, 0x00, 0x3e, 0x30, 0x0f, 0xb0, 0x03, 0xe4, - 0x00, 0xfb, 0x40, 0x3c, 0xc0, 0x0f, 0xc0, 0x03, - 0xec, 0x00, 0xf9, 0x00, 0x3e, 0x40, 0x0f, 0xb0, - 0x03, 0xac, 0x00, 0xfb, 0x00, 0x3f, 0x40, 0x0f, - 0xb0, 0x03, 0xcc, 0x00, 0xf8, 0x00, 0x3e, 0x62, - 0x2d, 0xb4, 0x83, 0xec, 0x00, 0xf8, 0x50, 0x3e, - 0xd0, 0x0f, 0xb0, 0x03, 0xec, 0x00, 0xfb, 0x00, - 0x3e, 0x90, 0x07, 0xb0, 0x03, 0xe0, 0x10, 0x30, - 0x00, 0x00, 0x00, 0x00, 0x01, 0x10, 0xfc, 0x00, - 0xff, 0x00, 0x3e, 0x80, 0x0c, 0xc0, 0x83, 0x34, - 0x00, 0xfd, 0x00, 0x3f, 0x40, 0x0c, 0xc0, 0x03, - 0x3e, 0x20, 0xd7, 0x00, 0x33, 0xc2, 0x0f, 0xf0, - 0x03, 0xfc, 0x04, 0xcf, 0x01, 0x3f, 0x80, 0x0f, - 0xf9, 0x03, 0x34, 0x40, 0x49, 0x00, 0x33, 0x00, - 0x2c, 0xe8, 0x03, 0xfc, 0x04, 0xfe, 0x00, 0x3f, - 0xc0, 0x0c, 0xf0, 0x03, 0x7c, 0x00, 0xff, 0x00, - 0x3f, 0x24, 0x0c, 0xf0, 0x03, 0xc0, 0x40, 0x30, - 0x00, 0x00, 0x00, 0x00, 0x81, 0x04, 0x6c, 0x00, - 0xbb, 0x00, 0x2e, 0x20, 0x28, 0x80, 0x12, 0x24, - 0x00, 0xbb, 0xd2, 0x2e, 0xc0, 0x28, 0x80, 0x12, - 0x2e, 0x04, 0x8b, 0x02, 0x2a, 0xe0, 0x0b, 0xb0, - 0x42, 0xec, 0x00, 0x8b, 0xc0, 0x2e, 0x00, 0x0b, - 0xb8, 0x02, 0xac, 0x00, 0x89, 0xe1, 0x2a, 0x00, - 0x08, 0xa4, 0x02, 0xec, 0x00, 0x38, 0x80, 0x2e, - 0xe4, 0x08, 0xb0, 0x02, 0xec, 0x00, 0xbb, 0x00, - 0x2e, 0x30, 0x28, 0xb0, 0x12, 0xe0, 0x44, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x05, 0x2c, 0x00, - 0xbb, 0x00, 0x2e, 0xf0, 0x08, 0x38, 0x82, 0x20, - 0xed, 0x09, 0x00, 0x38, 0x00, 0x80, 0xbb, 0x00, - 0x2e, 0xc8, 0x08, 0x30, 0x02, 0x0c, 0x80, 0x9b, - 0x80, 0x22, 0xc4, 0x0b, 0x91, 0x06, 0xcc, 0x00, - 0x8b, 0x80, 0x2e, 0xd8, 0x0b, 0x90, 0x02, 0x2c, - 0x00, 0xa9, 0x80, 0x20, 0xc0, 0x40, 0xa2, 0x02, - 0xec, 0x00, 0xb9, 0x88, 0x2e, 0x42, 0x88, 0xb0, - 0x02, 0xec, 0x00, 0xbb, 0x00, 0x2c, 0xd0, 0x08, - 0xb0, 0x02, 0xe0, 0x00, 0x40, 0x00, 0x00, 0x00, - 0x00, 0x08, 0x04, 0x0c, 0x00, 0xb3, 0x00, 0x2c, - 0x40, 0x08, 0x30, 0x0a, 0x04, 0x00, 0xb3, 0x00, - 0x2c, 0xc0, 0x88, 0x00, 0x02, 0x04, 0x00, 0x83, - 0x00, 0x28, 0xc0, 0x0b, 0x30, 0x02, 0xcc, 0x02, - 0xa3, 0x00, 0x2c, 0x40, 0x0b, 0x30, 0x02, 0x8c, - 0x02, 0xa0, 0x00, 0x20, 0x20, 0x08, 0x20, 0x02, - 0xcc, 0x00, 0xb0, 0x00, 0x24, 0x40, 0x48, 0x30, - 0x02, 0xcc, 0x00, 0xb3, 0x04, 0x2c, 0x81, 0x08, - 0x30, 0x42, 0xc2, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x0d, 0x6c, 0x00, 0xfb, 0x00, 0x3e, - 0x00, 0x0c, 0xa0, 0x03, 0x24, 0x04, 0xfb, 0x00, - 0x3e, 0xc1, 0x0c, 0xb0, 0x03, 0x2c, 0x02, 0xdb, - 0x00, 0x72, 0xc0, 0x8f, 0xb0, 0x03, 0xfc, 0x00, - 0xcb, 0x00, 0x3e, 0x80, 0x4f, 0xb0, 0x0b, 0x2c, - 0x00, 0xe9, 0x00, 0x30, 0x00, 0x2c, 0xa0, 0x03, - 0xec, 0x00, 0xf9, 0x00, 0x3e, 0x40, 0x2c, 0xb0, - 0x03, 0x6c, 0x00, 0xfb, 0x00, 0x3e, 0x00, 0x0c, - 0xb0, 0x03, 0xc0, 0x03, 0x50, 0x00, 0x00, 0x00, - 0x00, 0xa0, 0x1d, 0xfc, 0x00, 0xff, 0x00, 0x3f, - 0xc0, 0x0f, 0xf0, 0x03, 0xf0, 0x00, 0xfc, 0x00, - 0x3f, 0x40, 0x0f, 0xc0, 0x13, 0xfc, 0x00, 0xfd, - 0x00, 0x3f, 0x40, 0x0f, 0xd0, 0x03, 0xfc, 0x00, - 0xdc, 0x00, 0x3f, 0x00, 0x0f, 0xd0, 0x03, 0x74, - 0x00, 0xdd, 0x00, 0xbf, 0x00, 0x0f, 0xe0, 0x07, - 0xfc, 0x00, 0xfd, 0xed, 0x09, 0x00, 0x39, 0x00, - 0x00, 0x3f, 0x40, 0x0f, 0xf0, 0x03, 0xfc, 0x00, - 0xff, 0x00, 0x3f, 0x01, 0x0f, 0xf0, 0x03, 0xe8, - 0x12, 0x70, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x05, - 0xbc, 0x00, 0xff, 0x00, 0x3f, 0xc0, 0x0f, 0xf0, - 0x03, 0xfc, 0x00, 0xff, 0x40, 0x3f, 0xc0, 0x0f, - 0xf0, 0x03, 0x7c, 0x00, 0xdf, 0x00, 0x3f, 0x00, - 0x0e, 0xf0, 0x03, 0xb0, 0x00, 0xfc, 0x41, 0x3f, - 0x0e, 0x0d, 0xf0, 0x03, 0xdc, 0x10, 0xf7, 0x00, - 0x3f, 0x00, 0x0c, 0xf2, 0x03, 0xb0, 0x0c, 0xfc, - 0x10, 0x2f, 0x00, 0x0e, 0xf1, 0x43, 0x70, 0x02, - 0xcc, 0x10, 0x33, 0x00, 0x0f, 0xf0, 0x03, 0xf0, - 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x80, 0x10, - 0xec, 0x00, 0xbb, 0x00, 0x2e, 0xc0, 0x0b, 0xb0, - 0x02, 0xec, 0x00, 0xbb, 0x20, 0x2f, 0xd0, 0x0b, - 0xf6, 0x82, 0xec, 0x00, 0xbb, 0x00, 0x2e, 0x80, - 0x08, 0xb0, 0x02, 0x21, 0x00, 0xb8, 0x40, 0x2e, - 0x18, 0x08, 0xb0, 0x02, 0xec, 0x00, 0xbf, 0x40, - 0x2e, 0xc0, 0x0c, 0xf5, 0x02, 0x2c, 0x00, 0x98, - 0x20, 0x2e, 0x00, 0x0c, 0xb3, 0x03, 0x6d, 0x00, - 0x8b, 0x60, 0xa2, 0xd0, 0x0b, 0xb0, 0x02, 0xe0, - 0x04, 0x30, 0x00, 0x00, 0x00, 0x00, 0x88, 0x04, - 0xcc, 0x00, 0xb3, 0x00, 0x2c, 0xc0, 0x0b, 0x30, - 0x02, 0xcc, 0x00, 0xb3, 0x00, 0x2c, 0xc4, 0x8b, - 0x34, 0x02, 0xcc, 0x00, 0x93, 0x00, 0x2c, 0x00, - 0x0a, 0x10, 0x02, 0x81, 0x00, 0xb0, 0x60, 0x24, - 0x00, 0x09, 0x30, 0x02, 0xcc, 0x11, 0xb3, 0x10, - 0x2c, 0x40, 0x1b, 0x30, 0x02, 0x04, 0x00, 0xb0, - 0x00, 0x2c, 0x00, 0x0a, 0x32, 0x02, 0x01, 0x00, - 0x80, 0x10, 0x28, 0x04, 0x0b, 0x30, 0x02, 0xe2, - 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x15, - 0xac, 0x00, 0xbb, 0x00, 0x2e, 0xc0, 0x0b, 0xb0, - 0x02, 0xec, 0x00, 0xbb, 0x00, 0x2e, 0xed, 0x09, - 0x00, 0x3a, 0x00, 0xc1, 0x0b, 0xb0, 0x02, 0xec, - 0x00, 0xbb, 0x00, 0x2e, 0xa0, 0x08, 0x90, 0x02, - 0x66, 0x00, 0xb8, 0x80, 0x2c, 0x20, 0x09, 0xa4, - 0x42, 0x68, 0x20, 0xbb, 0x00, 0x2e, 0xe0, 0x08, - 0xb0, 0x02, 0x2c, 0x20, 0xba, 0x40, 0x2e, 0x08, - 0x18, 0xb0, 0x42, 0x6c, 0x00, 0x8b, 0x00, 0x22, - 0xc0, 0x0b, 0xb0, 0x02, 0xf8, 0x04, 0x60, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x15, 0xec, 0x00, 0xfb, - 0x00, 0x3e, 0xc0, 0x0f, 0xb0, 0x03, 0xec, 0x00, - 0xfb, 0x00, 0x3e, 0xc1, 0x0f, 0xb0, 0x03, 0x6c, - 0x00, 0xdb, 0x00, 0x3e, 0xe0, 0x0e, 0x10, 0x03, - 0xa3, 0x80, 0xf8, 0xa0, 0x3e, 0x20, 0x0d, 0xb0, - 0x03, 0xee, 0x00, 0xfb, 0x00, 0x3e, 0xe0, 0x1d, - 0xb0, 0x0b, 0xad, 0x00, 0xf8, 0xd0, 0x1e, 0x30, - 0x0e, 0xb0, 0x63, 0x00, 0x00, 0xc8, 0x00, 0x3a, - 0x00, 0x0f, 0xb0, 0x03, 0xc0, 0x04, 0x20, 0x00, - 0x00, 0x00, 0x00, 0xe0, 0x01, 0xbc, 0x00, 0xff, - 0x00, 0x3f, 0xc0, 0x0f, 0xf0, 0x03, 0xfc, 0x00, - 0xff, 0x00, 0x7f, 0xc0, 0x0f, 0xf0, 0x03, 0xfc, - 0x00, 0xff, 0x00, 0x3c, 0xc2, 0x07, 0xf4, 0x03, - 0xb0, 0x00, 0xbd, 0x02, 0x3f, 0x00, 0x06, 0xf4, - 0x03, 0xfb, 0x00, 0xff, 0x08, 0x3d, 0xc2, 0x2d, - 0xb0, 0x83, 0xec, 0x08, 0xdd, 0x00, 0x36, 0x20, - 0x0e, 0x70, 0x03, 0x7c, 0x00, 0xff, 0x00, 0xbf, - 0xc0, 0x0f, 0xf0, 0x43, 0xf8, 0x40, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x10, 0xac, 0x00, 0xfb, - 0x00, 0x3e, 0xc0, 0x0f, 0xb0, 0x03, 0xec, 0x00, - 0xfb, 0x00, 0x3e, 0xc0, 0x0f, 0xb0, 0x03, 0xac, - 0x00, 0xfb, 0x00, 0x3e, 0xd0, 0x0c, 0x90, 0x07, - 0xe5, 0x00, 0xe9, 0x20, 0x3e, 0x00, 0x0e, 0xb8, - 0x03, 0xed, 0x00, 0xfb, 0x12, 0x32, 0x80, 0x0f, - 0x30, 0x0b, 0x2d, 0x40, 0xeb, 0x40, 0x32, 0x00, - 0x0c, 0xed, 0x09, 0x00, 0x3b, 0x00, 0xb0, 0x03, - 0x20, 0x00, 0xf8, 0x00, 0x3e, 0x00, 0x0f, 0xb0, - 0x03, 0xd0, 0x04, 0x20, 0x00, 0x00, 0x00, 0x00, - 0xc8, 0x05, 0x2c, 0x00, 0xbb, 0x00, 0x2e, 0xc0, - 0x0b, 0xb0, 0x02, 0xec, 0x00, 0xbb, 0x00, 0x2f, - 0xc0, 0x0b, 0xf0, 0x02, 0x2c, 0x00, 0xfb, 0x00, - 0x2e, 0xc0, 0x08, 0x92, 0x02, 0xe4, 0x00, 0xb9, - 0x00, 0x2e, 0x00, 0x4f, 0xb8, 0x06, 0xeb, 0x00, - 0x8f, 0x81, 0x36, 0xf1, 0x0b, 0xfa, 0x02, 0x2d, - 0x04, 0xab, 0x01, 0x34, 0x00, 0x28, 0xf0, 0x02, - 0x2c, 0xc0, 0xbb, 0x00, 0x36, 0xc0, 0x09, 0xb0, - 0x02, 0xf2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xe0, 0x05, 0x4c, 0x00, 0xb3, 0x00, 0x2c, 0xc0, - 0x0b, 0x30, 0x02, 0xcc, 0x00, 0xb3, 0x00, 0x2c, - 0xc0, 0x0b, 0x30, 0x12, 0x8c, 0x00, 0xb3, 0x00, - 0x2c, 0x80, 0x08, 0x30, 0x02, 0xc0, 0x04, 0xa0, - 0x44, 0x2c, 0x00, 0x08, 0x12, 0x12, 0xce, 0x00, - 0xb3, 0x01, 0x24, 0xf0, 0x0b, 0x3c, 0x06, 0x04, - 0x80, 0x82, 0x00, 0x2c, 0x20, 0x0b, 0x30, 0x02, - 0x00, 0x10, 0xb8, 0x00, 0x2c, 0x00, 0x0b, 0x30, - 0x02, 0x78, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, - 0x20, 0x01, 0x1e, 0x00, 0xb7, 0x80, 0x2d, 0xe0, - 0x0b, 0x78, 0x02, 0xde, 0x00, 0xb7, 0x80, 0x6d, - 0xe0, 0x0b, 0x78, 0x02, 0x1e, 0x00, 0xa7, 0x80, - 0x2d, 0xa0, 0x0a, 0x78, 0x02, 0xd6, 0x50, 0xb5, - 0x80, 0x2d, 0x21, 0x83, 0x58, 0x02, 0xff, 0x6a, - 0x97, 0x80, 0x25, 0xa2, 0x09, 0x78, 0x02, 0x1e, - 0x00, 0xa7, 0x80, 0x2d, 0x62, 0x0b, 0x79, 0x02, - 0x1e, 0x04, 0xb7, 0x80, 0x05, 0xe0, 0x09, 0x78, - 0x02, 0xc8, 0x80, 0x40, 0x00, 0x00, 0x00, 0x00, - 0x48, 0x08, 0x0c, 0x00, 0xf3, 0x00, 0x3c, 0xc0, - 0x0b, 0x30, 0x03, 0xcc, 0x00, 0xf3, 0x10, 0x3c, - 0xc4, 0x0f, 0xb0, 0x03, 0xed, 0x09, 0x00, 0x3c, - 0x00, 0x8c, 0x00, 0xb3, 0x00, 0x3c, 0x80, 0x2c, - 0x10, 0x22, 0xc8, 0x00, 0xe3, 0x00, 0x3e, 0x00, - 0x1c, 0x32, 0x02, 0xc8, 0x40, 0xf3, 0x00, 0x14, - 0xd8, 0x0f, 0x32, 0x02, 0x04, 0x18, 0xeb, 0x00, - 0x3c, 0x14, 0x0f, 0xb0, 0x0b, 0x00, 0x00, 0xf0, - 0x00, 0x3c, 0x00, 0x0f, 0x30, 0x03, 0xd2, 0x02, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x1d, 0xbc, - 0x00, 0xff, 0x00, 0x3f, 0xc0, 0x0f, 0xf0, 0x03, - 0xfc, 0x00, 0xff, 0x00, 0x3f, 0xd2, 0x0f, 0xf0, - 0x03, 0xfc, 0x40, 0xff, 0x00, 0x3f, 0x80, 0x0d, - 0xd0, 0x03, 0xfc, 0x18, 0xbf, 0x10, 0x3f, 0x84, - 0x0d, 0xf0, 0x03, 0xf8, 0x40, 0xef, 0x12, 0x2f, - 0xc0, 0x0f, 0xf0, 0x03, 0xfc, 0x40, 0xff, 0x00, - 0x37, 0x40, 0x04, 0xf0, 0x23, 0xfc, 0x00, 0xff, - 0x00, 0x3b, 0xe0, 0x0f, 0xf1, 0x03, 0xd0, 0x02, - 0x60, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x05, 0xec, - 0x00, 0xfb, 0x00, 0x3e, 0xc0, 0x0d, 0xb0, 0x03, - 0xec, 0x00, 0xfb, 0x00, 0x3e, 0xc0, 0x0f, 0xb4, - 0x03, 0x6c, 0x00, 0xdb, 0x00, 0x3e, 0xc0, 0x0c, - 0xb0, 0x07, 0xcc, 0x00, 0xda, 0x80, 0x32, 0x40, - 0x0f, 0x90, 0x03, 0x62, 0x00, 0xcb, 0x20, 0x12, - 0xc0, 0x8d, 0xb4, 0x03, 0xec, 0x00, 0xca, 0x00, - 0x32, 0x40, 0x0b, 0xb0, 0x03, 0x22, 0x00, 0xc8, - 0x00, 0x7e, 0x00, 0x0f, 0xb0, 0x03, 0xe2, 0x04, - 0x70, 0x00, 0x00, 0x00, 0x00, 0x48, 0x11, 0x9c, - 0x00, 0xb7, 0x00, 0x2d, 0xc0, 0x0b, 0x70, 0x02, - 0xdc, 0x00, 0xb7, 0x00, 0x2d, 0xc0, 0x0b, 0x34, - 0xa3, 0x1c, 0x00, 0xb7, 0x00, 0x2f, 0x80, 0x08, - 0x70, 0x02, 0xdc, 0x00, 0xa7, 0x06, 0x21, 0xc0, - 0x0b, 0xd0, 0x0a, 0x50, 0x00, 0xa3, 0x50, 0xa1, - 0xc0, 0x0b, 0x74, 0x82, 0x5c, 0x00, 0xe7, 0x00, - 0x29, 0x40, 0x0e, 0xf6, 0x03, 0x5c, 0x00, 0xed, - 0x09, 0x00, 0x3d, 0x00, 0xd7, 0x00, 0x25, 0xc0, - 0x0b, 0x70, 0x02, 0xd2, 0x06, 0x60, 0x00, 0x00, - 0x00, 0x00, 0xc0, 0x00, 0x9e, 0x00, 0xb7, 0x80, - 0x2d, 0xe0, 0x0b, 0x78, 0x02, 0xde, 0x00, 0xb7, - 0x80, 0x2d, 0xe8, 0x0b, 0x78, 0x02, 0x1e, 0x00, - 0xb7, 0x80, 0x2d, 0xe0, 0x09, 0x58, 0x02, 0xde, - 0x28, 0x83, 0x80, 0x65, 0x61, 0x0b, 0x58, 0x82, - 0x1a, 0x00, 0x87, 0x80, 0x21, 0xe0, 0x49, 0x78, - 0x06, 0xdf, 0x00, 0x97, 0x80, 0x61, 0x60, 0x0b, - 0x78, 0x22, 0x42, 0x09, 0x84, 0x80, 0x2d, 0x20, - 0x8b, 0x78, 0x42, 0xf8, 0x40, 0x20, 0x00, 0x00, - 0x00, 0x00, 0x48, 0x14, 0xcc, 0x00, 0xb3, 0x00, - 0x2c, 0xc0, 0x0b, 0x30, 0x02, 0xcc, 0x00, 0xbb, - 0x00, 0x2c, 0xc0, 0x0b, 0x30, 0x0a, 0x0c, 0x00, - 0xb3, 0x00, 0x2c, 0xf0, 0x49, 0x18, 0x02, 0xce, - 0x00, 0xa3, 0xa0, 0x24, 0xfc, 0x0b, 0x98, 0x02, - 0x08, 0x00, 0xa3, 0x00, 0x20, 0xb8, 0x0b, 0x30, - 0x02, 0x4e, 0x00, 0xa3, 0x40, 0x28, 0xc0, 0x4a, - 0x30, 0x02, 0x4c, 0x10, 0x93, 0x00, 0x24, 0xc0, - 0x0b, 0x30, 0x02, 0xd2, 0x00, 0x30, 0x00, 0x00, - 0x00, 0x00, 0xe8, 0x15, 0xa8, 0x00, 0xfa, 0x00, - 0x3e, 0x80, 0x0d, 0xa0, 0x03, 0xe8, 0x00, 0xfa, - 0x00, 0x3e, 0x80, 0x0f, 0xa0, 0x03, 0x28, 0x00, - 0xda, 0x00, 0x3f, 0x81, 0x0d, 0xaa, 0x03, 0xfb, - 0x00, 0xce, 0xc0, 0xa7, 0x80, 0x0f, 0xe4, 0x03, - 0x7b, 0x00, 0xca, 0x00, 0x21, 0xa9, 0x0d, 0xa0, - 0x02, 0xf9, 0x00, 0x9e, 0x60, 0x31, 0x90, 0x0f, - 0xa0, 0x03, 0x68, 0x00, 0xca, 0x00, 0x3e, 0x80, - 0x0f, 0xa0, 0x03, 0xfa, 0x00, 0x60, 0x00, 0x00, - 0x00, 0x00, 0x48, 0x00, 0xe0, 0x00, 0xf8, 0x00, - 0x3e, 0x00, 0x0f, 0x80, 0x03, 0xe0, 0x00, 0xf8, - 0x00, 0x3e, 0x00, 0x0f, 0x80, 0x03, 0xa0, 0x00, - 0xf8, 0x00, 0xed, 0x09, 0x00, 0x3e, 0x00, 0x3e, - 0x06, 0x6e, 0x80, 0x03, 0x60, 0x20, 0xe8, 0x50, - 0x7a, 0x01, 0x0f, 0x88, 0x23, 0xe3, 0x40, 0xf8, - 0x01, 0x3e, 0x00, 0x43, 0x84, 0x03, 0xc2, 0x10, - 0xf8, 0x08, 0x3e, 0x20, 0x07, 0x80, 0x23, 0xf0, - 0x00, 0xfc, 0x00, 0x3f, 0x00, 0x0b, 0x80, 0x03, - 0xd2, 0x04, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x10, 0xe4, 0x00, 0xf9, 0x00, 0x3e, 0x40, 0x0f, - 0x90, 0x03, 0xe4, 0x00, 0xf9, 0x00, 0x2a, 0x40, - 0x0f, 0x90, 0x03, 0xe4, 0x00, 0xf9, 0x00, 0x3c, - 0x60, 0x0c, 0x98, 0x03, 0xe4, 0x00, 0xc9, 0x80, - 0x3e, 0x40, 0x4f, 0x90, 0x03, 0x24, 0x84, 0xf1, - 0x82, 0x32, 0x44, 0x8c, 0x91, 0x43, 0xe4, 0x08, - 0xd9, 0x00, 0x12, 0x40, 0x0e, 0x90, 0x03, 0x26, - 0x00, 0xf9, 0x00, 0x32, 0x40, 0x0f, 0x90, 0x23, - 0xc2, 0x04, 0x30, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x04, 0x64, 0x00, 0xb9, 0x00, 0x2e, 0x40, 0x0b, - 0x90, 0x02, 0xe4, 0x00, 0xb9, 0x00, 0x02, 0x40, - 0x09, 0x90, 0x02, 0x24, 0x00, 0x99, 0x00, 0x2e, - 0x42, 0x00, 0x98, 0x02, 0xc4, 0x01, 0xf9, 0x40, - 0x2e, 0x41, 0x0b, 0x94, 0x21, 0xe7, 0x00, 0xe9, - 0x02, 0x22, 0x60, 0x4d, 0x98, 0x02, 0xe5, 0x00, - 0xa9, 0x00, 0x36, 0x60, 0x48, 0x90, 0x12, 0xa5, - 0x81, 0xb9, 0x00, 0x36, 0x40, 0x0b, 0x90, 0x02, - 0xe0, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x18, - 0x05, 0x24, 0x00, 0xb9, 0x00, 0x2e, 0x40, 0x0b, - 0x90, 0x02, 0xe4, 0x00, 0xb9, 0x00, 0x2e, 0x40, - 0x0b, 0x10, 0x02, 0xa4, 0x00, 0xb9, 0x00, 0x0e, - 0xc4, 0x28, 0x91, 0x02, 0x65, 0x90, 0x89, 0x22, - 0x2e, 0xc0, 0x09, 0x90, 0x82, 0x24, 0x04, 0xb9, - 0x50, 0x26, 0x40, 0x08, 0x94, 0x02, 0xe4, 0x88, - 0xb1, 0x04, 0x2a, 0x44, 0x0a, 0x10, 0x06, 0x24, - 0x40, 0xa5, 0x00, 0x27, 0x40, 0xed, 0x09, 0x00, - 0x3f, 0x00, 0x0b, 0x90, 0x02, 0xc6, 0x00, 0x40, - 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x04, 0x00, - 0xb1, 0x00, 0x2c, 0x40, 0x0b, 0x10, 0x02, 0xc4, - 0x00, 0xb1, 0x00, 0x24, 0x4a, 0x0b, 0x12, 0x82, - 0x04, 0x04, 0x91, 0x01, 0x6c, 0x50, 0x08, 0x10, - 0x02, 0xc4, 0xa1, 0xb1, 0x2c, 0x6c, 0x50, 0x8b, - 0x14, 0x0a, 0x84, 0x00, 0xa1, 0x00, 0xa0, 0x60, - 0x09, 0x14, 0x02, 0xc7, 0x01, 0x81, 0x45, 0x2e, - 0x4a, 0x08, 0x14, 0x06, 0x14, 0x00, 0xb5, 0x40, - 0x25, 0x40, 0x0b, 0x10, 0x02, 0xc2, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xb8, 0x0d, 0x60, 0x00, - 0xf8, 0x00, 0x3e, 0x00, 0x0f, 0x80, 0x03, 0xe0, - 0x00, 0xf8, 0x00, 0x3e, 0x08, 0x0b, 0x82, 0x03, - 0xa0, 0x00, 0xf8, 0x00, 0x2e, 0x00, 0x08, 0x80, - 0x03, 0xe0, 0x80, 0x8a, 0x20, 0x3e, 0x00, 0x0f, - 0x80, 0x02, 0x28, 0x08, 0xf8, 0x00, 0x36, 0x00, - 0x0c, 0x80, 0x06, 0xc0, 0x04, 0xd0, 0x00, 0xba, - 0x08, 0x0e, 0x80, 0x0b, 0x20, 0x10, 0xe8, 0x00, - 0x37, 0x00, 0x0f, 0x80, 0x03, 0xee, 0x02, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x98, 0x0d, 0xe4, 0x00, - 0xf9, 0x00, 0x3e, 0x40, 0x0f, 0x90, 0x03, 0xe4, - 0x00, 0xf9, 0x2c, 0x32, 0x40, 0x0d, 0x92, 0xa7, - 0xe4, 0x00, 0xd9, 0x00, 0x3f, 0x51, 0x0f, 0xd0, - 0x43, 0xf4, 0x00, 0xed, 0x28, 0x2f, 0x50, 0x0f, - 0xd0, 0x03, 0x54, 0x00, 0x69, 0x41, 0x73, 0x50, - 0x47, 0x94, 0x23, 0xf5, 0x00, 0xfd, 0x00, 0x33, - 0x41, 0x07, 0x94, 0x03, 0xe5, 0x00, 0xf9, 0x40, - 0x3e, 0x50, 0x0d, 0x90, 0x03, 0xe6, 0x06, 0x70, - 0x00, 0x00, 0x00, 0x00, 0x18, 0x01, 0xe4, 0x00, - 0xf9, 0x00, 0x3e, 0x40, 0x0f, 0x90, 0x03, 0xe4, - 0x00, 0xd9, 0x01, 0x36, 0x40, 0x8d, 0x91, 0x43, - 0x24, 0x00, 0xf9, 0x00, 0x37, 0x48, 0x0c, 0x50, - 0xed, 0x09, 0x00, 0x40, 0x00, 0x03, 0xb4, 0x0d, - 0xfd, 0x10, 0x1e, 0x48, 0x0f, 0xd1, 0x03, 0xf4, - 0x00, 0xfd, 0x28, 0x37, 0x48, 0x0d, 0xd0, 0x5b, - 0x74, 0x00, 0xb9, 0x10, 0x23, 0xc8, 0x0f, 0x92, - 0x83, 0xf4, 0x80, 0xf9, 0x00, 0x32, 0x40, 0x0f, - 0x90, 0x03, 0xc6, 0x04, 0x70, 0x00, 0x00, 0x00, - 0x00, 0x38, 0x10, 0xe0, 0x00, 0xb8, 0x00, 0x2e, - 0x00, 0x0b, 0x80, 0x02, 0xe0, 0x00, 0xb0, 0x0c, - 0x2e, 0x00, 0x0b, 0x81, 0x0a, 0x20, 0x00, 0xb8, - 0x00, 0x2e, 0x0a, 0x88, 0x80, 0x02, 0x20, 0x00, - 0xb8, 0x11, 0x2e, 0x02, 0x09, 0x80, 0x00, 0xe8, - 0x00, 0x98, 0x00, 0x2e, 0x04, 0x0f, 0x84, 0x82, - 0x20, 0x20, 0x98, 0x00, 0x22, 0x04, 0x0b, 0x82, - 0x42, 0xe0, 0x48, 0xb0, 0x48, 0x22, 0x00, 0x0b, - 0x80, 0x02, 0xce, 0x44, 0x30, 0x00, 0x00, 0x00, - 0x00, 0x08, 0x05, 0xc4, 0x00, 0xb1, 0x00, 0x2c, - 0x40, 0x0b, 0x10, 0x02, 0xc4, 0x00, 0x91, 0x20, - 0x28, 0x44, 0x09, 0x10, 0x02, 0x04, 0x00, 0xb1, - 0x00, 0x2c, 0x4c, 0x08, 0x10, 0x42, 0x84, 0x40, - 0x81, 0x00, 0x2c, 0x44, 0x09, 0x10, 0x42, 0xc4, - 0x00, 0xb1, 0x00, 0x2c, 0x40, 0x8b, 0x13, 0x02, - 0x06, 0x40, 0x99, 0x00, 0x24, 0x40, 0x0b, 0x12, - 0x82, 0xc4, 0x00, 0xb1, 0x30, 0x28, 0x44, 0x0b, - 0x10, 0x02, 0xc2, 0x01, 0x70, 0x00, 0x00, 0x00, - 0x00, 0x18, 0x15, 0xa4, 0x00, 0xb9, 0x00, 0x2e, - 0x40, 0x0b, 0x90, 0x02, 0xe4, 0x00, 0xb9, 0x00, - 0x2e, 0x40, 0x0b, 0x90, 0x00, 0x24, 0x00, 0x99, - 0x02, 0x2e, 0x50, 0x28, 0x98, 0x02, 0x24, 0x61, - 0xb9, 0x18, 0x2e, 0x40, 0x09, 0x92, 0x82, 0xe4, - 0x00, 0x99, 0x00, 0x2e, 0x40, 0x0a, 0x90, 0x02, - 0x24, 0x00, 0x99, 0x00, 0xa6, 0x40, 0x8b, 0x90, - 0x02, 0xe4, 0x10, 0xb9, 0x00, 0x2a, 0x40, 0x0b, - 0x90, 0x02, 0xc6, 0xed, 0x09, 0x00, 0x41, 0x00, - 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x15, - 0xe4, 0x00, 0xf9, 0x00, 0x2e, 0x40, 0x0f, 0x90, - 0x03, 0xe4, 0x00, 0xd9, 0x00, 0x36, 0x40, 0x0d, - 0x90, 0x03, 0x24, 0x00, 0x79, 0x00, 0x36, 0x50, - 0x08, 0x18, 0x03, 0xa6, 0x00, 0x79, 0x00, 0x3e, - 0x64, 0x8d, 0x98, 0x41, 0xe6, 0x04, 0xf9, 0x02, - 0x36, 0x42, 0x09, 0x90, 0x03, 0x24, 0x00, 0xf9, - 0x9a, 0x16, 0x60, 0x0f, 0x90, 0x03, 0xe4, 0x00, - 0xf9, 0x00, 0xba, 0x40, 0x0f, 0x90, 0x03, 0xe8, - 0x80, 0x70, 0x00, 0x00, 0x00, 0x00, 0x28, 0x01, - 0xa4, 0x00, 0xf9, 0x00, 0x3e, 0x40, 0x0f, 0x90, - 0x03, 0xe4, 0x00, 0xf9, 0x00, 0x3e, 0x40, 0x0f, - 0x10, 0x03, 0xe4, 0x00, 0xf9, 0x00, 0x34, 0x42, - 0x0f, 0x90, 0x03, 0xe4, 0x00, 0xf9, 0x00, 0x3e, - 0x40, 0x0f, 0x90, 0x83, 0xe6, 0x80, 0xd9, 0x00, - 0x3e, 0x42, 0x0f, 0x90, 0x03, 0xa4, 0x08, 0xc9, - 0x00, 0x22, 0x44, 0x0f, 0x90, 0x03, 0xe4, 0x00, - 0xf9, 0x00, 0x36, 0x40, 0x0f, 0x90, 0x03, 0xca, - 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x28, 0x10, - 0xa0, 0x00, 0xf8, 0x00, 0x3e, 0x00, 0x0d, 0x80, - 0x03, 0xe0, 0x00, 0xf8, 0x00, 0x3a, 0x00, 0x0f, - 0x80, 0x03, 0xe0, 0x00, 0xf8, 0x00, 0x3e, 0x10, - 0x4c, 0x80, 0x03, 0x60, 0x00, 0xf8, 0x42, 0x3e, - 0x01, 0x0d, 0x84, 0x03, 0xe3, 0x00, 0xd8, 0x90, - 0x3e, 0x10, 0x0c, 0x81, 0x8b, 0x60, 0x00, 0xc8, - 0x00, 0x3e, 0x00, 0x0f, 0x80, 0x01, 0xe0, 0x00, - 0xc8, 0x04, 0x32, 0x00, 0x0f, 0x80, 0x03, 0xca, - 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x28, 0x05, - 0x28, 0x00, 0xba, 0x00, 0x2e, 0x80, 0x0b, 0xa0, - 0x02, 0xe8, 0x00, 0xba, 0x00, 0x32, 0x80, 0x03, - 0xa0, 0x02, 0xe8, 0x00, 0xba, 0x00, 0x2f, 0x90, - 0x08, 0xee, 0x02, 0x39, 0x80, 0x3e, 0xed, 0x09, - 0x00, 0x42, 0x00, 0x10, 0x2e, 0x80, 0x0b, 0xe6, - 0x02, 0xfb, 0x00, 0xbe, 0x41, 0x2f, 0xa0, 0x48, - 0xe8, 0x03, 0x1b, 0x00, 0xa2, 0x00, 0x2e, 0x80, - 0x0b, 0xa0, 0x02, 0xf8, 0x00, 0x8a, 0x00, 0xa2, - 0x80, 0x0b, 0xa0, 0x02, 0xc8, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x28, 0x05, 0x4c, 0x00, 0xb3, - 0x00, 0x2c, 0xc0, 0x0b, 0x30, 0x02, 0xcc, 0x0c, - 0x33, 0x02, 0x2c, 0xc0, 0x0b, 0x30, 0x02, 0x8c, - 0x00, 0xb3, 0x00, 0x2c, 0xc0, 0x28, 0x1e, 0x02, - 0x0e, 0x20, 0xb3, 0x50, 0x2c, 0xc0, 0x0b, 0x2c, - 0x02, 0xc6, 0x40, 0xb1, 0x84, 0x28, 0xa4, 0x2a, - 0xa8, 0x02, 0x04, 0x80, 0x83, 0x00, 0x2c, 0xc4, - 0x0b, 0x30, 0x02, 0xcc, 0x04, 0x9b, 0x02, 0x84, - 0xc0, 0x0b, 0x30, 0x02, 0xca, 0x04, 0x50, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x01, 0x1c, 0x00, 0xb7, - 0x00, 0x2d, 0xc0, 0x0b, 0x70, 0x02, 0xdc, 0x00, - 0xb7, 0x80, 0x25, 0xc0, 0x0b, 0x72, 0x02, 0xdc, - 0x00, 0xb7, 0x00, 0x2d, 0xd0, 0x08, 0xf0, 0x22, - 0x1c, 0x00, 0xb7, 0x00, 0x2d, 0xc0, 0x09, 0x70, - 0x02, 0xd4, 0x00, 0xb4, 0x00, 0x0c, 0xa0, 0x08, - 0x70, 0x22, 0x05, 0x00, 0xa7, 0x20, 0x25, 0xc0, - 0x0b, 0x72, 0x00, 0xd6, 0x00, 0x97, 0x20, 0x25, - 0xc0, 0x8b, 0x70, 0x02, 0xc8, 0x40, 0x40, 0x00, - 0x00, 0x00, 0x00, 0xa8, 0x08, 0x1e, 0x00, 0xf7, - 0x80, 0x3d, 0xe0, 0x0f, 0x78, 0x03, 0xde, 0x00, - 0xf7, 0xc8, 0x3d, 0xe0, 0x0f, 0x78, 0x03, 0x9e, - 0x00, 0xf7, 0x80, 0x3f, 0xa0, 0x0c, 0x78, 0x03, - 0x5e, 0x00, 0xf7, 0x80, 0x2d, 0xfc, 0x0d, 0x78, - 0x03, 0xd2, 0x00, 0xd5, 0x80, 0x3d, 0xa0, 0x0c, - 0x38, 0x03, 0x16, 0x01, 0xc7, 0xa0, 0x3d, 0xe0, - 0x0f, 0x7b, 0x03, 0xde, 0x02, 0xd7, 0xa0, 0x25, - 0xe0, 0x07, 0x78, 0x03, 0xca, 0x02, 0x00, 0x00, - 0x00, 0xed, 0x09, 0x00, 0x43, 0x00, 0x00, 0x00, - 0x08, 0x1d, 0xac, 0x00, 0xfb, 0x00, 0x3e, 0xc0, - 0x0f, 0xb0, 0x03, 0xec, 0x00, 0xfb, 0x00, 0x1a, - 0xc0, 0x07, 0xb3, 0x07, 0xec, 0x00, 0xfb, 0x00, - 0x3e, 0xc0, 0x0f, 0xb0, 0x01, 0x6c, 0x04, 0xfb, - 0x02, 0x1e, 0xc8, 0x0f, 0xb0, 0x23, 0xe8, 0x10, - 0xf8, 0x02, 0x1e, 0xc0, 0x0b, 0xb0, 0x03, 0xa4, - 0x00, 0xfb, 0x68, 0x3e, 0xc0, 0x0f, 0xb0, 0x03, - 0x40, 0x00, 0xeb, 0x48, 0x3a, 0xc0, 0x0f, 0xb0, - 0x03, 0xc2, 0x06, 0x60, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x05, 0xfe, 0x00, 0xff, 0x80, 0x3f, 0xe0, - 0x0f, 0xf8, 0x03, 0x7e, 0x00, 0xff, 0x80, 0x3f, - 0xe0, 0x0d, 0xf6, 0x03, 0x7e, 0x00, 0xff, 0x80, - 0x3f, 0xe0, 0x0e, 0xd0, 0x37, 0xfa, 0x40, 0x4f, - 0x90, 0x33, 0xe4, 0x0d, 0xf8, 0x19, 0xb6, 0x50, - 0xfd, 0x90, 0x33, 0xa0, 0x03, 0xf8, 0x03, 0x36, - 0x00, 0xdf, 0x88, 0x33, 0xe4, 0x0f, 0xf8, 0x83, - 0xfe, 0x00, 0xcf, 0x88, 0x37, 0xe0, 0x0c, 0xf8, - 0x03, 0xd0, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, - 0xa8, 0x11, 0x9c, 0x00, 0xb7, 0x00, 0x2d, 0xc0, - 0x0b, 0x70, 0x02, 0xdc, 0x00, 0xb7, 0x00, 0x3d, - 0xc0, 0x08, 0x71, 0x06, 0xdc, 0x00, 0xb7, 0x00, - 0x2f, 0xc0, 0x08, 0x51, 0x02, 0xd9, 0x18, 0x8f, - 0x10, 0x21, 0xc6, 0x0b, 0x60, 0x02, 0x14, 0x00, - 0xb4, 0x01, 0x29, 0x08, 0x49, 0x66, 0x03, 0xd4, - 0x00, 0xbf, 0x18, 0x21, 0xc0, 0x0b, 0x70, 0x03, - 0xd4, 0x08, 0xd7, 0x00, 0x35, 0xc0, 0x0d, 0x70, - 0x02, 0xea, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x9c, 0x00, 0xb7, 0x00, 0x2d, 0xc0, - 0x0b, 0x70, 0x02, 0xdc, 0x00, 0xb7, 0x00, 0x2d, - 0xc0, 0x0b, 0x71, 0x02, 0xdc, 0x00, 0x97, 0x00, - 0x2d, 0xc0, 0x0a, 0x51, 0x02, 0xd4, 0x0a, 0xa4, - 0x00, 0x21, 0xc4, 0x1b, 0xed, 0x09, 0x00, 0x44, - 0x00, 0xf0, 0x02, 0x90, 0x04, 0xb3, 0x00, 0x69, - 0x80, 0x19, 0x70, 0x02, 0x54, 0x00, 0xb7, 0x00, - 0x29, 0x42, 0x1b, 0x70, 0x02, 0xcc, 0x00, 0x83, - 0x08, 0x20, 0xc0, 0x0b, 0x70, 0x02, 0x60, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x20, 0x14, 0xcc, - 0x00, 0xb3, 0x00, 0x2c, 0xc0, 0x0b, 0x30, 0x02, - 0xcc, 0x00, 0xb3, 0x00, 0x28, 0xc0, 0x0a, 0x30, - 0x02, 0xcc, 0x00, 0xb3, 0x00, 0x2e, 0xd8, 0x08, - 0x11, 0x02, 0xc5, 0x00, 0x80, 0x00, 0x20, 0xc0, - 0x0b, 0x30, 0x02, 0x08, 0x00, 0xb2, 0x00, 0x20, - 0x44, 0x0b, 0xb0, 0x22, 0x85, 0xc0, 0xb3, 0x40, - 0x20, 0x70, 0x0b, 0x30, 0x02, 0x82, 0x40, 0x93, - 0x40, 0x24, 0xd2, 0x0b, 0x30, 0x02, 0xd8, 0x04, - 0x30, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x15, 0xac, - 0x00, 0xfb, 0x00, 0x3e, 0xc0, 0x0f, 0xb0, 0x03, - 0x6c, 0x00, 0xff, 0x00, 0x2e, 0xc0, 0x0f, 0xf0, - 0x02, 0x6c, 0x00, 0xdb, 0x00, 0x3e, 0xb8, 0x0e, - 0x80, 0x03, 0xe4, 0x00, 0xc9, 0x10, 0xb3, 0xe0, - 0x0d, 0x30, 0x03, 0xa4, 0x04, 0xb9, 0x00, 0xba, - 0x90, 0x0f, 0xb0, 0x22, 0x24, 0x04, 0x7f, 0xc4, - 0xba, 0xf0, 0x0b, 0xf0, 0x02, 0xe8, 0x00, 0xcf, - 0x80, 0x62, 0xd2, 0x0f, 0xb0, 0x03, 0xea, 0x04, - 0x60, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0xec, - 0x00, 0xfb, 0x00, 0x3e, 0xc0, 0x0f, 0xb0, 0x03, - 0xec, 0x00, 0xfb, 0x00, 0x3c, 0xc0, 0x0d, 0xb0, - 0x03, 0xec, 0x00, 0xfb, 0x00, 0x3e, 0x80, 0x0f, - 0x80, 0x23, 0xe5, 0x28, 0xd8, 0x00, 0x3e, 0xc0, - 0x0f, 0xb6, 0x03, 0xe4, 0x80, 0xfa, 0x40, 0x3e, - 0x92, 0x0d, 0xb4, 0x03, 0xe4, 0x10, 0x7b, 0x20, - 0x3e, 0x48, 0x8f, 0xb0, 0x03, 0x61, 0x28, 0xfb, - 0x08, 0x3e, 0xc0, 0x0d, 0xb0, 0x03, 0xe0, 0x00, - 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x10, 0xed, - 0x09, 0x00, 0x45, 0x00, 0xfc, 0x00, 0xff, 0x00, - 0x3f, 0xc0, 0x0f, 0xf0, 0x03, 0xfc, 0x00, 0xff, - 0x00, 0x3e, 0xc0, 0xc6, 0xf0, 0x43, 0xfc, 0x00, - 0xff, 0x00, 0x2f, 0x80, 0x0c, 0xe0, 0x03, 0xe8, - 0x00, 0xfd, 0x00, 0x3d, 0xc0, 0x0e, 0xe0, 0x11, - 0xf2, 0x84, 0xd5, 0xa0, 0x3b, 0x00, 0x0c, 0xa0, - 0x0b, 0x36, 0x04, 0xff, 0x00, 0x23, 0xc0, 0x0f, - 0xf0, 0x03, 0xb0, 0x00, 0x77, 0x00, 0x31, 0xc1, - 0x0e, 0xf0, 0x03, 0xc0, 0x44, 0x30, 0x00, 0x00, - 0x00, 0x00, 0x81, 0x04, 0x6c, 0x00, 0x9b, 0x00, - 0x2e, 0xc0, 0x0b, 0xb0, 0x02, 0xec, 0x00, 0xbb, - 0x00, 0x0e, 0xc1, 0x08, 0xb0, 0x02, 0xec, 0x00, - 0xbb, 0x00, 0x2e, 0xb2, 0x08, 0xa4, 0x22, 0xeb, - 0x40, 0xb8, 0xe0, 0x2e, 0xc0, 0x8a, 0xbc, 0x02, - 0x28, 0x00, 0xba, 0x00, 0x20, 0x78, 0x0a, 0xbc, - 0x02, 0x2e, 0x00, 0x93, 0x00, 0x22, 0x44, 0x0f, - 0xb0, 0x00, 0xe1, 0x80, 0xbb, 0x00, 0x2a, 0xc0, - 0x0a, 0xb0, 0x02, 0xf0, 0x40, 0x10, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x05, 0x2c, 0x00, 0xbb, 0x00, - 0x2e, 0xc0, 0x0b, 0xb0, 0x02, 0xec, 0x00, 0xbb, - 0x00, 0x2e, 0xc0, 0x0a, 0xb0, 0x02, 0xec, 0x00, - 0xbb, 0x00, 0x26, 0xa0, 0x08, 0x9c, 0x02, 0xe0, - 0x00, 0x99, 0x80, 0x2e, 0xc0, 0x08, 0xbc, 0x0a, - 0xec, 0x08, 0xb9, 0x08, 0x22, 0xc4, 0x0a, 0xb8, - 0x02, 0xec, 0x80, 0xbb, 0x02, 0x2a, 0xc0, 0x1b, - 0xb0, 0x12, 0xa8, 0x80, 0xbb, 0x00, 0x2a, 0xc0, - 0x18, 0xb0, 0x02, 0xe0, 0x00, 0x40, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x04, 0x0c, 0x00, 0xb3, 0x00, - 0x2c, 0xc0, 0x0b, 0x30, 0x02, 0xcc, 0x00, 0xb3, - 0x00, 0x2c, 0xc0, 0x08, 0x30, 0x02, 0xcc, 0x00, - 0xb3, 0x00, 0x2c, 0x80, 0x0a, 0x10, 0x02, 0xc0, - 0x00, 0xb0, 0x00, 0x0c, 0xc0, 0x08, 0x90, 0x02, - 0x0a, 0x00, 0xed, 0x09, 0x00, 0x46, 0x00, 0x32, - 0x00, 0x20, 0x40, 0xb8, 0x10, 0x06, 0x0e, 0x00, - 0x1b, 0x00, 0x08, 0x40, 0x1a, 0x30, 0x02, 0x40, - 0x00, 0xb3, 0x00, 0x28, 0xc0, 0x02, 0x30, 0x02, - 0xc2, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0d, 0x6c, 0x00, 0xfb, 0x00, 0x3e, 0xc0, 0x0f, - 0xb0, 0x03, 0xec, 0x00, 0xff, 0x00, 0x3e, 0xc0, - 0x0e, 0xf0, 0x03, 0xec, 0x00, 0xfb, 0x00, 0x36, - 0x00, 0x2c, 0x90, 0x03, 0xe0, 0x00, 0xf8, 0x00, - 0x3f, 0xc0, 0x2e, 0xb0, 0x43, 0xe8, 0x08, 0x9a, - 0x00, 0xb2, 0x40, 0x0e, 0xb0, 0x23, 0x60, 0x00, - 0xff, 0x00, 0x3a, 0x40, 0x0b, 0xf0, 0x03, 0xa0, - 0x00, 0xff, 0x00, 0x32, 0xc0, 0x0e, 0xb0, 0x03, - 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x1d, 0xfc, 0x00, 0xdf, 0x00, 0x3f, 0xc0, 0x0f, - 0xf0, 0x03, 0xfc, 0x00, 0xff, 0x00, 0x3f, 0xc0, - 0x0f, 0xf0, 0x03, 0xfc, 0x00, 0xff, 0x00, 0x3f, - 0x00, 0x0d, 0xd0, 0x03, 0xf0, 0x00, 0xfc, 0x00, - 0x3f, 0xc0, 0x07, 0x40, 0x03, 0x7c, 0x00, 0xbf, - 0x00, 0x37, 0x40, 0x0f, 0xe0, 0x03, 0xbc, 0x00, - 0xbf, 0x00, 0x37, 0x40, 0x0f, 0xf0, 0x03, 0xf0, - 0x00, 0xff, 0x00, 0x2f, 0xc0, 0x0f, 0xf0, 0x03, - 0xe8, 0x07, 0x70, 0x00, 0x00, 0x00, 0x00, 0xc0, - 0x05, 0xf8, 0x00, 0xec, 0x11, 0x33, 0x04, 0x4c, - 0xc1, 0x03, 0xf1, 0x00, 0xfc, 0x10, 0x3f, 0x00, - 0x0f, 0xc0, 0x03, 0xf0, 0x00, 0xcc, 0x00, 0x33, - 0x00, 0x0c, 0xc1, 0x23, 0xf0, 0x00, 0xfc, 0x00, - 0x33, 0x00, 0x0f, 0xc0, 0x03, 0x3c, 0x00, 0x4f, - 0x03, 0x3f, 0xc0, 0x8f, 0xf0, 0x03, 0xfc, 0x00, - 0xff, 0x00, 0x33, 0xc0, 0x0f, 0xf0, 0x23, 0xfc, - 0x00, 0xff, 0x00, 0x3f, 0x01, 0x8d, 0xc3, 0x13, - 0x30, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x10, 0xe8, 0x00, 0xb0, 0xa0, 0xed, 0x09, 0x00, - 0x47, 0x00, 0x22, 0x28, 0x08, 0x8a, 0x22, 0xe2, - 0x00, 0xb8, 0x80, 0x2e, 0x80, 0x1b, 0x90, 0x12, - 0xec, 0x00, 0x89, 0x01, 0x2a, 0x00, 0x08, 0x88, - 0x02, 0xe2, 0x20, 0xb8, 0x00, 0x22, 0x80, 0x0b, - 0x80, 0x02, 0x3e, 0x80, 0x8f, 0x00, 0x2e, 0xc1, - 0x0b, 0xb0, 0x22, 0xec, 0x00, 0xbb, 0x00, 0xa2, - 0xc1, 0x8b, 0xb0, 0x02, 0xec, 0x10, 0xbb, 0x00, - 0x2e, 0x96, 0x08, 0x83, 0x02, 0x20, 0x04, 0x30, - 0x00, 0x00, 0x00, 0x00, 0x88, 0x05, 0xcc, 0x00, - 0xa0, 0x20, 0x20, 0x08, 0x08, 0x22, 0x02, 0xc0, - 0x80, 0xb0, 0x20, 0x2c, 0x40, 0x0b, 0x20, 0x02, - 0xe0, 0x02, 0x82, 0x04, 0x2a, 0x20, 0x08, 0x02, - 0x02, 0xc0, 0x80, 0xb8, 0x80, 0x20, 0x40, 0x4b, - 0xa0, 0x06, 0x0c, 0x20, 0x93, 0x00, 0x2c, 0xc0, - 0x0b, 0x30, 0x02, 0xcc, 0x00, 0xb3, 0x00, 0x20, - 0xc0, 0x0b, 0x30, 0x02, 0xcc, 0x14, 0xb3, 0x01, - 0x2c, 0x08, 0x09, 0x00, 0x02, 0x22, 0x01, 0x70, - 0x00, 0x00, 0x00, 0x00, 0xc0, 0x15, 0xac, 0x00, - 0xb0, 0x00, 0x20, 0x00, 0x08, 0xa0, 0x02, 0xe0, - 0x00, 0xb8, 0x00, 0x2e, 0xc0, 0x0b, 0xb0, 0x06, - 0xec, 0x00, 0xab, 0x04, 0x2a, 0x00, 0x08, 0x80, - 0x02, 0xe0, 0x10, 0xb8, 0x00, 0x22, 0xc0, 0x0b, - 0xa0, 0x0a, 0x2c, 0x10, 0x9b, 0x04, 0x2e, 0x50, - 0x8b, 0xb0, 0x02, 0xec, 0x00, 0xbb, 0x00, 0x22, - 0xc0, 0x0b, 0xb0, 0x02, 0xec, 0x00, 0xbb, 0x00, - 0x2e, 0x44, 0x08, 0x90, 0x02, 0x30, 0x04, 0x60, - 0x00, 0x00, 0x00, 0x00, 0x40, 0x15, 0xe8, 0x00, - 0xea, 0x20, 0xb2, 0x90, 0x2c, 0x82, 0x03, 0xe8, - 0x90, 0xfa, 0x40, 0x3e, 0x00, 0x0b, 0x80, 0x03, - 0xe0, 0x08, 0xc0, 0x00, 0x30, 0x80, 0x8c, 0xa2, - 0x03, 0xe8, 0x80, 0xf2, 0x00, 0x32, 0x00, 0x0f, - 0x00, 0x03, 0x2c, 0x02, 0xdb, 0x00, 0x3e, 0x90, - 0xed, 0x09, 0x00, 0x48, 0x00, 0x0f, 0xb0, 0x23, - 0xec, 0x10, 0xfb, 0x00, 0x32, 0xc0, 0x0f, 0xb0, - 0x03, 0xec, 0x00, 0xbb, 0x03, 0x3e, 0x61, 0x0d, - 0x98, 0x0b, 0x10, 0x04, 0x70, 0x00, 0x00, 0x00, - 0x00, 0xe0, 0x01, 0xb8, 0x00, 0xfe, 0x02, 0x3f, - 0x80, 0x0f, 0xc0, 0x03, 0xf8, 0x00, 0xfe, 0x00, - 0x3f, 0x80, 0x0f, 0xd0, 0x03, 0xfc, 0x00, 0xdd, - 0x00, 0x37, 0x81, 0x0b, 0xe0, 0x03, 0xf8, 0x00, - 0xfe, 0x01, 0x3f, 0x80, 0x0f, 0xc0, 0x03, 0xfc, - 0x10, 0xef, 0x01, 0x3f, 0xc2, 0x0f, 0xf0, 0x03, - 0xfc, 0x00, 0xf7, 0x00, 0x3f, 0xc1, 0x0f, 0xf0, - 0x03, 0xfc, 0x00, 0xff, 0x00, 0x3d, 0xa2, 0x0f, - 0xcc, 0x43, 0xf8, 0x00, 0x60, 0x00, 0x00, 0x00, - 0x00, 0x40, 0x10, 0xac, 0x00, 0xfa, 0x80, 0x36, - 0xb0, 0x2c, 0xa8, 0x03, 0xea, 0x00, 0xfa, 0xc0, - 0xba, 0x40, 0x0e, 0xa1, 0x03, 0x20, 0x00, 0xfa, - 0x00, 0x32, 0x82, 0x0c, 0xa8, 0x03, 0xea, 0x00, - 0xfa, 0x00, 0x32, 0x40, 0x0f, 0xa1, 0x03, 0x2c, - 0x00, 0xfb, 0x11, 0x3e, 0x80, 0x4e, 0xb0, 0x03, - 0xec, 0x00, 0xfb, 0x00, 0x32, 0xc0, 0x0f, 0xb0, - 0x03, 0xec, 0x00, 0xfb, 0x00, 0x3e, 0x40, 0x2c, - 0x31, 0x03, 0xd0, 0x04, 0x20, 0x00, 0x00, 0x00, - 0x00, 0xc8, 0x05, 0x2c, 0x00, 0xba, 0x80, 0x22, - 0xa0, 0x08, 0xa8, 0x02, 0xea, 0x14, 0xba, 0x80, - 0x22, 0xc0, 0x09, 0xb0, 0x0a, 0x0c, 0x08, 0xbb, - 0x00, 0x22, 0x91, 0x48, 0xa8, 0x02, 0xea, 0x00, - 0x9a, 0x01, 0x22, 0xc0, 0x0b, 0xa8, 0x42, 0x3d, - 0x40, 0xbf, 0x00, 0x2e, 0xd0, 0x08, 0xb0, 0x02, - 0xec, 0x00, 0xbf, 0x00, 0xa3, 0xc0, 0x0b, 0xb0, - 0x02, 0xec, 0x00, 0xbb, 0x00, 0x2e, 0x42, 0x88, - 0xb5, 0x02, 0xf2, 0x00, 0x40, 0x00, 0x00, 0x00, - 0x00, 0xe0, 0x05, 0x48, 0x00, 0xb1, 0x00, 0x24, - 0x40, 0x08, 0x10, 0xed, 0x09, 0x00, 0x49, 0x00, - 0x02, 0xc4, 0x11, 0xb1, 0x00, 0x24, 0x00, 0x09, - 0x08, 0x02, 0x40, 0x00, 0xb0, 0x00, 0x60, 0x40, - 0x08, 0x10, 0x02, 0xc4, 0x00, 0xb1, 0x00, 0x20, - 0x00, 0x0b, 0x10, 0x02, 0x6d, 0x00, 0xb3, 0x80, - 0x2c, 0x80, 0x0a, 0x30, 0x22, 0xcc, 0x00, 0xb3, - 0x00, 0x20, 0xc0, 0x0b, 0x30, 0x02, 0xcc, 0x00, - 0xb3, 0x00, 0x2c, 0x20, 0x08, 0x2c, 0x02, 0xf8, - 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, - 0x1a, 0x00, 0xb5, 0x80, 0x21, 0x60, 0x08, 0x58, - 0x02, 0xd6, 0x00, 0xb5, 0x80, 0x25, 0xa0, 0x09, - 0xd8, 0x02, 0x5e, 0x00, 0xb5, 0xc0, 0x23, 0x60, - 0x08, 0x58, 0x02, 0xd6, 0x00, 0x9d, 0x80, 0x21, - 0xa0, 0x0b, 0xdc, 0x00, 0x5e, 0x20, 0xb7, 0x80, - 0x2d, 0xe4, 0x28, 0x78, 0x02, 0xde, 0x00, 0xb7, - 0x90, 0x21, 0xe0, 0x0b, 0x78, 0x02, 0xde, 0x00, - 0xb7, 0x80, 0x2d, 0xa4, 0x08, 0x68, 0x02, 0xc8, - 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x48, 0x08, - 0x0c, 0x00, 0xf1, 0x00, 0x36, 0x54, 0x0c, 0x30, - 0x03, 0xc4, 0x00, 0xf9, 0x40, 0x3c, 0x44, 0x0f, - 0x21, 0x03, 0x40, 0x00, 0xf2, 0x00, 0x30, 0x40, - 0x0c, 0x10, 0x03, 0xc4, 0x00, 0xf1, 0x04, 0x30, - 0x40, 0x0f, 0x34, 0x03, 0x4c, 0x80, 0xf3, 0x00, - 0x3e, 0x86, 0x0e, 0x30, 0x03, 0xcc, 0x00, 0xfb, - 0x00, 0x30, 0xc0, 0x0f, 0x30, 0x03, 0xcc, 0x00, - 0xf3, 0x00, 0x3e, 0x80, 0x0c, 0x00, 0x03, 0xd2, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x1d, - 0xbc, 0x00, 0xfd, 0x00, 0x3f, 0x41, 0x0f, 0xf0, - 0x03, 0xf4, 0x00, 0xfd, 0x00, 0x3b, 0xc1, 0x1d, - 0x70, 0x03, 0xbc, 0x00, 0xf7, 0x00, 0x3d, 0x40, - 0x0f, 0xd0, 0x03, 0xf4, 0x00, 0xf5, 0x00, 0x3f, - 0xc0, 0x0f, 0x70, 0x0b, 0xbd, 0x00, 0xff, 0x08, - 0x3f, 0x44, 0x2f, 0xf0, 0x03, 0xfc, 0xed, 0x09, - 0x00, 0x4a, 0x00, 0x00, 0xff, 0x00, 0x3f, 0xc2, - 0x0f, 0xf0, 0x03, 0xfc, 0x00, 0xff, 0x10, 0x3f, - 0xc1, 0x0f, 0xd0, 0x03, 0xd0, 0x06, 0x60, 0x00, - 0x00, 0x00, 0x00, 0xa8, 0x05, 0xe8, 0x00, 0xfb, - 0x80, 0x3a, 0xc0, 0x0f, 0x90, 0x03, 0xec, 0x00, - 0xeb, 0x00, 0x32, 0x00, 0x0f, 0x80, 0x03, 0xe0, - 0x00, 0xc8, 0x00, 0x3e, 0xc0, 0x0f, 0xb0, 0x0a, - 0x2c, 0x00, 0xfb, 0x00, 0x2e, 0x00, 0x0f, 0x90, - 0x03, 0xec, 0xc0, 0xcb, 0x40, 0x32, 0xa0, 0x0c, - 0xb0, 0x03, 0xec, 0x00, 0xfb, 0x00, 0xb2, 0xc0, - 0x0f, 0xb0, 0x03, 0xec, 0x00, 0xfb, 0x00, 0x3e, - 0x60, 0x0c, 0xb0, 0x03, 0xea, 0x00, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x48, 0x11, 0x98, 0x00, 0xbf, - 0x00, 0x21, 0xc0, 0x0b, 0x50, 0x02, 0xdc, 0x00, - 0x8f, 0x00, 0x21, 0x80, 0x0b, 0x50, 0x02, 0xdc, - 0x00, 0x85, 0x00, 0x2d, 0xc0, 0x0b, 0xf0, 0x02, - 0x1c, 0x00, 0xb7, 0x00, 0x2d, 0x80, 0x0b, 0x50, - 0x02, 0xdc, 0x80, 0x83, 0x28, 0x35, 0xc0, 0x2a, - 0x70, 0x02, 0xdc, 0x00, 0xb7, 0x40, 0x21, 0xc8, - 0x0b, 0x70, 0x02, 0xdc, 0x00, 0xb7, 0x00, 0x2c, - 0x80, 0x08, 0x60, 0x02, 0xd2, 0x04, 0x60, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0x00, 0x9e, 0x00, 0xb7, - 0x80, 0x29, 0xe0, 0x0b, 0x78, 0x02, 0xde, 0x00, - 0xa7, 0x80, 0x2d, 0x60, 0x0b, 0x68, 0x02, 0xf2, - 0x00, 0x86, 0x80, 0x2d, 0xe0, 0x0b, 0x78, 0x02, - 0x1e, 0x10, 0xb7, 0x80, 0x2d, 0x61, 0x0b, 0x78, - 0x02, 0xde, 0x00, 0x87, 0x80, 0x23, 0xa0, 0x08, - 0x78, 0x02, 0xde, 0x00, 0xa3, 0x80, 0x21, 0xe0, - 0x0b, 0x78, 0x02, 0xde, 0x00, 0xb7, 0x80, 0x2d, - 0xe0, 0x08, 0x78, 0x62, 0xf0, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x48, 0x14, 0xcc, 0x00, 0xb3, - 0x10, 0x22, 0xc4, 0x0b, 0x30, 0x02, 0xce, 0x00, - 0x83, 0xed, 0x09, 0x00, 0x4b, 0x00, 0x80, 0xa4, - 0xc0, 0x0b, 0x30, 0x02, 0xcc, 0x02, 0x83, 0x00, - 0x2c, 0xc0, 0x0b, 0x38, 0x02, 0x0e, 0x04, 0xb3, - 0x00, 0x2c, 0xc0, 0x0b, 0x30, 0x02, 0xcc, 0x00, - 0x83, 0x00, 0x24, 0xc4, 0x0a, 0x30, 0x02, 0xcc, - 0x00, 0xbb, 0x00, 0x20, 0xc0, 0x0b, 0x30, 0x02, - 0xcc, 0x00, 0xb3, 0x00, 0x2c, 0xc0, 0x08, 0xb1, - 0x82, 0xd2, 0x04, 0x30, 0x00, 0x00, 0x00, 0x00, - 0xe8, 0x15, 0xa8, 0x00, 0xfa, 0x82, 0x3a, 0xa0, - 0x0f, 0xa0, 0x03, 0xea, 0x80, 0xea, 0xa0, 0x3e, - 0x80, 0x0b, 0xa0, 0x02, 0xe8, 0x04, 0xca, 0x02, - 0x3e, 0x80, 0x0f, 0xaa, 0x03, 0x2a, 0x80, 0x7a, - 0x00, 0x3c, 0x80, 0x0f, 0xa0, 0x03, 0xe8, 0x02, - 0xca, 0x00, 0x33, 0x90, 0x2c, 0xa0, 0x03, 0xe8, - 0x00, 0xea, 0x00, 0x32, 0x80, 0x0f, 0xa0, 0x03, - 0xe8, 0x00, 0xfa, 0x00, 0x3f, 0x90, 0x0c, 0xe8, - 0x03, 0xfa, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, - 0x48, 0x00, 0xe0, 0x00, 0xf8, 0x00, 0x3e, 0x00, - 0x0f, 0x80, 0x03, 0xe0, 0x00, 0xf8, 0x00, 0x3a, - 0x10, 0x0f, 0x80, 0x03, 0xe0, 0x00, 0xf8, 0x00, - 0x3e, 0x00, 0x4f, 0x80, 0x03, 0x60, 0x00, 0xf8, - 0x00, 0x3e, 0x00, 0x0f, 0x80, 0x03, 0xe0, 0x00, - 0xf8, 0x00, 0x3e, 0x30, 0x0f, 0x80, 0x03, 0xe0, - 0x00, 0xf8, 0x01, 0x3e, 0x00, 0x0f, 0x80, 0x03, - 0xe0, 0x00, 0xf8, 0x00, 0x3e, 0x08, 0x2f, 0x84, - 0x03, 0xd2, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, - 0x08, 0x10, 0xe4, 0x00, 0xf9, 0x00, 0x3e, 0x50, - 0x0d, 0x94, 0x03, 0x24, 0x00, 0x89, 0x00, 0x32, - 0x40, 0x0f, 0x90, 0x03, 0xe4, 0x00, 0x89, 0x00, - 0x3e, 0x40, 0x0f, 0x90, 0x03, 0x24, 0x00, 0xc9, - 0x00, 0x3e, 0x40, 0x0c, 0x90, 0x03, 0xc4, 0x00, - 0xc1, 0x00, 0x32, 0x70, 0x0f, 0x90, 0x03, 0xe4, - 0x00, 0xf9, 0x00, 0x30, 0xed, 0x09, 0x00, 0x4c, - 0x00, 0x40, 0x0e, 0x90, 0x03, 0xe4, 0x00, 0xf9, - 0x04, 0x3e, 0x68, 0x0f, 0x98, 0x03, 0x02, 0x04, - 0x30, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x64, - 0x00, 0xb9, 0x40, 0x2e, 0x70, 0x08, 0x9c, 0x02, - 0x25, 0x00, 0x89, 0x40, 0x22, 0x40, 0x0b, 0x90, - 0x42, 0x44, 0x02, 0x89, 0x00, 0x2e, 0x40, 0x0b, - 0x94, 0x02, 0x25, 0x00, 0x89, 0x00, 0x2e, 0x40, - 0x0a, 0x98, 0x02, 0xe4, 0x00, 0xa9, 0x60, 0x2a, - 0x68, 0x0b, 0x90, 0x02, 0xe4, 0x00, 0xb9, 0x00, - 0x2a, 0x40, 0x08, 0x90, 0x02, 0xe4, 0x00, 0xb9, - 0x02, 0x2e, 0x60, 0x0b, 0x9f, 0x02, 0x20, 0x00, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x05, 0x24, - 0x00, 0xbd, 0x00, 0x2f, 0x40, 0x09, 0x50, 0x02, - 0x14, 0x00, 0xa5, 0x00, 0x23, 0x40, 0x0b, 0xd0, - 0x02, 0xf4, 0x00, 0xad, 0x80, 0x2f, 0x40, 0x0b, - 0x50, 0x02, 0x14, 0x00, 0xad, 0x00, 0x2f, 0x40, - 0x08, 0xd2, 0x02, 0x64, 0x40, 0x89, 0x00, 0x22, - 0x40, 0x0b, 0x90, 0x02, 0xe4, 0x00, 0xb9, 0x00, - 0x22, 0x40, 0x0a, 0x90, 0x02, 0xe4, 0x00, 0xb9, - 0x00, 0x2e, 0x40, 0x0b, 0x90, 0x02, 0x06, 0x00, - 0x40, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x04, - 0x00, 0xb5, 0x80, 0x2d, 0x60, 0x08, 0x58, 0x0a, - 0x16, 0x00, 0xa5, 0x80, 0x61, 0x40, 0x0b, 0x50, - 0x42, 0x54, 0x00, 0xa5, 0x00, 0x2d, 0x40, 0x0b, - 0x58, 0x02, 0x16, 0x00, 0x85, 0x00, 0x2d, 0x40, - 0x0a, 0x50, 0x02, 0xc4, 0x00, 0xa1, 0x00, 0x28, - 0x50, 0x0b, 0x10, 0x02, 0xc4, 0x00, 0xb1, 0x40, - 0x28, 0x4a, 0x08, 0x14, 0x02, 0xc4, 0x00, 0xb1, - 0x00, 0x2c, 0x50, 0x0b, 0x14, 0x0a, 0x02, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0x0d, 0x60, - 0x00, 0xf8, 0x50, 0x3e, 0x14, 0x0d, 0x85, 0x03, - 0x01, 0x42, 0xe8, 0x50, 0xb2, 0x80, 0x0f, 0xed, - 0x09, 0x00, 0x4d, 0x00, 0x80, 0x03, 0xe0, 0x00, - 0xe8, 0x00, 0x3e, 0x00, 0x0f, 0x85, 0x0b, 0x21, - 0x42, 0xe8, 0x00, 0x3e, 0x00, 0x0c, 0xc0, 0x03, - 0x41, 0x40, 0xc8, 0x00, 0x32, 0x00, 0x0f, 0x80, - 0x03, 0xe0, 0x00, 0xf8, 0x00, 0x32, 0x08, 0x0e, - 0x80, 0x03, 0xe0, 0x00, 0xf8, 0x00, 0x3e, 0x00, - 0x0f, 0x80, 0x03, 0x2e, 0x03, 0x50, 0x00, 0x00, - 0x00, 0x00, 0x98, 0x1d, 0xec, 0x00, 0xf9, 0x00, - 0x3e, 0x40, 0x0f, 0x90, 0x03, 0xe4, 0x00, 0xd9, - 0x00, 0x3e, 0x40, 0x0f, 0x90, 0x03, 0xc4, 0x00, - 0x19, 0x00, 0x3e, 0x40, 0x0f, 0x90, 0x03, 0xe4, - 0x00, 0xf9, 0x00, 0x3e, 0x40, 0x0f, 0x90, 0x03, - 0xe5, 0x00, 0xf9, 0x42, 0x3d, 0x40, 0x0f, 0x90, - 0x43, 0xe4, 0x00, 0xd9, 0x40, 0x3e, 0x4a, 0x0f, - 0x90, 0x03, 0xe4, 0x08, 0xf9, 0x00, 0x3f, 0x50, - 0x0f, 0xd4, 0x03, 0xe6, 0x06, 0x70, 0x00, 0x00, - 0x00, 0x00, 0x18, 0x05, 0xe4, 0x00, 0xed, 0x10, - 0x33, 0x40, 0x0f, 0xd0, 0x03, 0x34, 0x40, 0xcd, - 0x00, 0x3e, 0x40, 0x0c, 0x90, 0x03, 0x24, 0x18, - 0xd1, 0x00, 0x32, 0xc0, 0x0d, 0xd0, 0x13, 0x34, - 0x00, 0xcb, 0x00, 0x3c, 0x40, 0x0f, 0x90, 0x03, - 0xf4, 0x80, 0xcd, 0x28, 0x33, 0x44, 0x0f, 0x90, - 0x03, 0xe4, 0x01, 0xf9, 0x10, 0x3e, 0x4a, 0x0c, - 0x90, 0x03, 0xe4, 0x00, 0xe9, 0x00, 0x3f, 0x40, - 0x0f, 0xd1, 0x03, 0x06, 0x00, 0x70, 0x00, 0x00, - 0x00, 0x00, 0x38, 0x10, 0xe0, 0x00, 0x88, 0x20, - 0x22, 0x02, 0x08, 0x80, 0x82, 0x20, 0x00, 0xa8, - 0x28, 0x2e, 0x00, 0x08, 0x80, 0x02, 0x20, 0x00, - 0xb8, 0x00, 0xa3, 0x00, 0x09, 0x82, 0x82, 0x20, - 0x80, 0x88, 0x01, 0x2e, 0x00, 0x0b, 0xc0, 0x12, - 0xe0, 0x80, 0xd8, 0x01, 0x36, 0x08, 0x0b, 0x80, - 0x02, 0xe0, 0x00, 0xb8, 0x10, 0x2e, 0x08, 0x08, - 0x82, 0x02, 0xed, 0x09, 0x00, 0x4e, 0x00, 0xe0, - 0x00, 0xb8, 0x00, 0x2e, 0x02, 0x0b, 0x01, 0x02, - 0x0e, 0x04, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x05, 0xe4, 0x00, 0xa1, 0x20, 0x20, 0x48, 0x0a, - 0x10, 0x12, 0x04, 0x0c, 0x01, 0x20, 0x2c, 0x60, - 0x08, 0x50, 0x42, 0xd4, 0x08, 0xbd, 0x00, 0x21, - 0x40, 0x09, 0x12, 0x02, 0x04, 0xa0, 0x81, 0x00, - 0x2c, 0x60, 0x09, 0x50, 0x02, 0xc4, 0xe0, 0x83, - 0x00, 0x20, 0xc8, 0x8b, 0x10, 0x02, 0xc4, 0x00, - 0xb1, 0x00, 0x2c, 0x4a, 0x09, 0x12, 0x82, 0xc4, - 0x00, 0xb1, 0x00, 0x2c, 0x44, 0x0b, 0x10, 0x02, - 0x02, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x18, - 0x15, 0xa4, 0x00, 0x89, 0x04, 0x20, 0x40, 0x08, - 0x92, 0x00, 0x24, 0x00, 0x89, 0x00, 0x0e, 0x40, - 0x28, 0xd8, 0x0a, 0xf4, 0x00, 0xbd, 0x00, 0x23, - 0x40, 0x09, 0x90, 0x02, 0x24, 0x00, 0x89, 0x00, - 0x0e, 0x40, 0x0b, 0xd0, 0x02, 0xe4, 0x04, 0x99, - 0x00, 0xe2, 0x60, 0x0b, 0x90, 0x02, 0xe4, 0x00, - 0xb9, 0x00, 0x2e, 0x40, 0x09, 0x90, 0x02, 0xe4, - 0x00, 0xb9, 0x00, 0x2e, 0x40, 0x0b, 0x94, 0x02, - 0x06, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x15, 0xe4, 0x00, 0xe9, 0x00, 0xb2, 0x40, 0x0f, - 0x90, 0x0b, 0x24, 0x02, 0x89, 0x00, 0x3c, 0x40, - 0x0c, 0x10, 0x03, 0xe4, 0x00, 0xd9, 0x80, 0x32, - 0x40, 0x0d, 0x90, 0x0b, 0x24, 0x02, 0xc9, 0x00, - 0x3e, 0x40, 0x0f, 0x98, 0x03, 0xe4, 0x00, 0xc1, - 0x01, 0x22, 0x40, 0x0b, 0x90, 0x03, 0xe4, 0x00, - 0xb9, 0x00, 0x3e, 0x40, 0x2d, 0x90, 0x03, 0xe4, - 0x00, 0xe9, 0x00, 0x3e, 0x42, 0x0f, 0x90, 0x0b, - 0x28, 0x04, 0x70, 0x00, 0x00, 0x00, 0x00, 0x28, - 0x01, 0xa4, 0x00, 0xf9, 0x00, 0x3e, 0x40, 0x0f, - 0x90, 0x03, 0xe4, 0x00, 0xf9, 0x00, 0x3e, 0x40, - 0x0f, 0x90, 0x03, 0x24, 0x00, 0xed, 0x09, 0x00, - 0x4f, 0x00, 0xf9, 0xa0, 0x3e, 0x41, 0x0f, 0x90, - 0x03, 0xe4, 0x00, 0xf9, 0x01, 0x3e, 0x40, 0x0f, - 0x94, 0x03, 0xe4, 0x00, 0xb9, 0x00, 0x3e, 0x40, - 0x0f, 0x90, 0x03, 0xe4, 0x00, 0xf9, 0x00, 0x3e, - 0x40, 0x0e, 0x90, 0x03, 0xe4, 0x00, 0xf9, 0x00, - 0x3e, 0x46, 0x0f, 0x11, 0x03, 0xca, 0x00, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x28, 0x10, 0xa0, 0x00, - 0xf8, 0x00, 0x3e, 0x00, 0x0e, 0x80, 0x03, 0x20, - 0x00, 0xf8, 0x00, 0x3e, 0x00, 0x0f, 0x80, 0x03, - 0x22, 0x00, 0xf8, 0x00, 0x32, 0x00, 0x0f, 0x80, - 0x03, 0xe0, 0x00, 0xf8, 0x00, 0x3e, 0x00, 0x0c, - 0xc2, 0x03, 0xc0, 0x00, 0xf8, 0x80, 0xb6, 0x20, - 0x0e, 0x80, 0x03, 0xe0, 0x00, 0xf8, 0x04, 0x32, - 0x00, 0x0c, 0x80, 0x03, 0xe0, 0x00, 0xf8, 0x00, - 0x3e, 0x00, 0x0f, 0x80, 0x03, 0x0a, 0x04, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x28, 0x01, 0x08, 0x00, - 0xbe, 0x02, 0x2f, 0x80, 0x0e, 0xe0, 0x0a, 0x38, - 0x00, 0xbe, 0x00, 0x2e, 0x80, 0x0b, 0xa0, 0x0a, - 0x28, 0x00, 0xb2, 0x00, 0xa2, 0xa2, 0x03, 0xe2, - 0x02, 0xf8, 0x80, 0xba, 0x00, 0x2e, 0x80, 0x0a, - 0xa0, 0x02, 0xf8, 0x00, 0xbe, 0x00, 0x23, 0x80, - 0x0f, 0xa0, 0x03, 0xa8, 0x00, 0xba, 0x00, 0xa2, - 0x80, 0x08, 0xa0, 0x02, 0xe8, 0x10, 0xba, 0x00, - 0x2f, 0x90, 0x0b, 0xe0, 0x02, 0x8a, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x28, 0x05, 0x4c, 0x00, - 0xb8, 0x00, 0x2c, 0x00, 0x0b, 0x80, 0x02, 0xa0, - 0x00, 0xb0, 0x00, 0x2c, 0xc0, 0x0b, 0x30, 0x00, - 0x0c, 0x00, 0xa3, 0x00, 0x20, 0xc0, 0x0b, 0x82, - 0x02, 0xe0, 0x80, 0xb3, 0x00, 0x2c, 0x00, 0x08, - 0x29, 0x02, 0xc1, 0x20, 0xb2, 0x00, 0x28, 0xc0, - 0x8b, 0x30, 0x02, 0x8c, 0x00, 0xb3, 0x00, 0x22, - 0xc0, 0x08, 0x30, 0x02, 0xcc, 0x00, 0xb3, 0x00, - 0xed, 0x09, 0x00, 0x50, 0x00, 0x2c, 0xd0, 0x0b, - 0x38, 0x02, 0x0a, 0x00, 0x50, 0x00, 0x00, 0x00, - 0x00, 0xa0, 0x01, 0x1c, 0x00, 0xb4, 0x00, 0x2d, - 0x00, 0x0b, 0x40, 0x12, 0x90, 0x00, 0xb4, 0x00, - 0x2d, 0xc0, 0x0b, 0x50, 0x02, 0x1c, 0x00, 0xbe, - 0x00, 0x21, 0x80, 0x0b, 0x40, 0x12, 0xd0, 0x00, - 0xb7, 0x00, 0x2d, 0x20, 0x0a, 0x60, 0x02, 0x58, - 0x04, 0x34, 0x00, 0x29, 0x40, 0x0b, 0x70, 0x02, - 0x9c, 0x00, 0xb3, 0xa0, 0x20, 0xc4, 0x08, 0x72, - 0x02, 0xdc, 0x00, 0xb7, 0x00, 0x2d, 0xc0, 0x0b, - 0x74, 0x02, 0xa8, 0x00, 0x40, 0x00, 0x00, 0x00, - 0x00, 0xa8, 0x08, 0x1e, 0x00, 0xf4, 0x80, 0x3d, - 0xa0, 0x0f, 0xe8, 0x03, 0x92, 0x00, 0xf4, 0x80, - 0x3d, 0xa0, 0x9f, 0x78, 0x13, 0x1e, 0x10, 0xf5, - 0x80, 0x31, 0xe0, 0x0f, 0x48, 0x03, 0xd2, 0x00, - 0xb7, 0x80, 0x2d, 0x20, 0x0c, 0x68, 0x03, 0xd2, - 0x00, 0x77, 0x80, 0x39, 0xe0, 0x0e, 0x78, 0x03, - 0x9e, 0x00, 0xf7, 0xe0, 0x31, 0xe8, 0x2c, 0x7a, - 0x03, 0xde, 0x00, 0xf7, 0x80, 0x2d, 0xe0, 0x0f, - 0x68, 0x0b, 0x2a, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x08, 0x1d, 0xac, 0x00, 0xfc, 0x00, 0x2f, - 0x00, 0x0e, 0xc0, 0x03, 0x70, 0x00, 0xfc, 0x00, - 0x3e, 0x80, 0x0f, 0x10, 0x02, 0xec, 0x00, 0xf8, - 0x00, 0x3e, 0x80, 0x0f, 0xc0, 0x03, 0xf0, 0x00, - 0xfb, 0x00, 0x3e, 0x00, 0x0f, 0xa0, 0x43, 0xf0, - 0x00, 0xf1, 0x00, 0x32, 0xc0, 0x0e, 0xb0, 0x03, - 0xac, 0x00, 0xfb, 0x00, 0x3e, 0xc0, 0x0f, 0xb6, - 0x83, 0xec, 0x00, 0xfb, 0x04, 0x3e, 0x40, 0x0f, - 0x80, 0x03, 0x42, 0x06, 0x60, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x05, 0xfe, 0x00, 0xfc, 0x80, 0x3f, - 0x20, 0x0f, 0xc8, 0x03, 0xf2, 0x00, 0xec, 0x80, - 0x33, 0xe0, 0x0c, 0xf0, 0x03, 0x1a, 0x00, 0xcf, - 0x80, 0x3d, 0x60, 0xed, 0x09, 0x00, 0x51, 0x00, - 0x0c, 0xf8, 0x03, 0xfe, 0x00, 0xcf, 0x80, 0x3d, - 0x20, 0x0c, 0x78, 0x03, 0xb6, 0x00, 0xcf, 0x80, - 0x33, 0xa0, 0x0c, 0xf8, 0x03, 0xfe, 0x00, 0xff, - 0x80, 0x1f, 0xe0, 0x0d, 0xf8, 0x83, 0x3e, 0x00, - 0xff, 0x80, 0x3f, 0xe0, 0x0f, 0xd8, 0x23, 0xc0, - 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x11, - 0x9c, 0x00, 0xb4, 0x40, 0x2d, 0x04, 0x0b, 0x40, - 0x02, 0xf0, 0x00, 0x84, 0x00, 0x21, 0xc0, 0x88, - 0x50, 0x02, 0x18, 0x40, 0x96, 0x00, 0x2d, 0x00, - 0x48, 0x50, 0x02, 0xf4, 0x00, 0xd7, 0x11, 0x2d, - 0x00, 0x0d, 0x74, 0x03, 0xf8, 0x00, 0x87, 0x11, - 0x21, 0x40, 0x08, 0x70, 0x03, 0xdc, 0x00, 0xb7, - 0x00, 0x2d, 0xc0, 0x08, 0xf0, 0x03, 0x5c, 0x00, - 0xb7, 0x01, 0x2d, 0x80, 0x0b, 0x70, 0x02, 0xea, - 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x9c, 0x00, 0xb4, 0x00, 0x2d, 0x80, 0x0b, 0x60, - 0x02, 0xd0, 0x00, 0xa4, 0x00, 0x2b, 0x80, 0x08, - 0xf4, 0x02, 0x18, 0x00, 0x95, 0x00, 0x25, 0x40, - 0x28, 0x60, 0x02, 0xd8, 0x00, 0xa7, 0x00, 0x2f, - 0x00, 0x08, 0x79, 0x02, 0x14, 0x00, 0x97, 0x00, - 0x21, 0x80, 0x08, 0x70, 0x02, 0xdc, 0x00, 0xb7, - 0x00, 0x25, 0xc0, 0x09, 0x70, 0x02, 0x1c, 0x00, - 0xb7, 0x00, 0x2d, 0xc0, 0x0b, 0x40, 0x02, 0xc0, - 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x20, 0x14, - 0xcc, 0x00, 0xb0, 0x00, 0x2c, 0x00, 0x0b, 0x00, - 0x02, 0xc0, 0x00, 0x80, 0x00, 0x28, 0x80, 0x08, - 0x10, 0x02, 0x09, 0x20, 0x90, 0x24, 0x2c, 0x00, - 0x08, 0x00, 0x02, 0xc0, 0x05, 0xa3, 0x00, 0x2c, - 0x00, 0x08, 0x30, 0x02, 0xc0, 0x00, 0x93, 0x04, - 0x20, 0xd2, 0x08, 0x30, 0x02, 0xcc, 0x00, 0xb3, - 0x01, 0x2c, 0xc0, 0x18, 0x30, 0x02, 0x4c, 0x00, - 0xb3, 0x00, 0x2c, 0x2c, 0x0b, 0x04, 0xed, 0x09, - 0x00, 0x52, 0x00, 0x82, 0xc8, 0x04, 0x30, 0x00, - 0x00, 0x00, 0x00, 0xa8, 0x15, 0xac, 0x00, 0xfb, - 0x00, 0x3e, 0x40, 0x0f, 0x90, 0x03, 0xec, 0x00, - 0xeb, 0x00, 0x38, 0xc0, 0x04, 0xa0, 0x03, 0x26, - 0x80, 0x8b, 0x40, 0x36, 0xc0, 0x0c, 0x80, 0x02, - 0xe0, 0x00, 0xab, 0x00, 0x3e, 0x00, 0x08, 0xb0, - 0x02, 0xa0, 0x00, 0xd9, 0x00, 0x30, 0xc0, 0x0c, - 0xb0, 0x03, 0xec, 0x00, 0xff, 0x00, 0x3f, 0xc0, - 0x0d, 0xf0, 0x03, 0x2c, 0x00, 0xfb, 0x00, 0x3e, - 0x30, 0x0f, 0xb4, 0x03, 0xea, 0x04, 0x60, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x00, 0xec, 0x00, 0xfd, - 0x40, 0x3f, 0x50, 0x4f, 0xd4, 0x03, 0xf5, 0x00, - 0xfd, 0x40, 0x96, 0xe0, 0x0f, 0x84, 0x03, 0xe4, - 0x08, 0xea, 0x00, 0x3e, 0x80, 0x0f, 0xc0, 0x03, - 0xf0, 0x00, 0xdb, 0x00, 0x3e, 0x20, 0x0f, 0xb0, - 0x02, 0x78, 0x00, 0xeb, 0x00, 0x3e, 0x60, 0x0f, - 0xb0, 0x03, 0xac, 0x00, 0xfb, 0x00, 0x3e, 0xc0, - 0x0f, 0xb0, 0x03, 0xec, 0x00, 0xfb, 0x00, 0x3e, - 0x40, 0x0f, 0xa4, 0x03, 0xe0, 0x00, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x10, 0xfc, 0x00, 0xfe, - 0x80, 0x3f, 0x80, 0x0f, 0xe0, 0x03, 0x3a, 0x00, - 0xfe, 0x80, 0x3f, 0x80, 0x0c, 0xe0, 0x03, 0xf4, - 0x00, 0xfd, 0x00, 0x3f, 0xc0, 0x2c, 0xc0, 0x03, - 0x30, 0x00, 0xcf, 0x00, 0x37, 0x00, 0x0c, 0xd2, - 0x03, 0x30, 0x10, 0xcd, 0x00, 0x33, 0x80, 0x0c, - 0xf0, 0x03, 0xfc, 0x00, 0xff, 0x00, 0x3e, 0xc0, - 0x0f, 0xf0, 0x03, 0x3c, 0x00, 0xff, 0x01, 0x3f, - 0x80, 0x0c, 0xf0, 0x03, 0xc0, 0x44, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x81, 0x04, 0x6c, 0x00, 0xb8, - 0x00, 0x2e, 0x00, 0xcb, 0x80, 0x0a, 0x20, 0x00, - 0xb8, 0x00, 0x2e, 0x80, 0x08, 0x80, 0x02, 0x64, - 0x10, 0xb8, 0x00, 0x2c, 0x80, 0x08, 0x80, 0x0b, - 0x20, 0xed, 0x09, 0x00, 0x53, 0x00, 0x00, 0xc3, - 0x01, 0x20, 0x00, 0x08, 0x18, 0x02, 0xa0, 0x00, - 0x83, 0x04, 0x22, 0x80, 0x08, 0xb0, 0x02, 0xec, - 0x00, 0xbb, 0x00, 0x2e, 0xc0, 0x0b, 0xb0, 0x02, - 0xac, 0x00, 0xbb, 0x00, 0x2e, 0x7c, 0x08, 0x84, - 0x02, 0xe0, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x05, 0x2c, 0x00, 0xbb, 0x10, 0x2e, 0x50, - 0x0b, 0x14, 0x02, 0x2d, 0x80, 0xbb, 0x60, 0x2e, - 0xc0, 0x08, 0xa0, 0x82, 0xe2, 0x01, 0xbb, 0x02, - 0x6e, 0x40, 0x08, 0x30, 0x02, 0x0c, 0x00, 0xab, - 0x00, 0x26, 0x00, 0x0a, 0x90, 0x02, 0x04, 0x00, - 0x8b, 0x80, 0x22, 0xa0, 0x0a, 0xb0, 0x02, 0xec, - 0x00, 0xbb, 0x00, 0x2e, 0xc0, 0x0b, 0x30, 0x02, - 0x2c, 0x00, 0xbb, 0x00, 0x2c, 0x00, 0x08, 0x94, - 0x02, 0xe0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, - 0x08, 0x04, 0x0c, 0x00, 0xb1, 0x00, 0x2c, 0x40, - 0x0b, 0x10, 0x02, 0x04, 0x10, 0xb1, 0x00, 0x2e, - 0xc0, 0x08, 0x00, 0x02, 0x40, 0x00, 0xb2, 0x00, - 0x6c, 0x00, 0x08, 0x10, 0x02, 0x44, 0x00, 0xa3, - 0x00, 0x22, 0x00, 0x08, 0x10, 0x02, 0x88, 0x00, - 0x83, 0x80, 0x22, 0x20, 0x0a, 0x30, 0x02, 0xcc, - 0x00, 0xb3, 0x00, 0x2c, 0xc0, 0x4b, 0x30, 0x02, - 0x8c, 0x00, 0xb3, 0x00, 0x2c, 0x00, 0x08, 0x20, - 0x02, 0xc2, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x0d, 0x6c, 0x00, 0xfa, 0x00, 0x3e, 0x80, - 0x0f, 0xa0, 0x03, 0x28, 0x00, 0xf2, 0x00, 0x2e, - 0x80, 0x88, 0xa0, 0x03, 0xe0, 0x00, 0xf9, 0x00, - 0x3e, 0x40, 0x0c, 0xa0, 0x03, 0x28, 0x00, 0xeb, - 0x00, 0x36, 0x00, 0x8c, 0x90, 0x03, 0x24, 0x00, - 0xcb, 0x00, 0x32, 0x40, 0x0e, 0xb0, 0x03, 0xec, - 0x00, 0xfb, 0x00, 0x3e, 0xc0, 0x0f, 0xf0, 0x03, - 0x2c, 0x00, 0xfb, 0x00, 0x3e, 0x80, 0x2c, 0x90, - 0x03, 0xc0, 0x03, 0x50, 0xed, 0x09, 0x00, 0x54, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x1d, 0xfc, - 0x00, 0xfc, 0x00, 0x3f, 0x00, 0x0f, 0xc0, 0x03, - 0xf0, 0x00, 0xfc, 0x00, 0x3d, 0x80, 0x0f, 0x40, - 0x03, 0xf0, 0x00, 0xfc, 0x00, 0x3f, 0x00, 0x0f, - 0xc0, 0x03, 0xb0, 0x00, 0xcf, 0x00, 0x3f, 0x00, - 0x0f, 0xd0, 0x03, 0xf0, 0x00, 0xf7, 0x00, 0x3d, - 0x40, 0x0d, 0xf0, 0x03, 0xfc, 0x00, 0xff, 0x00, - 0x3f, 0xc0, 0x0f, 0xf0, 0x03, 0xfc, 0x08, 0xff, - 0x00, 0x3f, 0x00, 0x0f, 0xc0, 0x03, 0xe8, 0x02, - 0x70, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x05, 0xfc, - 0x00, 0xff, 0x20, 0x3b, 0xc0, 0x0f, 0xd1, 0x03, - 0xf8, 0x00, 0xff, 0x00, 0x33, 0xc0, 0x0d, 0xf1, - 0x03, 0xfc, 0x00, 0xdf, 0x0a, 0x3f, 0x00, 0x8e, - 0xc0, 0x01, 0xf0, 0xc0, 0xfc, 0x30, 0x33, 0x04, - 0x8f, 0xc0, 0x03, 0xdc, 0xa0, 0xfc, 0x30, 0x23, - 0xd0, 0x0c, 0xf0, 0x03, 0x70, 0x08, 0xcc, 0x40, - 0x3f, 0xcc, 0x0f, 0xd0, 0x23, 0xf0, 0x02, 0xcc, - 0x10, 0x3d, 0xca, 0x0c, 0xf0, 0x03, 0xf0, 0x04, - 0x70, 0x00, 0x00, 0x00, 0x00, 0x80, 0x10, 0xec, - 0x08, 0xbb, 0x50, 0x22, 0xc0, 0x0b, 0xb2, 0x02, - 0xe8, 0x00, 0xbf, 0x40, 0xa3, 0xd4, 0x00, 0xb0, - 0x02, 0xfd, 0x00, 0xdb, 0x00, 0x2e, 0x00, 0x08, - 0xa0, 0x00, 0xe0, 0x80, 0xb0, 0x02, 0x22, 0x00, - 0x0b, 0x84, 0x02, 0xed, 0x04, 0xb8, 0x70, 0x2a, - 0x80, 0x0a, 0xb0, 0x12, 0xac, 0x00, 0xa8, 0x20, - 0x2e, 0xd4, 0x0b, 0x84, 0x82, 0xe1, 0x20, 0x88, - 0x22, 0x2e, 0xd0, 0x08, 0xb0, 0x02, 0xe0, 0x06, - 0x30, 0x00, 0x00, 0x00, 0x00, 0x88, 0x05, 0xcc, - 0x00, 0xb3, 0x00, 0x28, 0xc0, 0x0b, 0x10, 0x02, - 0xc8, 0x00, 0xb3, 0x40, 0x20, 0xc0, 0x41, 0x32, - 0x02, 0xcd, 0x00, 0xa2, 0x00, 0x2c, 0x80, 0x0a, - 0x10, 0x46, 0x80, 0xc0, 0xb0, 0x61, 0xa0, 0xed, - 0x09, 0x00, 0x55, 0x00, 0x18, 0x8b, 0x01, 0x02, - 0xcc, 0x00, 0x90, 0x00, 0x22, 0xc8, 0x08, 0xb0, - 0x02, 0x6c, 0x00, 0xa0, 0x40, 0x2c, 0xc8, 0x0b, - 0x13, 0x02, 0xe1, 0x80, 0x90, 0x00, 0x6c, 0xc0, - 0x08, 0x30, 0x02, 0xe2, 0x01, 0x70, 0x00, 0x00, - 0x00, 0x00, 0xc0, 0x15, 0xac, 0x00, 0xbb, 0x00, - 0x22, 0xc0, 0x0b, 0xb0, 0x02, 0xe9, 0x00, 0xbb, - 0x00, 0x22, 0xc0, 0x08, 0xb0, 0x82, 0xec, 0x00, - 0xbb, 0x80, 0x2e, 0xa0, 0x08, 0xb8, 0x02, 0xe2, - 0x00, 0x99, 0x80, 0x22, 0x22, 0x1b, 0x88, 0x02, - 0xec, 0x00, 0xb8, 0x80, 0x2a, 0x84, 0x0a, 0x90, - 0x22, 0xac, 0x24, 0xa8, 0x80, 0x2e, 0xc0, 0x0b, - 0x98, 0x02, 0xe8, 0xa0, 0x9a, 0x15, 0x2e, 0xc0, - 0x08, 0xb0, 0x02, 0xf0, 0x00, 0x60, 0x00, 0x00, - 0x00, 0x00, 0x40, 0x15, 0xec, 0x00, 0xfb, 0x00, - 0x3a, 0xc0, 0x0f, 0xb8, 0x03, 0xef, 0x00, 0xfb, - 0x01, 0x32, 0xc0, 0x8d, 0xb0, 0x03, 0xec, 0x00, - 0xeb, 0x80, 0x3e, 0xb0, 0x0e, 0xa8, 0x03, 0xa3, - 0x80, 0xf8, 0x83, 0x32, 0x20, 0x0f, 0x8c, 0x23, - 0xec, 0x00, 0xf8, 0xc8, 0x32, 0xc0, 0x0c, 0x38, - 0x11, 0x4e, 0x00, 0xe8, 0xc0, 0x3e, 0xc0, 0x8f, - 0x98, 0x03, 0xeb, 0x00, 0xda, 0xc8, 0x3e, 0xc0, - 0x2c, 0xb0, 0x03, 0xd0, 0x00, 0x70, 0x00, 0x00, - 0x00, 0x00, 0xe0, 0x01, 0xbc, 0x00, 0xf7, 0x00, - 0x3f, 0xc0, 0x0f, 0xdc, 0x03, 0xf2, 0x40, 0xf7, - 0x00, 0x3d, 0xc0, 0x8f, 0xe9, 0x03, 0xfc, 0x00, - 0xdf, 0x00, 0x3c, 0x80, 0x0f, 0xe0, 0x23, 0xf0, - 0x00, 0xf5, 0x00, 0x3f, 0x40, 0x0b, 0xd0, 0x03, - 0xfc, 0x20, 0x7d, 0x00, 0x3f, 0x61, 0x0f, 0xdc, - 0x13, 0x77, 0x04, 0x9c, 0x00, 0x3e, 0xc1, 0x0f, - 0xc0, 0x03, 0xf8, 0x00, 0xef, 0x80, 0x3d, 0xc0, - 0x0d, 0xf0, 0x03, 0xf8, 0x00, 0x60, 0x00, 0x00, - 0x00, 0x00, 0xed, 0x09, 0x00, 0x56, 0x00, 0x40, - 0x10, 0xac, 0x00, 0xfb, 0x00, 0x3e, 0xc0, 0x0f, - 0xb0, 0x03, 0xe8, 0x00, 0xdb, 0x10, 0x3e, 0xc0, - 0x0f, 0x94, 0x03, 0xac, 0x00, 0xcb, 0xa0, 0x3a, - 0x90, 0x2e, 0xb0, 0x03, 0x20, 0x10, 0xf8, 0x44, - 0x3a, 0x50, 0x0e, 0x90, 0x03, 0xec, 0x00, 0xc9, - 0x40, 0x36, 0xc0, 0x0c, 0xb2, 0x43, 0x29, 0x00, - 0xc8, 0x04, 0x3e, 0xc0, 0x0c, 0x90, 0x83, 0x29, - 0x0c, 0xfb, 0x00, 0x3e, 0xc1, 0x0c, 0xb0, 0x03, - 0xd0, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0xc8, - 0x05, 0x2c, 0x00, 0xbf, 0x00, 0x2e, 0xc0, 0x0b, - 0x90, 0x02, 0xeb, 0x00, 0x8f, 0xc0, 0x2f, 0xc0, - 0x0b, 0xb0, 0x02, 0x1e, 0x82, 0x8b, 0xc4, 0x02, - 0x80, 0x08, 0xa4, 0x02, 0x20, 0x00, 0xb9, 0x00, - 0x2a, 0x40, 0x1b, 0x92, 0x02, 0xfc, 0x00, 0x89, - 0xc0, 0x2c, 0xc0, 0x0a, 0x9c, 0x03, 0x6e, 0x00, - 0x89, 0x02, 0x2f, 0xc0, 0x0d, 0x94, 0x02, 0x88, - 0x00, 0xbb, 0x00, 0x2f, 0xd0, 0x08, 0xb0, 0x02, - 0xf2, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0xe0, - 0x05, 0x4c, 0x00, 0xb3, 0x00, 0x2c, 0xc0, 0x0b, - 0x30, 0x02, 0xcb, 0x24, 0xb3, 0xa0, 0x24, 0xc0, - 0x09, 0x30, 0x02, 0x8e, 0x00, 0x81, 0x00, 0x20, - 0xe8, 0x08, 0x22, 0x02, 0x40, 0x00, 0xb0, 0x00, - 0x20, 0x00, 0x0a, 0x0e, 0x02, 0x8d, 0x00, 0x88, - 0xf0, 0x6c, 0xc1, 0x08, 0x3d, 0x02, 0x8d, 0x80, - 0x20, 0x01, 0x2c, 0xc0, 0x08, 0x08, 0x02, 0x08, - 0x00, 0xb0, 0x00, 0x2c, 0xc8, 0x08, 0x30, 0x02, - 0xf8, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x20, - 0x01, 0x1e, 0x00, 0xb7, 0x80, 0x2d, 0xe0, 0x0b, - 0x78, 0x02, 0xfa, 0x20, 0x87, 0x80, 0x2d, 0xe0, - 0x0b, 0x71, 0x02, 0x0e, 0x00, 0x97, 0x80, 0x25, - 0xe4, 0x08, 0x68, 0x02, 0x12, 0x08, 0xb4, 0x80, - 0x29, 0xe4, 0x0b, 0x58, 0x02, 0xed, 0x09, 0x00, - 0x57, 0x00, 0xde, 0x20, 0x07, 0x80, 0x2d, 0xe0, - 0x0a, 0x78, 0x06, 0xfa, 0x20, 0x84, 0x80, 0x2d, - 0xec, 0x09, 0x68, 0x02, 0x9a, 0x00, 0xb7, 0x80, - 0x2d, 0xe0, 0x08, 0x78, 0x02, 0xc8, 0x00, 0x40, - 0x00, 0x00, 0x00, 0x00, 0x48, 0x08, 0x0c, 0x00, - 0xf3, 0x00, 0x3c, 0xc0, 0x0f, 0x30, 0x03, 0xc8, - 0x00, 0xf3, 0x10, 0x3c, 0xc0, 0x0f, 0xb1, 0x03, - 0x8c, 0x40, 0xc8, 0x00, 0xb0, 0xd7, 0x1e, 0xb0, - 0x03, 0x4c, 0x00, 0xf3, 0x40, 0x20, 0xc0, 0x0e, - 0x34, 0x03, 0xcc, 0x58, 0x83, 0x00, 0x36, 0xd0, - 0x0c, 0x11, 0x43, 0x84, 0x80, 0xe0, 0x40, 0x3c, - 0xc8, 0x1c, 0xa0, 0x8b, 0x04, 0x80, 0xf1, 0x04, - 0x3c, 0xc0, 0x2c, 0x30, 0x03, 0xd2, 0x02, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x40, 0x1d, 0xbc, 0x00, - 0xff, 0x02, 0x3f, 0xc0, 0x8f, 0xf0, 0x03, 0xd8, - 0x40, 0xff, 0x44, 0x3f, 0xd4, 0x0f, 0xf0, 0x03, - 0xfc, 0x40, 0xef, 0x10, 0x3b, 0xc4, 0x0f, 0xf1, - 0x23, 0xbc, 0x04, 0xff, 0x00, 0x3f, 0xc0, 0x0f, - 0xf0, 0x03, 0xfc, 0x10, 0x7f, 0x00, 0x27, 0xc0, - 0x0f, 0x50, 0x03, 0x5c, 0x08, 0xfd, 0x12, 0x3f, - 0xc9, 0x0f, 0xe1, 0x01, 0x7c, 0x00, 0xff, 0x10, - 0x3f, 0xc6, 0x0f, 0xf0, 0x03, 0xd0, 0x06, 0x60, - 0x00, 0x00, 0x00, 0x00, 0xa8, 0x05, 0xec, 0x00, - 0xfb, 0x00, 0x3e, 0xc0, 0x0f, 0xb0, 0x03, 0xec, - 0x00, 0xfb, 0x00, 0x3e, 0xc4, 0x0f, 0xb0, 0x03, - 0xec, 0x80, 0xf1, 0x00, 0xb2, 0xe0, 0x0c, 0xa0, - 0x07, 0x6c, 0x00, 0xfb, 0x02, 0x3a, 0x00, 0x2c, - 0x28, 0x03, 0x2c, 0x40, 0xfa, 0x00, 0x16, 0xe0, - 0x0c, 0x90, 0x03, 0xce, 0x00, 0xc8, 0x00, 0x22, - 0xc0, 0x0d, 0xb0, 0x03, 0xec, 0x00, 0xc2, 0x00, - 0x12, 0xc0, 0x0f, 0xb0, 0x03, 0xea, 0x00, 0x70, - 0x00, 0x00, 0x00, 0x00, 0x48, 0x11, 0x9c, 0x00, - 0xed, 0x09, 0x00, 0x58, 0x00, 0xb7, 0x40, 0x2d, - 0xc0, 0x0b, 0x70, 0x20, 0xdc, 0x00, 0xb7, 0x00, - 0x2d, 0xc8, 0x0b, 0x70, 0x22, 0xdd, 0xa0, 0xb7, - 0x00, 0x29, 0x80, 0x48, 0x60, 0x02, 0xdc, 0x00, - 0xb7, 0x05, 0x6d, 0xc0, 0x08, 0x70, 0x03, 0x5c, - 0x00, 0xb7, 0x00, 0x3d, 0xc1, 0x0d, 0x50, 0x02, - 0xdc, 0x00, 0xa6, 0x04, 0x2b, 0xc0, 0x0a, 0x70, - 0x42, 0xfc, 0x00, 0x87, 0x00, 0x29, 0xc8, 0x0b, - 0x70, 0x02, 0xd2, 0x04, 0x60, 0x00, 0x00, 0x00, - 0x00, 0xc0, 0x00, 0x9e, 0x00, 0xb7, 0xa0, 0x2d, - 0xe0, 0x4b, 0x78, 0x30, 0xda, 0x04, 0xb7, 0x90, - 0x2d, 0xe0, 0x0b, 0x78, 0x02, 0xde, 0x80, 0xbd, - 0x80, 0x20, 0xe0, 0x08, 0x78, 0x02, 0xde, 0x00, - 0xb7, 0x81, 0x2d, 0xe0, 0x00, 0x78, 0x82, 0x1e, - 0x80, 0x37, 0x80, 0x2d, 0xe0, 0x09, 0x5c, 0x02, - 0xde, 0x20, 0x80, 0x80, 0x61, 0xe4, 0x08, 0x7c, - 0x06, 0xde, 0x22, 0x8f, 0x80, 0x21, 0xe8, 0x0b, - 0x78, 0x02, 0xf0, 0x00, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x48, 0x14, 0xcc, 0x00, 0xb3, 0x00, 0x2c, - 0xc0, 0x0b, 0xb8, 0x02, 0x48, 0x80, 0xb3, 0x00, - 0x2c, 0xc0, 0x0b, 0x3e, 0x02, 0xcc, 0x00, 0xb3, - 0x08, 0x28, 0xf0, 0x08, 0xbc, 0x02, 0xee, 0x80, - 0xb3, 0x10, 0x2c, 0xd0, 0x08, 0x38, 0x02, 0x4c, - 0x01, 0xb3, 0x90, 0x28, 0xc4, 0x49, 0x10, 0x02, - 0xc2, 0x20, 0xab, 0x42, 0x28, 0xc0, 0x0a, 0x3c, - 0x02, 0xcd, 0x08, 0x8b, 0xc2, 0x28, 0xc0, 0x0b, - 0x30, 0x02, 0xd2, 0x04, 0x30, 0x00, 0x00, 0x00, - 0x00, 0xe8, 0x15, 0xa8, 0x00, 0xfa, 0x00, 0x3e, - 0x80, 0x0f, 0xaa, 0x03, 0xf8, 0x80, 0xfa, 0x00, - 0x3e, 0x80, 0x0f, 0xee, 0x03, 0xe8, 0x00, 0xfe, - 0x40, 0x33, 0x94, 0x0c, 0xe5, 0x03, 0x78, 0x10, - 0xfe, 0x10, 0x3f, 0x80, 0x0c, 0xe1, 0x23, 0x28, - 0x08, 0xfe, 0x10, 0xed, 0x09, 0x00, 0x59, 0x00, - 0x27, 0x90, 0x0d, 0xa8, 0x03, 0xf9, 0x00, 0xce, - 0x00, 0x32, 0x80, 0x0c, 0xe0, 0x03, 0xfb, 0x00, - 0xce, 0x80, 0x32, 0x80, 0x0f, 0xa0, 0x03, 0xfa, - 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, - 0xe0, 0x00, 0xf8, 0x00, 0x3e, 0x00, 0x0f, 0x80, - 0x03, 0xe1, 0x00, 0xf0, 0x40, 0x3e, 0x00, 0x0f, - 0x80, 0x13, 0xe0, 0x00, 0xb8, 0x40, 0x3e, 0x14, - 0x2f, 0x85, 0x01, 0xe0, 0x40, 0xf8, 0x00, 0x3e, - 0x08, 0x0f, 0x80, 0x03, 0xe0, 0x10, 0xf8, 0x00, - 0x36, 0x20, 0x0f, 0x84, 0x03, 0xe0, 0x00, 0xf8, - 0x20, 0x3e, 0x00, 0x0f, 0x80, 0x83, 0xe0, 0x20, - 0xf8, 0x32, 0x3e, 0x00, 0x4f, 0x80, 0x03, 0xd2, - 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, - 0xe4, 0x00, 0xf9, 0x00, 0x3e, 0x40, 0x0f, 0x90, - 0x03, 0x06, 0x00, 0xc9, 0x20, 0x32, 0x40, 0x8f, - 0x90, 0x03, 0xa5, 0x04, 0xd9, 0x80, 0x32, 0x50, - 0x4f, 0x98, 0x23, 0x24, 0x00, 0xc9, 0x00, 0x3c, - 0x40, 0x06, 0x90, 0x07, 0xe6, 0x00, 0xf9, 0x10, - 0x3e, 0x40, 0x0f, 0x9c, 0x03, 0xa6, 0x44, 0x79, - 0x01, 0x30, 0x40, 0x8c, 0x90, 0x03, 0xc4, 0x02, - 0xc9, 0x00, 0x30, 0x60, 0x0c, 0x90, 0x03, 0xc2, - 0x04, 0x30, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, - 0x64, 0x00, 0xb9, 0x00, 0x2e, 0x40, 0x0b, 0x90, - 0x02, 0x27, 0x00, 0xd9, 0x40, 0xa2, 0x40, 0x89, - 0x90, 0x22, 0x24, 0x00, 0xb9, 0xf0, 0x22, 0x40, - 0x0b, 0x90, 0x02, 0x24, 0x00, 0x89, 0x00, 0x2e, - 0x40, 0x0a, 0x90, 0x02, 0xe6, 0xc0, 0xb9, 0x80, - 0x0e, 0x40, 0x0b, 0x14, 0x02, 0x26, 0x20, 0xb9, - 0x00, 0x32, 0x40, 0x0a, 0x9a, 0x02, 0xe4, 0x00, - 0x89, 0x00, 0x22, 0x40, 0x08, 0x90, 0x02, 0xe0, - 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x01, - 0x24, 0x00, 0xb9, 0x00, 0x2e, 0x40, 0xed, 0x09, - 0x00, 0x5a, 0x00, 0x0b, 0x90, 0x02, 0x24, 0x40, - 0x89, 0x40, 0x22, 0x40, 0x0b, 0x10, 0x02, 0xe4, - 0x00, 0xb1, 0x00, 0x22, 0x40, 0x0b, 0xb1, 0x02, - 0x24, 0x00, 0x89, 0x00, 0x2e, 0x40, 0x00, 0x90, - 0x02, 0xe4, 0x00, 0xb9, 0x00, 0x2e, 0x40, 0x8b, - 0x90, 0x92, 0xe4, 0x04, 0xb9, 0x00, 0x22, 0x40, - 0x08, 0xb2, 0x42, 0xe4, 0x08, 0x89, 0x00, 0x22, - 0x54, 0x08, 0x90, 0x02, 0xc6, 0x00, 0x40, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x04, 0x04, 0x00, 0xb1, - 0x28, 0x6c, 0x40, 0x0b, 0x10, 0x02, 0x84, 0xa0, - 0x91, 0x28, 0x20, 0x4a, 0x09, 0x12, 0x82, 0x44, - 0xa0, 0xb1, 0x28, 0xa0, 0xd0, 0x0b, 0x34, 0x0a, - 0x85, 0x02, 0x81, 0x2a, 0x2c, 0x4a, 0x0a, 0x12, - 0x92, 0xc4, 0xa0, 0xb1, 0x28, 0x24, 0x51, 0x0b, - 0x90, 0x02, 0x44, 0x00, 0xb1, 0x40, 0xa0, 0x50, - 0x8a, 0x14, 0x02, 0xc5, 0x00, 0x81, 0x40, 0xa0, - 0x40, 0x28, 0x10, 0x02, 0xc2, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xb8, 0x0d, 0x60, 0x00, 0xf8, - 0x20, 0x3e, 0x00, 0x0f, 0x80, 0x0b, 0x28, 0x80, - 0xc8, 0x20, 0x32, 0x08, 0x0f, 0x82, 0x43, 0xe0, - 0x84, 0xd8, 0x20, 0x32, 0x00, 0x0f, 0x80, 0x43, - 0x20, 0x00, 0xc8, 0x20, 0x3c, 0x08, 0x0c, 0x82, - 0x02, 0xe0, 0x80, 0xfa, 0x21, 0x3c, 0x00, 0x8f, - 0x80, 0x03, 0xe0, 0x00, 0xf8, 0x00, 0x32, 0x00, - 0x0c, 0x80, 0x01, 0xe0, 0x00, 0xc8, 0x00, 0x32, - 0x00, 0x0c, 0x80, 0x03, 0xee, 0x03, 0x50, 0x00, - 0x00, 0x00, 0x00, 0x98, 0x1d, 0xe4, 0x10, 0xb9, - 0x00, 0x3e, 0x40, 0x0f, 0xd2, 0xa3, 0x74, 0xa0, - 0xf9, 0x28, 0x3e, 0x40, 0x05, 0xd2, 0x83, 0xa4, - 0x00, 0xff, 0x28, 0x3f, 0x51, 0x0f, 0xd4, 0x03, - 0x75, 0x00, 0xff, 0x2c, 0x3f, 0x4b, 0x25, 0xd0, - 0x03, 0xe4, 0x00, 0xfd, 0x28, 0x3f, 0x40, 0x0b, - 0xd0, 0xed, 0x09, 0x00, 0x5b, 0x00, 0x13, 0xb4, - 0x00, 0xfd, 0x44, 0x3a, 0x50, 0x9b, 0xd4, 0x13, - 0xf5, 0x04, 0xfd, 0x03, 0x3e, 0x50, 0x0f, 0x90, - 0x03, 0xe6, 0x06, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x18, 0x05, 0xe4, 0x00, 0xf9, 0x20, 0x36, 0x40, - 0x0d, 0x90, 0x03, 0xf4, 0x40, 0xcd, 0x20, 0x3e, - 0x4a, 0x0d, 0x93, 0x03, 0xf4, 0x00, 0xfd, 0x00, - 0x3f, 0x48, 0x0e, 0xd2, 0x93, 0xa4, 0xe0, 0xb9, - 0x30, 0x3e, 0x40, 0x0d, 0xd0, 0x03, 0x34, 0x00, - 0xdd, 0x20, 0x2e, 0x45, 0x0f, 0x50, 0x03, 0x74, - 0x00, 0xfb, 0x30, 0x3e, 0x48, 0x0f, 0xd2, 0xd3, - 0xe4, 0xc0, 0xf9, 0x00, 0x3f, 0x40, 0x0f, 0x90, - 0x03, 0xc6, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x38, 0x10, 0xe0, 0x00, 0xb8, 0x10, 0x2e, 0x00, - 0x0b, 0x80, 0x82, 0xe0, 0x40, 0x88, 0x28, 0x2e, - 0x00, 0x88, 0x83, 0x12, 0xe1, 0x00, 0xb8, 0x08, - 0x2e, 0x0a, 0x08, 0x82, 0x02, 0x20, 0x80, 0x98, - 0x30, 0x2e, 0x12, 0x0b, 0x80, 0x02, 0xa0, 0x50, - 0xf8, 0x28, 0x6e, 0x08, 0x8b, 0x80, 0x02, 0x20, - 0x00, 0xe8, 0x00, 0x2c, 0x0a, 0x0b, 0xa2, 0x02, - 0xe0, 0xc4, 0xb8, 0x08, 0x2e, 0x00, 0x0b, 0x80, - 0x02, 0xce, 0x04, 0x30, 0x00, 0x00, 0x00, 0x00, - 0x08, 0x05, 0xc4, 0x00, 0xb1, 0x00, 0x24, 0x40, - 0x08, 0x10, 0x02, 0xc4, 0x08, 0x83, 0x30, 0x2c, - 0x40, 0x09, 0x1a, 0x02, 0xc4, 0x40, 0xb1, 0x10, - 0x2c, 0x4c, 0x0a, 0x12, 0x82, 0x84, 0x80, 0xb1, - 0x20, 0x2c, 0x4c, 0x0b, 0x11, 0x02, 0x44, 0x00, - 0xb1, 0x30, 0x2c, 0x49, 0x4b, 0x10, 0x42, 0x44, - 0x00, 0x91, 0x90, 0x2c, 0x4c, 0x0b, 0x12, 0x82, - 0xc4, 0x80, 0xb1, 0x20, 0x2c, 0x45, 0x0b, 0x10, - 0x02, 0xc2, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x18, 0x15, 0xa4, 0x00, 0xb9, 0x00, 0x2e, 0x40, - 0x0b, 0x90, 0x02, 0x65, 0xed, 0x09, 0x00, 0x5c, - 0x00, 0x80, 0x89, 0x00, 0x2e, 0x40, 0x08, 0x92, - 0x02, 0xe4, 0x00, 0xb9, 0x00, 0x26, 0xd0, 0x08, - 0x90, 0x02, 0x25, 0x00, 0x99, 0x00, 0x2e, 0x46, - 0x0b, 0x95, 0x02, 0xa4, 0x04, 0xa9, 0x20, 0x2e, - 0x40, 0x0b, 0x92, 0x02, 0x24, 0x40, 0xa9, 0x00, - 0x2e, 0x40, 0x4b, 0x90, 0x00, 0xe4, 0x24, 0xb9, - 0xc0, 0x2e, 0x40, 0x8b, 0x90, 0x42, 0xc6, 0x04, - 0x60, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x15, 0xe4, - 0x00, 0xf9, 0x00, 0x36, 0x40, 0x0d, 0x90, 0x03, - 0xe4, 0x02, 0xc9, 0x00, 0x3e, 0x40, 0x0d, 0x98, - 0x13, 0xe4, 0x00, 0xf9, 0x40, 0x3e, 0x50, 0x0e, - 0x92, 0x03, 0xa4, 0x40, 0xf9, 0x80, 0x3e, 0x70, - 0x07, 0x10, 0x03, 0x24, 0x00, 0xb9, 0x22, 0x6e, - 0x44, 0x0f, 0x10, 0x03, 0x65, 0x80, 0xf9, 0x00, - 0x3e, 0x40, 0x0f, 0x94, 0x03, 0xe6, 0x00, 0xf9, - 0x00, 0x3e, 0x40, 0x0f, 0x90, 0x03, 0xe8, 0x04, - 0x70, 0x00, 0x00, 0x00, 0x00, 0x28, 0x01, 0xa4, - 0x00, 0xf9, 0x00, 0x3e, 0x40, 0x0f, 0x90, 0x03, - 0xc6, 0x00, 0xf9, 0x00, 0x3e, 0x40, 0x07, 0x90, - 0x03, 0xe4, 0x00, 0xf9, 0x00, 0x1e, 0x70, 0x2b, - 0x90, 0x83, 0xe6, 0x00, 0xd9, 0xa0, 0x3e, 0x60, - 0x0f, 0x90, 0x03, 0xe4, 0x00, 0xf9, 0x01, 0x7e, - 0x60, 0x0f, 0x90, 0x02, 0xe4, 0x00, 0xf9, 0x00, - 0x3e, 0x40, 0x0f, 0x99, 0x93, 0xe5, 0x00, 0xf9, - 0x00, 0x7e, 0x40, 0x0f, 0x90, 0x03, 0xca, 0x00, - 0x60, 0x00, 0x00, 0x00, 0x00, 0x28, 0x10, 0xa0, - 0x00, 0xf8, 0x00, 0x3e, 0x00, 0x0e, 0x80, 0x03, - 0xe3, 0x00, 0xf8, 0x00, 0x3c, 0x00, 0x0f, 0x80, - 0x03, 0xe0, 0x10, 0xf8, 0x90, 0x36, 0x00, 0x0c, - 0x84, 0x03, 0x60, 0x10, 0xf8, 0x00, 0x3e, 0x10, - 0x2d, 0x84, 0x03, 0xe2, 0x40, 0xf8, 0x01, 0x3a, - 0x00, 0x4e, 0x80, 0x03, 0xa0, 0x00, 0xf8, 0xed, - 0x09, 0x00, 0x5d, 0x00, 0x00, 0x3a, 0x00, 0x0c, - 0x84, 0x03, 0xe0, 0x00, 0xf8, 0x00, 0x3e, 0x04, - 0x0f, 0x80, 0x01, 0xca, 0x04, 0x20, 0x00, 0x00, - 0x00, 0x00, 0x28, 0x01, 0x28, 0x00, 0xba, 0x00, - 0x2e, 0x80, 0x0e, 0xa0, 0x06, 0xfa, 0x00, 0xbe, - 0x00, 0x26, 0x80, 0x0b, 0xa0, 0x02, 0xea, 0x00, - 0xbe, 0x00, 0x37, 0x84, 0x18, 0xe8, 0x02, 0x28, - 0x00, 0xba, 0x00, 0x3a, 0x80, 0x08, 0xe4, 0x02, - 0xf9, 0x00, 0xde, 0x00, 0x2e, 0x80, 0x4b, 0xe9, - 0x12, 0x38, 0x60, 0xba, 0x00, 0x2e, 0x80, 0x08, - 0xe0, 0x02, 0xe8, 0x00, 0xba, 0x00, 0x3b, 0x80, - 0x0b, 0xa0, 0x02, 0xca, 0x00, 0x40, 0x00, 0x00, - 0x00, 0x00, 0x28, 0x05, 0x4c, 0x00, 0xb3, 0x00, - 0x2c, 0xc0, 0x0b, 0x30, 0x12, 0xce, 0x00, 0xb3, - 0x60, 0x2c, 0xc0, 0x0b, 0x30, 0x02, 0xc6, 0x00, - 0x83, 0x00, 0x22, 0xd0, 0x48, 0xbc, 0x4a, 0x4c, - 0x00, 0xb3, 0x00, 0x20, 0xc0, 0x0a, 0x38, 0xb2, - 0xc2, 0x08, 0xb3, 0x0c, 0x28, 0xc0, 0x0b, 0x2d, - 0x06, 0x88, 0x00, 0xb3, 0x00, 0x28, 0xc0, 0x08, - 0x38, 0x02, 0xcc, 0x11, 0xb3, 0x00, 0x28, 0xc0, - 0x0b, 0x30, 0x02, 0xca, 0x00, 0x50, 0x00, 0x00, - 0x00, 0x00, 0xa0, 0x01, 0x1c, 0x00, 0xb7, 0x00, - 0x2d, 0xc0, 0x0b, 0x70, 0x02, 0xdc, 0x20, 0xb7, - 0x00, 0x25, 0xc0, 0x0b, 0x72, 0x00, 0xdc, 0x20, - 0xb3, 0x84, 0x24, 0x80, 0x48, 0x34, 0x02, 0x1c, - 0xd0, 0xb7, 0x20, 0x29, 0xe8, 0x0b, 0x70, 0x82, - 0xda, 0x00, 0x17, 0x00, 0x0d, 0xc0, 0x0b, 0x60, - 0x36, 0x18, 0x01, 0xb7, 0x20, 0x2d, 0xe0, 0x08, - 0x70, 0x82, 0xdc, 0x00, 0xb7, 0x00, 0x29, 0xc0, - 0x0b, 0x70, 0x02, 0xe8, 0x00, 0x40, 0x00, 0x00, - 0x00, 0x00, 0xa8, 0x08, 0x1e, 0x00, 0xf7, 0x80, - 0x3d, 0xe0, 0x0f, 0x7a, 0x02, 0xde, 0x00, 0xf7, - 0x80, 0x3d, 0xed, 0x09, 0x00, 0x5e, 0x00, 0xe0, - 0x0f, 0x78, 0x02, 0xde, 0x00, 0xf7, 0x80, 0x35, - 0xe0, 0x08, 0x78, 0x0b, 0x5e, 0x40, 0xf7, 0xe0, - 0x3b, 0xea, 0x0f, 0x78, 0x03, 0xda, 0x00, 0xf7, - 0x80, 0x19, 0xec, 0x0e, 0x68, 0x02, 0x9a, 0x09, - 0xf7, 0x81, 0x39, 0xf8, 0x2c, 0x68, 0x03, 0xde, - 0x00, 0xf7, 0xa4, 0x39, 0xe0, 0x0f, 0x78, 0x03, - 0xea, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x1d, 0xac, 0x00, 0xbb, 0x00, 0x3e, 0xc0, 0x0e, - 0xb0, 0x03, 0xec, 0x00, 0xfb, 0x00, 0x3e, 0xc0, - 0x0f, 0xb2, 0x03, 0x64, 0x00, 0xfb, 0x00, 0x1e, - 0xc0, 0x2f, 0xb0, 0x03, 0xec, 0x00, 0xfb, 0x46, - 0x3a, 0xcc, 0x8c, 0xb0, 0x03, 0xc8, 0x00, 0xf9, - 0x00, 0x3e, 0xd8, 0x4f, 0xb0, 0x03, 0xe8, 0x00, - 0xfb, 0x10, 0x3e, 0xd8, 0x0f, 0xa0, 0x03, 0xec, - 0x00, 0xfb, 0x14, 0x3a, 0x80, 0x0f, 0xb0, 0x03, - 0xc2, 0x06, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x05, 0xfe, 0x00, 0xff, 0x80, 0x3b, 0xe0, 0x0f, - 0xf8, 0x83, 0x3e, 0x00, 0xcf, 0x80, 0x33, 0xe0, - 0x0f, 0xfc, 0x83, 0x3e, 0x00, 0xcf, 0x80, 0x33, - 0xe0, 0x8f, 0xe8, 0x43, 0xfe, 0x40, 0xcf, 0xc0, - 0x3f, 0xe0, 0x0f, 0xe9, 0x03, 0x3a, 0x00, 0xff, - 0x81, 0x37, 0xe2, 0x0d, 0xe8, 0x03, 0xfa, 0x40, - 0xcf, 0x80, 0x33, 0xf1, 0x0c, 0xf8, 0x03, 0x3e, - 0x20, 0xcf, 0x90, 0x33, 0xe0, 0x2c, 0xf8, 0x03, - 0xc0, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0xa8, - 0x11, 0x9c, 0x00, 0xb7, 0x00, 0x21, 0xc0, 0x0b, - 0x70, 0x82, 0x19, 0x00, 0x8d, 0x00, 0x21, 0xc4, - 0x0b, 0x70, 0x02, 0x1c, 0x00, 0x8e, 0x00, 0x21, - 0xc0, 0x0b, 0x62, 0x02, 0xdc, 0x48, 0xf7, 0x10, - 0x2d, 0xc8, 0x0f, 0x50, 0x21, 0xdc, 0x10, 0xe7, - 0x00, 0x21, 0xc0, 0x4b, 0x66, 0x02, 0xd8, 0x21, - 0xaf, 0x00, 0x37, 0xc0, 0x08, 0xed, 0x09, 0x00, - 0x5f, 0x00, 0x74, 0x43, 0x7c, 0x44, 0x8f, 0x18, - 0x21, 0xc0, 0x08, 0x70, 0x02, 0xea, 0x04, 0x60, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9c, 0x00, - 0xb7, 0x00, 0x29, 0xc0, 0x0b, 0xf0, 0x02, 0x1c, - 0x20, 0x87, 0x00, 0x21, 0xc0, 0x0b, 0x31, 0x02, - 0x1c, 0x00, 0x87, 0x18, 0x21, 0xc4, 0x0b, 0x60, - 0x12, 0xdc, 0x41, 0xb7, 0x00, 0x2d, 0xc1, 0x1b, - 0x64, 0x08, 0x98, 0x00, 0xb6, 0x00, 0x23, 0xc0, - 0x08, 0x40, 0x92, 0xd8, 0x00, 0x87, 0x00, 0x21, - 0xc0, 0x09, 0x60, 0x02, 0x1c, 0x00, 0x97, 0x42, - 0x61, 0x40, 0x08, 0x70, 0x02, 0xc0, 0x00, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x20, 0x14, 0xcc, 0x00, - 0xb3, 0x00, 0x20, 0xc0, 0x0b, 0x30, 0x0a, 0x2f, - 0x00, 0x83, 0x00, 0x20, 0xc0, 0x0b, 0x34, 0x02, - 0x0c, 0x00, 0x83, 0x60, 0x20, 0xc8, 0x0b, 0x2a, - 0x02, 0xcc, 0x00, 0x8b, 0x41, 0x2c, 0xf0, 0x0a, - 0x10, 0x06, 0x4c, 0x09, 0xa0, 0x20, 0x20, 0xe8, - 0x2b, 0x18, 0x02, 0xcb, 0x00, 0xa3, 0xc0, 0x24, - 0xc0, 0x09, 0x0c, 0x02, 0x0e, 0x08, 0x93, 0x00, - 0x20, 0x00, 0x08, 0x30, 0x02, 0xc8, 0x04, 0x30, - 0x00, 0x00, 0x00, 0x00, 0xa8, 0x15, 0xac, 0x00, - 0xfb, 0x00, 0x3a, 0xc0, 0x0f, 0xf0, 0x03, 0x2e, - 0x00, 0xcb, 0x00, 0x32, 0xc0, 0x0f, 0xf4, 0x03, - 0x2c, 0x02, 0xcb, 0x80, 0x32, 0x80, 0x0f, 0xaa, - 0x13, 0xfc, 0x00, 0xbf, 0x00, 0x3f, 0xe0, 0x0b, - 0x90, 0x02, 0xa8, 0x00, 0xf9, 0x80, 0xb3, 0xf8, - 0x0d, 0xa8, 0x02, 0xeb, 0x00, 0xcf, 0x40, 0x33, - 0xc0, 0x2d, 0x91, 0x82, 0x3e, 0x80, 0xdf, 0x80, - 0x30, 0x00, 0x0c, 0xb0, 0x03, 0xea, 0x04, 0x60, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0xec, 0x00, - 0xfb, 0x00, 0x3e, 0xc0, 0x0f, 0xb0, 0x03, 0xec, - 0x10, 0xfb, 0x00, 0x3e, 0xc0, 0x0f, 0xba, 0x03, - 0xed, 0x09, 0x00, 0x60, 0x00, 0xec, 0x00, 0xfb, - 0x00, 0x3e, 0x90, 0x0f, 0xb4, 0x03, 0xec, 0x00, - 0xfb, 0x00, 0x3e, 0xc6, 0x1f, 0xa0, 0x03, 0xa9, - 0x00, 0xe8, 0x50, 0x3a, 0xc0, 0x0e, 0x80, 0x07, - 0xe1, 0x84, 0xfb, 0x30, 0x36, 0xc0, 0x0e, 0x84, - 0x03, 0xec, 0x00, 0xeb, 0x04, 0x3e, 0x00, 0x0f, - 0xb0, 0x03, 0xe0, 0x00, 0x30, 0x00, 0x00, 0x00, - 0x00, 0x01, 0x10, 0xfc, 0x00, 0xfb, 0x00, 0x3f, - 0xc0, 0x0f, 0xf0, 0x03, 0xfc, 0x20, 0xce, 0x10, - 0x33, 0xc0, 0x0f, 0x70, 0x03, 0x2f, 0x00, 0xfd, - 0x00, 0x33, 0x80, 0x0f, 0xf0, 0x43, 0xdc, 0x00, - 0xcf, 0x08, 0x37, 0xc0, 0x0f, 0x98, 0x03, 0x98, - 0x84, 0xc9, 0x00, 0x3f, 0xc0, 0x0f, 0xe9, 0x33, - 0xbe, 0x00, 0xff, 0x01, 0x3f, 0xc0, 0x0c, 0x90, - 0x03, 0xfc, 0x10, 0xff, 0x00, 0x32, 0x28, 0x0c, - 0xf0, 0x03, 0xc0, 0x44, 0x30, 0x00, 0x00, 0x00, - 0x00, 0x81, 0x04, 0x6c, 0x00, 0xbb, 0x00, 0x2e, - 0xc0, 0x0b, 0xb0, 0x02, 0xed, 0x00, 0x8b, 0x00, - 0x22, 0xc0, 0x0b, 0xb0, 0x02, 0x2c, 0x00, 0xbb, - 0x40, 0x22, 0x30, 0x0b, 0xbc, 0x82, 0xec, 0x00, - 0x8b, 0x00, 0x2a, 0xc1, 0x0e, 0xac, 0x03, 0x2a, - 0x80, 0x88, 0xc8, 0x3a, 0xc0, 0x0b, 0x90, 0x02, - 0xe6, 0x00, 0xfb, 0x00, 0x2e, 0xc0, 0x08, 0x88, - 0x02, 0xec, 0x00, 0xb3, 0x02, 0x2a, 0x22, 0x28, - 0xb0, 0x02, 0xe0, 0x40, 0x10, 0x00, 0x00, 0x00, - 0x00, 0x80, 0x05, 0x2c, 0x00, 0xbb, 0x00, 0x2e, - 0xc0, 0x0b, 0xb0, 0x02, 0xe6, 0x00, 0xa3, 0x00, - 0x22, 0xc0, 0x0b, 0xb0, 0x02, 0xa4, 0x00, 0xb3, - 0xc0, 0x22, 0xa0, 0x0b, 0xa8, 0x02, 0xec, 0x01, - 0x8b, 0x01, 0x22, 0xc0, 0x1b, 0x85, 0x02, 0xe8, - 0x00, 0x89, 0x80, 0x2e, 0xc0, 0x0b, 0xb0, 0x02, - 0xe9, 0x80, 0xbb, 0x01, 0x28, 0xc0, 0x18, 0x98, - 0x02, 0xec, 0x01, 0xed, 0x09, 0x00, 0x61, 0x00, - 0xbb, 0x00, 0x26, 0x00, 0xc8, 0xb0, 0x02, 0xe0, - 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, - 0x0c, 0x00, 0xb3, 0x00, 0x2c, 0xc0, 0x0b, 0x30, - 0x02, 0xcc, 0x00, 0xa3, 0x80, 0x20, 0xc0, 0x0b, - 0x30, 0x02, 0x0c, 0x00, 0xb3, 0x00, 0x20, 0x80, - 0x0b, 0x20, 0x42, 0xcc, 0x00, 0x83, 0x00, 0x2c, - 0xc0, 0x0a, 0x00, 0x42, 0x88, 0x02, 0x80, 0x00, - 0x68, 0xc0, 0x0b, 0x10, 0x02, 0xcc, 0x04, 0xb3, - 0x00, 0x0c, 0xc0, 0x28, 0x10, 0x02, 0x4c, 0x00, - 0xbb, 0x00, 0x2c, 0x00, 0x08, 0x30, 0x02, 0xc2, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, - 0x6c, 0x00, 0xfb, 0x00, 0x3e, 0xc0, 0x0f, 0xb0, - 0x03, 0xcc, 0x00, 0xeb, 0x00, 0x32, 0xc0, 0x0f, - 0xf0, 0x03, 0x2c, 0x00, 0xbb, 0x00, 0x22, 0x80, - 0x0f, 0x80, 0x02, 0xdc, 0x00, 0xcf, 0x00, 0x33, - 0xc0, 0x0b, 0x80, 0x03, 0xec, 0x00, 0xc8, 0x00, - 0x3f, 0xc0, 0x0f, 0x90, 0x03, 0xe0, 0x10, 0xfb, - 0x00, 0x3f, 0xc0, 0x0c, 0x90, 0x03, 0xec, 0x08, - 0xfb, 0x00, 0x36, 0x00, 0x0c, 0xb0, 0x03, 0xc0, - 0x03, 0x50, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x1d, - 0xfc, 0x00, 0xff, 0x00, 0x3f, 0xc0, 0x0f, 0x70, - 0x23, 0xfc, 0x00, 0xdf, 0x00, 0x3f, 0xc0, 0x0f, - 0xf0, 0x03, 0xf4, 0x00, 0xff, 0x06, 0x1f, 0x00, - 0x4f, 0xc0, 0x03, 0xfc, 0x06, 0x7f, 0x00, 0x3b, - 0xc0, 0x0e, 0xc0, 0x03, 0x3c, 0x00, 0xfc, 0x00, - 0x29, 0xc0, 0x07, 0xd0, 0x03, 0xd4, 0x08, 0xef, - 0x00, 0x3f, 0xc0, 0x0f, 0xd0, 0x23, 0xfc, 0x00, - 0xff, 0x00, 0x3b, 0x00, 0x0f, 0xf0, 0x03, 0xe8, - 0x06, 0x70, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x05, - 0xfc, 0x00, 0xff, 0x00, 0x3f, 0x00, 0x2c, 0xf0, - 0x03, 0xfc, 0x00, 0xff, 0x00, 0x3f, 0xc0, 0x0f, - 0xf0, 0x03, 0xbc, 0x80, 0xff, 0x01, 0xed, 0x09, - 0x00, 0x62, 0x00, 0x33, 0xd0, 0x0b, 0xf0, 0x03, - 0xdc, 0x00, 0xff, 0x00, 0x3d, 0x00, 0x0c, 0xd1, - 0x03, 0xfc, 0x00, 0xcf, 0x00, 0x3f, 0xc0, 0x0f, - 0xf0, 0x02, 0xfc, 0x00, 0xdf, 0x00, 0x3f, 0xc0, - 0x06, 0xf0, 0x03, 0xfc, 0x00, 0xdc, 0x34, 0x3b, - 0x06, 0x0c, 0xf0, 0x03, 0xf0, 0x04, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x10, 0xec, 0x00, 0xbb, - 0x00, 0x2e, 0x02, 0x08, 0xb0, 0x02, 0xec, 0x00, - 0xbb, 0x00, 0x2e, 0xc0, 0x03, 0xb0, 0x0a, 0xac, - 0x00, 0xbb, 0x28, 0xa2, 0x60, 0x0b, 0xb0, 0x02, - 0xec, 0x00, 0xbf, 0xa1, 0x22, 0x01, 0x0b, 0xd6, - 0x22, 0xec, 0x00, 0x9b, 0x00, 0x2f, 0xc0, 0x09, - 0xf0, 0x02, 0xec, 0x00, 0xb9, 0x00, 0x2e, 0xc0, - 0x0b, 0xf0, 0x02, 0xec, 0x00, 0xb8, 0x60, 0x22, - 0x90, 0x08, 0xb0, 0x02, 0xe0, 0x04, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x88, 0x05, 0xcc, 0x00, 0xb3, - 0x00, 0x2e, 0x28, 0x08, 0x30, 0x02, 0xcc, 0x00, - 0xb3, 0x00, 0x2c, 0xc0, 0x0b, 0x30, 0x02, 0x8d, - 0x00, 0xb3, 0x20, 0x20, 0x8c, 0x0b, 0x30, 0x02, - 0xcc, 0x00, 0xb3, 0x08, 0x2a, 0x00, 0x08, 0x16, - 0x02, 0xc8, 0x00, 0x93, 0x00, 0x2c, 0xc0, 0x0b, - 0x30, 0x02, 0xcc, 0x00, 0xb3, 0x00, 0x2c, 0xc0, - 0x0b, 0x30, 0x02, 0xcc, 0x00, 0xb1, 0x30, 0x24, - 0x40, 0x08, 0x30, 0x42, 0xe2, 0x01, 0x70, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0x15, 0xac, 0x00, 0xbb, - 0x00, 0x2e, 0x20, 0x08, 0xb0, 0x02, 0xec, 0x00, - 0xbb, 0x05, 0x2e, 0xc0, 0x0b, 0xb0, 0x02, 0xac, - 0x00, 0xbb, 0x00, 0x22, 0xd8, 0x0b, 0xb0, 0x02, - 0xec, 0x01, 0x9b, 0x00, 0x22, 0x08, 0x0a, 0x90, - 0x02, 0xe0, 0x00, 0x9b, 0x04, 0x2e, 0xc0, 0x09, - 0xb0, 0x02, 0xec, 0x00, 0xb9, 0x00, 0x2e, 0xc0, - 0x0b, 0xb0, 0x02, 0xec, 0x00, 0xb9, 0x00, 0x22, - 0x80, 0xed, 0x09, 0x00, 0x63, 0x00, 0x08, 0xb0, - 0x00, 0xf0, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, - 0x40, 0x15, 0xec, 0x00, 0xfb, 0x00, 0x3c, 0x00, - 0x0c, 0xb0, 0x03, 0xec, 0x00, 0xfb, 0x00, 0x3e, - 0xc0, 0x0f, 0xb0, 0x03, 0xa4, 0x00, 0xfb, 0x00, - 0x32, 0xc0, 0x07, 0xb0, 0x03, 0xec, 0x00, 0xfb, - 0x00, 0x3a, 0xb8, 0x0c, 0x90, 0x03, 0xe5, 0x00, - 0xcb, 0x00, 0x3e, 0xc0, 0x0f, 0xb0, 0x02, 0xec, - 0x00, 0xdb, 0x00, 0x3e, 0xc0, 0x0e, 0xb0, 0x03, - 0xec, 0x00, 0xf8, 0x08, 0xb2, 0x20, 0x2c, 0xb0, - 0x01, 0xd0, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, - 0xe0, 0x01, 0xbc, 0x00, 0xff, 0x00, 0x3f, 0x00, - 0x0f, 0xf0, 0x03, 0xfc, 0x00, 0xff, 0x00, 0x3f, - 0xc0, 0x0f, 0xf0, 0x03, 0xee, 0x80, 0xff, 0x08, - 0x3e, 0xc0, 0x4f, 0xf0, 0x03, 0xfc, 0x00, 0xf7, - 0x01, 0x3b, 0xa0, 0x8f, 0xd0, 0x03, 0xfc, 0x02, - 0xaf, 0x10, 0x3f, 0xc0, 0x0f, 0xb0, 0x03, 0xfc, - 0x00, 0xfb, 0x00, 0x3f, 0xc0, 0x0f, 0xf0, 0x03, - 0xfc, 0x00, 0xfc, 0x10, 0x37, 0xe4, 0x0f, 0xf0, - 0x01, 0xf8, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, - 0x40, 0x10, 0xac, 0x00, 0xfb, 0x00, 0x3e, 0x00, - 0x1e, 0xb0, 0x03, 0xec, 0x00, 0xfb, 0x00, 0x3e, - 0xc0, 0x4f, 0xb0, 0x03, 0xac, 0x40, 0xcb, 0x00, - 0x3e, 0xc0, 0x0c, 0xb0, 0x03, 0xac, 0x00, 0xcb, - 0x00, 0x3a, 0xd0, 0x0c, 0x90, 0x03, 0xac, 0x00, - 0xdb, 0x70, 0x3e, 0xc0, 0x0c, 0xb0, 0x03, 0x6c, - 0x00, 0xeb, 0x00, 0x32, 0xc0, 0x0f, 0xb0, 0x03, - 0x6c, 0x00, 0xfb, 0x70, 0x30, 0x60, 0x0c, 0xb0, - 0x03, 0xd0, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, - 0xc8, 0x05, 0x2c, 0x00, 0xbb, 0x00, 0x2e, 0x38, - 0x08, 0xb0, 0x02, 0xec, 0x00, 0xbb, 0x00, 0x2e, - 0xc0, 0x0b, 0x38, 0x03, 0xec, 0x00, 0xdb, 0x00, - 0x2e, 0xc1, 0x28, 0xb0, 0xed, 0x09, 0x00, 0x64, - 0x00, 0x02, 0xec, 0x00, 0xdf, 0x00, 0x20, 0xc0, - 0x0d, 0xd0, 0x02, 0x2c, 0x00, 0x89, 0x00, 0x2f, - 0xc0, 0x0a, 0xf0, 0x02, 0x2c, 0x00, 0xbb, 0x00, - 0xa2, 0xc0, 0x0b, 0xf0, 0x02, 0xec, 0x00, 0xbb, - 0x00, 0x22, 0xc4, 0x28, 0xb0, 0x02, 0x72, 0x00, - 0x40, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x05, 0x4c, - 0x00, 0xb3, 0x00, 0x2c, 0x08, 0x0a, 0x30, 0x02, - 0xcc, 0x00, 0xb3, 0x00, 0x2c, 0xc0, 0x0b, 0x30, - 0x02, 0x8e, 0x00, 0xab, 0x50, 0x2c, 0xc1, 0x08, - 0x30, 0x02, 0x8c, 0x00, 0x93, 0x00, 0x28, 0x40, - 0x08, 0x10, 0x02, 0xac, 0x01, 0xb3, 0x80, 0x2c, - 0xc0, 0x88, 0x30, 0x02, 0x4c, 0x00, 0x83, 0x00, - 0x20, 0xc0, 0x0b, 0x30, 0x06, 0x4c, 0x00, 0xba, - 0x40, 0x20, 0x00, 0x08, 0x30, 0x02, 0x78, 0x04, - 0x50, 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x1e, - 0x00, 0xb7, 0x80, 0x2d, 0x24, 0x08, 0x78, 0x02, - 0xde, 0x00, 0xb7, 0x80, 0x2d, 0xe0, 0x0b, 0x78, - 0x82, 0xde, 0x00, 0x87, 0x80, 0x2d, 0xe4, 0x0a, - 0x78, 0x42, 0xde, 0x00, 0x93, 0x80, 0x27, 0xe0, - 0x19, 0x18, 0x02, 0x1e, 0x04, 0xa7, 0x80, 0x6c, - 0xe0, 0x0a, 0x78, 0x02, 0x1e, 0x00, 0xb5, 0x80, - 0x21, 0xe0, 0x0b, 0x78, 0x02, 0xde, 0x00, 0xb2, - 0x81, 0x21, 0x20, 0x80, 0x78, 0x02, 0x48, 0x00, - 0x40, 0x00, 0x00, 0x00, 0x00, 0x48, 0x08, 0x0c, - 0x00, 0xf3, 0x00, 0x2e, 0x00, 0x0a, 0x30, 0x03, - 0xcc, 0x00, 0xf3, 0x00, 0x3c, 0xc4, 0x0b, 0x30, - 0x13, 0x8c, 0x02, 0xa3, 0x04, 0x3c, 0xc0, 0x0c, - 0x30, 0x03, 0x8c, 0x00, 0xd3, 0x00, 0x38, 0x48, - 0x1c, 0x10, 0x03, 0xa9, 0x80, 0xf3, 0x40, 0x3c, - 0xc0, 0x0c, 0x30, 0x03, 0x4c, 0x00, 0xe3, 0x10, - 0x30, 0xc0, 0x0f, 0x30, 0x03, 0x4c, 0x00, 0xf0, - 0x00, 0xb2, 0x4c, 0x04, 0x30, 0x03, 0xd2, 0xed, - 0x09, 0x00, 0x65, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x40, 0x1d, 0xbc, 0x00, 0xff, 0x00, - 0x3f, 0x80, 0x0f, 0xf0, 0x03, 0xfc, 0x00, 0x7f, - 0x00, 0x3f, 0xc0, 0x0f, 0x70, 0x03, 0xfc, 0x00, - 0xff, 0x10, 0x3f, 0xc0, 0x0d, 0xf0, 0x03, 0xfc, - 0x00, 0xff, 0x01, 0x3b, 0xc0, 0x0f, 0xd0, 0x03, - 0xf4, 0x00, 0xdf, 0x00, 0x3f, 0xd0, 0x0f, 0xf0, - 0x03, 0xfc, 0x00, 0xfd, 0x00, 0x3f, 0xc0, 0x07, - 0xf0, 0x03, 0xfc, 0x00, 0xfc, 0x00, 0x3f, 0x04, - 0x0f, 0xf0, 0x02, 0xd0, 0x06, 0x60, 0x00, 0x00, - 0x00, 0x00, 0xa8, 0x15, 0xec, 0x00, 0xfb, 0x00, - 0x3a, 0x00, 0x2c, 0xb0, 0x03, 0xec, 0x00, 0xfb, - 0x00, 0x3e, 0xc0, 0x0f, 0x30, 0x0b, 0xac, 0x00, - 0xfb, 0x00, 0x3e, 0xc0, 0x0c, 0xb0, 0x03, 0xec, - 0x04, 0xfb, 0x00, 0x36, 0x00, 0x0f, 0x12, 0x8b, - 0x44, 0x00, 0xaa, 0x80, 0x32, 0xdc, 0x8f, 0xbb, - 0x03, 0x6c, 0x00, 0xfb, 0x00, 0x3e, 0xc0, 0x0f, - 0xb2, 0x03, 0xec, 0x00, 0xfb, 0x00, 0x3e, 0x80, - 0x0f, 0xb0, 0x03, 0xea, 0x00, 0x70, 0x00, 0x00, - 0x00, 0x00, 0x48, 0x11, 0x9c, 0x00, 0xb7, 0x00, - 0x2f, 0x80, 0x08, 0x70, 0x02, 0xdc, 0x00, 0xb7, - 0x00, 0x2d, 0xc0, 0x0b, 0x70, 0x02, 0x1c, 0x00, - 0xb7, 0x00, 0x2c, 0xc0, 0x08, 0x70, 0x02, 0xdc, - 0x00, 0xb3, 0x50, 0x31, 0x80, 0xcb, 0x54, 0x02, - 0x1c, 0x00, 0x8f, 0x04, 0x35, 0xc8, 0x0b, 0x72, - 0x83, 0x1c, 0x00, 0xe7, 0x00, 0x2d, 0xc0, 0x0b, - 0x72, 0x82, 0xdc, 0x00, 0xb7, 0x00, 0x2d, 0xc0, - 0x0b, 0x70, 0x02, 0xd2, 0x04, 0x60, 0x00, 0x00, - 0x00, 0x00, 0xc0, 0x00, 0x9e, 0x00, 0xb7, 0x80, - 0x2d, 0x60, 0x08, 0x78, 0x02, 0xde, 0x00, 0xb7, - 0x80, 0x2d, 0xe0, 0x0b, 0x78, 0x02, 0x9e, 0x00, - 0xb7, 0x80, 0x2d, 0xe0, 0x09, 0x78, 0x02, 0xde, - 0x00, 0xb7, 0xed, 0x09, 0x00, 0x66, 0x00, 0xa0, - 0x25, 0x60, 0x09, 0xda, 0x02, 0x3e, 0x00, 0xa7, - 0x80, 0x21, 0xe0, 0x0b, 0x3a, 0x46, 0x5e, 0x00, - 0xb7, 0xc0, 0x29, 0xe0, 0x0b, 0x79, 0x02, 0xde, - 0x00, 0xb7, 0x80, 0x2d, 0xe0, 0x1b, 0x78, 0x02, - 0xf0, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x48, - 0x04, 0xcc, 0x00, 0xb3, 0x00, 0x2c, 0x90, 0x08, - 0x30, 0x02, 0xcc, 0x00, 0xb3, 0x00, 0x2c, 0xc0, - 0x8b, 0x30, 0x02, 0x0e, 0x00, 0xb3, 0x00, 0x2e, - 0xf0, 0x29, 0x30, 0x02, 0xcc, 0x10, 0xb3, 0x00, - 0x20, 0xec, 0x0b, 0x10, 0x02, 0x4e, 0x00, 0x83, - 0x20, 0x24, 0xc0, 0x0b, 0x30, 0x02, 0x0c, 0x00, - 0xa3, 0x80, 0x2c, 0xc0, 0x0b, 0x30, 0x02, 0xcc, - 0x00, 0xb3, 0x90, 0x2c, 0xc4, 0x0b, 0x30, 0x02, - 0xd2, 0x04, 0x30, 0x00, 0x00, 0x00, 0x00, 0xe8, - 0x05, 0xa8, 0x00, 0xfa, 0x00, 0x3f, 0x90, 0x08, - 0xa0, 0x03, 0xe8, 0x00, 0xba, 0x00, 0x3e, 0x80, - 0x0f, 0x20, 0x02, 0xaa, 0x20, 0xfa, 0x00, 0x3f, - 0xb6, 0x0d, 0xa0, 0x03, 0xe8, 0x00, 0xfa, 0x00, - 0x37, 0x80, 0x0d, 0xe0, 0x03, 0x39, 0x00, 0xee, - 0x60, 0x32, 0x80, 0x0f, 0xa0, 0x03, 0x68, 0x00, - 0xfa, 0x02, 0x3a, 0x80, 0x0b, 0xa0, 0x03, 0xe8, - 0x00, 0xfe, 0x40, 0x3f, 0xa0, 0x0f, 0xa0, 0x03, - 0xfa, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x48, - 0x00, 0xe0, 0x00, 0xf8, 0x00, 0x3e, 0x08, 0x0f, - 0x80, 0x01, 0xe0, 0x00, 0xf8, 0x00, 0x1e, 0x00, - 0x0f, 0x80, 0x23, 0xe1, 0x00, 0xf8, 0x00, 0x3e, - 0x10, 0x0e, 0x80, 0x03, 0xe0, 0x00, 0xf8, 0x00, - 0x7a, 0x00, 0x0f, 0x80, 0x03, 0xa2, 0x40, 0xf8, - 0x44, 0x3e, 0x00, 0x0f, 0x80, 0x03, 0xa0, 0x00, - 0xe8, 0x00, 0x3e, 0x00, 0x0f, 0x80, 0x03, 0xe0, - 0x00, 0xf8, 0x08, 0x3e, 0x20, 0x0f, 0x80, 0x03, - 0xd2, 0x00, 0x30, 0x00, 0x00, 0xed, 0x09, 0x00, - 0x67, 0x00, 0x00, 0x00, 0x08, 0x00, 0xe4, 0x00, - 0xf9, 0x00, 0x3e, 0x40, 0x0e, 0x90, 0x03, 0xe4, - 0x00, 0xf9, 0x00, 0x3e, 0x40, 0x0f, 0x90, 0x03, - 0x66, 0x00, 0xf9, 0x00, 0x3e, 0x68, 0x04, 0x90, - 0x03, 0xe4, 0x00, 0xf1, 0x00, 0x3a, 0x40, 0x8f, - 0x10, 0x03, 0x24, 0x08, 0xe9, 0x00, 0x2e, 0x40, - 0x0f, 0x90, 0x02, 0xe4, 0x00, 0xf9, 0x00, 0x36, - 0x40, 0x0f, 0x10, 0x03, 0x24, 0x00, 0xf9, 0x80, - 0x3e, 0x64, 0x0f, 0x90, 0x03, 0xc2, 0x04, 0x30, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x64, 0x00, - 0xb9, 0x00, 0x2c, 0x70, 0x08, 0x90, 0x02, 0xe4, - 0x00, 0xb9, 0x00, 0x2e, 0x40, 0x0b, 0x90, 0x0b, - 0x65, 0x20, 0xb9, 0x00, 0x2e, 0x48, 0x0a, 0x90, - 0x02, 0xe5, 0x00, 0xb9, 0x00, 0x26, 0x40, 0x0b, - 0x90, 0x02, 0x24, 0x00, 0x89, 0x80, 0x2e, 0x40, - 0x1b, 0x90, 0x02, 0xe4, 0x00, 0xb9, 0x00, 0x2e, - 0x40, 0x0b, 0x90, 0x02, 0xa4, 0x00, 0xb9, 0x60, - 0x2e, 0x48, 0x0b, 0x90, 0x02, 0xe0, 0x00, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x18, 0x15, 0x24, 0x00, - 0xb9, 0x00, 0x2e, 0x54, 0x0a, 0x90, 0x02, 0xe4, - 0x00, 0xb9, 0x00, 0x2e, 0x40, 0x0b, 0x98, 0x02, - 0x64, 0x80, 0xb9, 0x60, 0x2e, 0x40, 0x1a, 0x90, - 0x02, 0xe4, 0x00, 0xa9, 0x00, 0x2e, 0x40, 0x03, - 0x90, 0x02, 0x44, 0x00, 0xa9, 0x20, 0x2e, 0x40, - 0x1a, 0x90, 0x02, 0xe4, 0x00, 0x39, 0x00, 0x2e, - 0x40, 0x09, 0x90, 0x02, 0x64, 0x00, 0xb9, 0x10, - 0x2e, 0x40, 0x0b, 0x90, 0x02, 0xc6, 0x00, 0x40, - 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x04, 0x00, - 0xb1, 0x00, 0x2e, 0x50, 0x08, 0x10, 0x02, 0xc4, - 0x10, 0xb1, 0x00, 0x2c, 0x40, 0x0b, 0x10, 0x02, - 0x44, 0x00, 0xb1, 0x40, 0x2c, 0x40, 0x0a, 0x10, - 0x02, 0xcc, 0x00, 0xb1, 0x00, 0x24, 0x51, 0x0b, - 0xed, 0x09, 0x00, 0x68, 0x00, 0x14, 0x0a, 0x05, - 0x00, 0x81, 0x40, 0x2c, 0x50, 0x0b, 0x10, 0x02, - 0xc4, 0x00, 0xb1, 0x00, 0x2c, 0x40, 0x0b, 0x14, - 0x02, 0xc4, 0x00, 0xb1, 0x40, 0x2c, 0x50, 0x0b, - 0x10, 0x02, 0xc2, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xb8, 0x0d, 0x60, 0x00, 0xf8, 0x00, 0x2e, - 0x00, 0x0e, 0x80, 0x03, 0xe0, 0x00, 0xf8, 0x00, - 0x3e, 0x00, 0x0f, 0x80, 0x03, 0x60, 0x00, 0xf8, - 0x00, 0x3e, 0x14, 0x4e, 0x80, 0x43, 0xe0, 0x00, - 0xe8, 0x50, 0x3a, 0x00, 0x0f, 0x80, 0x03, 0x60, - 0x00, 0xea, 0x00, 0x3e, 0x00, 0x0f, 0x80, 0x03, - 0xe0, 0x00, 0xf8, 0x00, 0x36, 0x00, 0x0f, 0x80, - 0x03, 0x60, 0x00, 0xf8, 0x00, 0x3e, 0x00, 0x0f, - 0x80, 0x03, 0xee, 0x03, 0x50, 0x00, 0x00, 0x00, - 0x00, 0x98, 0x1d, 0xe4, 0x00, 0xf9, 0x00, 0x3f, - 0x40, 0x0f, 0x90, 0x03, 0xe4, 0x00, 0xf9, 0x00, - 0x3e, 0x40, 0x0f, 0x90, 0x03, 0xf5, 0x14, 0xf9, - 0x00, 0x3f, 0xd0, 0x0f, 0x90, 0x03, 0xe4, 0x00, - 0xf9, 0x40, 0x3b, 0x40, 0x0f, 0xd4, 0x13, 0xf4, - 0x00, 0xfd, 0x40, 0x3e, 0x50, 0x0f, 0x94, 0x03, - 0xe4, 0x00, 0xdd, 0x40, 0x3e, 0x40, 0x0f, 0x94, - 0x03, 0xa4, 0x00, 0xdd, 0x45, 0x3f, 0x50, 0x0f, - 0x90, 0x03, 0xe6, 0x06, 0x70, 0x00, 0x00, 0x00, - 0x00, 0x18, 0x05, 0xe4, 0x00, 0xf9, 0x00, 0x3f, - 0xc0, 0x0c, 0x90, 0x03, 0xe4, 0x00, 0xf9, 0x00, - 0x3e, 0x40, 0x0f, 0xd0, 0x03, 0x34, 0x01, 0xed, - 0x10, 0x3b, 0x4c, 0x0c, 0x90, 0x03, 0xf4, 0x00, - 0xfd, 0x40, 0x32, 0x40, 0x1e, 0x91, 0x03, 0x64, - 0x00, 0xfd, 0x2c, 0x32, 0x4c, 0x0d, 0x90, 0x03, - 0x64, 0x00, 0xf9, 0x00, 0x3e, 0x40, 0x0f, 0x92, - 0x83, 0x24, 0x00, 0xfd, 0x04, 0x3f, 0x40, 0x0f, - 0x90, 0x03, 0xc6, 0x00, 0x70, 0x00, 0x00, 0x00, - 0x00, 0x38, 0x10, 0xed, 0x09, 0x00, 0x69, 0x00, - 0xe0, 0x00, 0xb8, 0x00, 0x1a, 0x02, 0x28, 0x80, - 0x02, 0xe0, 0x00, 0xb8, 0x00, 0x2e, 0x00, 0x0b, - 0x80, 0x06, 0xa0, 0x04, 0x80, 0x00, 0x2e, 0x08, - 0x0d, 0x80, 0x02, 0xe0, 0x00, 0x18, 0x60, 0xa0, - 0x02, 0x0b, 0x81, 0x22, 0xa8, 0xa0, 0xb8, 0x20, - 0x2a, 0x0c, 0x0d, 0x84, 0x02, 0x20, 0x00, 0xb8, - 0x10, 0x2e, 0x00, 0x0b, 0x82, 0x02, 0x20, 0x00, - 0xb8, 0x48, 0x2c, 0x82, 0x0b, 0x80, 0x02, 0xce, - 0x04, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x05, - 0xc4, 0x00, 0xb1, 0x00, 0x2c, 0x40, 0x08, 0x10, - 0x02, 0xc4, 0x04, 0xb1, 0x00, 0x6c, 0x40, 0x0b, - 0x10, 0x02, 0x04, 0x40, 0xa3, 0x00, 0x28, 0x4c, - 0x08, 0x10, 0x02, 0xc4, 0x00, 0xb1, 0x30, 0x24, - 0x40, 0x18, 0x10, 0x02, 0x84, 0x88, 0xb9, 0x28, - 0x2c, 0x48, 0x0a, 0x11, 0x02, 0x44, 0x00, 0xb1, - 0x00, 0x2c, 0x40, 0x0b, 0x12, 0x82, 0x44, 0x00, - 0xb1, 0x30, 0x2c, 0x44, 0x9b, 0x10, 0x02, 0xc2, - 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x18, 0x15, - 0xa4, 0x00, 0xb9, 0x04, 0x2e, 0x40, 0x08, 0x90, - 0x02, 0xe4, 0x04, 0xb9, 0x00, 0x2e, 0x40, 0x0b, - 0x90, 0x02, 0xa4, 0x80, 0x89, 0x00, 0x24, 0x48, - 0x09, 0x90, 0x02, 0xe4, 0x00, 0x93, 0x00, 0x26, - 0x43, 0x0b, 0x10, 0x22, 0xa4, 0x48, 0xb9, 0x08, - 0x2c, 0x40, 0x19, 0x90, 0x02, 0x24, 0x00, 0xb9, - 0x00, 0x2e, 0x40, 0x1b, 0x90, 0x02, 0x64, 0x00, - 0xb9, 0x0a, 0x2e, 0x40, 0x0b, 0x90, 0x02, 0xc6, - 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x15, - 0xe4, 0x00, 0xf9, 0x00, 0x3e, 0x42, 0x0c, 0x90, - 0x02, 0xe4, 0x00, 0xf9, 0x00, 0x2e, 0x40, 0x0f, - 0x90, 0x03, 0x04, 0x00, 0xa9, 0x00, 0x3a, 0x70, - 0x08, 0x90, 0x03, 0xe4, 0x00, 0xf9, 0x00, 0x36, - 0x40, 0x0e, 0x90, 0x03, 0xa6, 0x00, 0xed, 0x09, - 0x00, 0x6a, 0x00, 0xf1, 0x00, 0x2e, 0x40, 0x04, - 0x90, 0x03, 0x64, 0x00, 0xb9, 0x00, 0x2e, 0x40, - 0x0b, 0x90, 0x03, 0x64, 0x00, 0xf9, 0x00, 0x2e, - 0x50, 0x0f, 0x90, 0x03, 0xe8, 0x04, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x28, 0x01, 0xa4, 0x00, 0xf9, - 0x00, 0x3a, 0x50, 0x0f, 0x90, 0x03, 0xe4, 0x00, - 0xf9, 0x00, 0x3e, 0x40, 0x0f, 0x90, 0x0b, 0xa4, - 0x00, 0xf9, 0x00, 0x3e, 0x60, 0x0f, 0x90, 0x03, - 0xe4, 0x00, 0xf9, 0x01, 0x3a, 0x40, 0x07, 0x90, - 0x47, 0xa6, 0x00, 0xb9, 0x20, 0x7a, 0x40, 0x0f, - 0x90, 0x03, 0xe4, 0x00, 0xf9, 0x00, 0x3e, 0x40, - 0x0f, 0x90, 0x03, 0xa4, 0x00, 0xf9, 0x20, 0x3e, - 0x40, 0x0f, 0x90, 0x03, 0xca, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x28, 0x10, 0xa0, 0x00, 0xf8, - 0x00, 0x3e, 0x08, 0x0c, 0x80, 0x03, 0x60, 0x00, - 0xf8, 0x00, 0x1e, 0x00, 0x0f, 0x80, 0x03, 0x60, - 0x80, 0xd8, 0x04, 0x32, 0x30, 0x0c, 0x80, 0x03, - 0xa0, 0x00, 0xf8, 0x80, 0x3e, 0x10, 0x0d, 0x80, - 0x43, 0xe1, 0x00, 0xf8, 0x10, 0x3e, 0x00, 0x0c, - 0x00, 0x03, 0xe0, 0x00, 0xf8, 0x00, 0x3e, 0x00, - 0x0f, 0x80, 0x03, 0xe0, 0x00, 0xf8, 0x08, 0x3e, - 0x18, 0x0e, 0x80, 0x03, 0xca, 0x04, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x28, 0x05, 0x28, 0x00, 0xba, - 0x00, 0x2f, 0x80, 0x08, 0xa0, 0x12, 0xe8, 0x00, - 0xba, 0x00, 0x2e, 0x80, 0x0b, 0x20, 0x03, 0x3a, - 0x00, 0x8e, 0x50, 0x23, 0x80, 0x28, 0xa0, 0x02, - 0xf9, 0x28, 0xbe, 0xa0, 0x2e, 0x80, 0x0a, 0xa0, - 0x02, 0xe8, 0x00, 0xbe, 0xc1, 0x2e, 0x80, 0x0a, - 0xa0, 0x03, 0xa8, 0x00, 0xba, 0x00, 0x26, 0x80, - 0x0b, 0xa0, 0x42, 0xe8, 0x10, 0xbe, 0xc0, 0x2f, - 0xa2, 0x08, 0xa0, 0x02, 0xca, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x28, 0x05, 0x4c, 0x00, 0xb3, - 0x00, 0xed, 0x09, 0x00, 0x6b, 0x00, 0x2e, 0xc0, - 0x08, 0x30, 0x22, 0xcc, 0x00, 0xb3, 0x00, 0x28, - 0xc0, 0x0b, 0x30, 0x02, 0x0d, 0x00, 0x93, 0x00, - 0x24, 0x00, 0x08, 0x30, 0x06, 0x8b, 0x20, 0xb0, - 0x80, 0x2c, 0xc0, 0x08, 0x30, 0x02, 0xcc, 0x00, - 0xb3, 0x88, 0x2c, 0xc0, 0x89, 0x30, 0x02, 0x8c, - 0x00, 0xb3, 0x00, 0x2c, 0xc0, 0x0b, 0xb0, 0x02, - 0xcc, 0x00, 0xb3, 0xc0, 0x2c, 0xe0, 0x4b, 0x30, - 0x02, 0xca, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, - 0xa0, 0x01, 0x1c, 0x00, 0xb7, 0x00, 0x2f, 0xc2, - 0x28, 0x70, 0x02, 0xdc, 0x00, 0xb7, 0x00, 0x2d, - 0xc0, 0x09, 0x70, 0x02, 0x0d, 0x00, 0x87, 0x80, - 0x21, 0x00, 0x08, 0x70, 0x02, 0xd8, 0x00, 0xb4, - 0x00, 0x2d, 0xe9, 0x0a, 0x73, 0x02, 0xdc, 0x00, - 0xb7, 0x00, 0x2d, 0xc8, 0x0b, 0x70, 0x02, 0x9c, - 0x00, 0x97, 0x00, 0x05, 0xc0, 0x0b, 0x79, 0x02, - 0xdc, 0x00, 0xb7, 0x08, 0x2d, 0x61, 0x09, 0x70, - 0x02, 0xe8, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, - 0xa8, 0x08, 0x1e, 0x00, 0xf7, 0x80, 0x2d, 0xe1, - 0x0c, 0x78, 0x03, 0xde, 0x00, 0xf7, 0x80, 0x39, - 0xe0, 0x0f, 0x70, 0x03, 0x1e, 0x00, 0xd7, 0x80, - 0x34, 0xe0, 0x0c, 0x78, 0x03, 0x9a, 0x00, 0xf4, - 0x80, 0x2d, 0xec, 0x0c, 0x7a, 0x03, 0xde, 0x20, - 0xf7, 0x80, 0x3f, 0xec, 0x0d, 0x78, 0x03, 0x9e, - 0x00, 0xf7, 0x80, 0x3d, 0xe0, 0x0f, 0x72, 0x03, - 0xde, 0x00, 0xf7, 0x81, 0x2d, 0xa0, 0x4f, 0x78, - 0x03, 0xea, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x08, 0x1d, 0xac, 0x00, 0xfb, 0x00, 0x3c, 0xc0, - 0x0f, 0xb0, 0x03, 0xec, 0x00, 0x7b, 0x00, 0x3e, - 0xc0, 0x0f, 0x10, 0x03, 0xac, 0x00, 0xfb, 0x00, - 0x8b, 0xc0, 0x0f, 0xb0, 0x03, 0xe8, 0x00, 0xfc, - 0x00, 0x3e, 0xc0, 0x06, 0xb6, 0x03, 0xed, 0x08, - 0xfb, 0x00, 0x36, 0xc0, 0xed, 0x09, 0x00, 0x6c, - 0x00, 0x0e, 0xb0, 0x03, 0xac, 0x00, 0xfb, 0x00, - 0x3e, 0xc0, 0x0f, 0xb6, 0x03, 0x6c, 0x00, 0xf8, - 0x00, 0x3e, 0x00, 0x0e, 0xb0, 0x03, 0xc2, 0x06, - 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0xfe, - 0x00, 0xff, 0x80, 0x3d, 0xe0, 0x0c, 0xf8, 0x03, - 0xfe, 0x00, 0xff, 0x20, 0x3f, 0xe0, 0x0f, 0x72, - 0x03, 0x7e, 0x00, 0xdf, 0x80, 0x33, 0x20, 0x8c, - 0xf8, 0x03, 0x72, 0x00, 0xce, 0x80, 0xb3, 0xe2, - 0x0f, 0xfc, 0x03, 0x3e, 0x20, 0xaf, 0x90, 0x3b, - 0xe2, 0x0f, 0xf8, 0x03, 0xbe, 0x00, 0xff, 0x80, - 0x3f, 0xe0, 0x47, 0xfc, 0x03, 0x3e, 0x00, 0xfc, - 0x80, 0x73, 0xe4, 0x87, 0xf8, 0x03, 0xc0, 0x00, - 0x70, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x11, 0x9c, - 0x00, 0xb7, 0x00, 0x2d, 0xc4, 0x08, 0x70, 0x02, - 0xdc, 0x04, 0xb7, 0x10, 0x39, 0xc0, 0x0b, 0x71, - 0x07, 0x9c, 0x40, 0xbf, 0x00, 0x23, 0x00, 0x0a, - 0x70, 0x02, 0xd1, 0x00, 0xae, 0x00, 0x21, 0xc4, - 0x0b, 0x70, 0x02, 0x1c, 0x40, 0xe7, 0x04, 0x29, - 0xc0, 0x0b, 0x70, 0x03, 0xdc, 0x00, 0xb7, 0x00, - 0x2d, 0xc0, 0x0f, 0x70, 0x03, 0x5c, 0x00, 0xb5, - 0x00, 0x35, 0x8d, 0x09, 0x70, 0x02, 0xea, 0x04, - 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9c, - 0x00, 0xb7, 0x00, 0x2f, 0x40, 0x08, 0x70, 0x02, - 0xdc, 0x00, 0xb7, 0x00, 0x2d, 0xc0, 0x0b, 0x70, - 0x02, 0x18, 0x00, 0x97, 0x00, 0x21, 0x80, 0x09, - 0x70, 0x02, 0x50, 0x00, 0xa6, 0x00, 0x21, 0xc2, - 0x0b, 0xf0, 0x02, 0x1c, 0x00, 0xa3, 0x40, 0x25, - 0xc0, 0x0b, 0x70, 0x02, 0xdc, 0x00, 0xb7, 0x00, - 0x2d, 0xc0, 0x0b, 0x30, 0x02, 0x9c, 0x00, 0xb6, - 0x00, 0x21, 0x40, 0x8b, 0x70, 0x02, 0xc0, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x20, 0x14, 0xcc, - 0x00, 0xb3, 0x00, 0x2c, 0x48, 0xa8, 0x30, 0xed, - 0x09, 0x00, 0x6d, 0x00, 0x02, 0xcc, 0x00, 0xb3, - 0x00, 0x28, 0xc0, 0x0b, 0x10, 0x12, 0x88, 0x00, - 0xb3, 0x00, 0x20, 0xb6, 0x0b, 0x30, 0x02, 0xc0, - 0x00, 0xa2, 0x00, 0x22, 0xe0, 0x0b, 0xb0, 0x02, - 0x0e, 0x00, 0xa2, 0x80, 0x2c, 0xc0, 0x0b, 0x30, - 0x02, 0xcc, 0x00, 0xb3, 0x80, 0x2c, 0xc0, 0x0b, - 0x30, 0x02, 0xcc, 0x00, 0x30, 0x00, 0x24, 0x10, - 0x09, 0x30, 0x02, 0xc8, 0x04, 0x30, 0x00, 0x00, - 0x00, 0x00, 0xa8, 0x15, 0xac, 0x00, 0xfb, 0x00, - 0x1c, 0xb0, 0x04, 0xb0, 0x03, 0xec, 0x00, 0xfb, - 0x00, 0x3e, 0xc0, 0x0f, 0x30, 0x03, 0x0e, 0x20, - 0xdb, 0x03, 0x32, 0x00, 0x8d, 0xb0, 0x13, 0x4c, - 0x00, 0xe9, 0x00, 0x73, 0xe0, 0x0b, 0xf0, 0x43, - 0x1d, 0xc0, 0xeb, 0x40, 0x3f, 0xc0, 0x8f, 0xb0, - 0x07, 0xac, 0x00, 0xfb, 0x00, 0x2e, 0xc0, 0x0f, - 0xf0, 0x03, 0xac, 0x00, 0x7b, 0x00, 0xe2, 0xe6, - 0x0f, 0xb0, 0x03, 0xea, 0x04, 0x60, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x00, 0xec, 0x00, 0xfb, 0x00, - 0x3e, 0x70, 0x0f, 0xb0, 0x03, 0xec, 0x00, 0xfb, - 0x00, 0x3e, 0xc0, 0x0f, 0xb0, 0x03, 0xac, 0x00, - 0xfb, 0x02, 0x3f, 0x00, 0x0c, 0xb0, 0x03, 0xed, - 0x00, 0x3d, 0x00, 0x3e, 0xc0, 0x0f, 0xb0, 0x13, - 0xec, 0x00, 0xfb, 0x10, 0x3a, 0xc0, 0x0f, 0xb0, - 0x07, 0xac, 0x00, 0xfb, 0x10, 0x3e, 0xc0, 0x4e, - 0xb0, 0x02, 0x6c, 0x00, 0xfb, 0x00, 0x3a, 0x40, - 0x0f, 0xb0, 0x17, 0xe0, 0x00, 0x30, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x10, 0xfc, 0x00, 0xff, 0x00, - 0x3f, 0xc0, 0x0c, 0xf0, 0x03, 0xfc, 0x00, 0xff, - 0x00, 0x3f, 0xc0, 0x0f, 0xf0, 0x03, 0x7f, 0x00, - 0xcf, 0x00, 0x33, 0x40, 0x0c, 0xf0, 0x03, 0xba, - 0x00, 0xcd, 0x00, 0x37, 0xc0, 0x0c, 0xf0, 0x03, - 0x3c, 0x00, 0xdd, 0x00, 0x31, 0xc0, 0x0c, 0xf0, - 0x03, 0x7c, 0xed, 0x09, 0x00, 0x6e, 0x00, 0x18, - 0xff, 0x00, 0x3b, 0xc0, 0x0f, 0xf0, 0x03, 0xbc, - 0x10, 0xf7, 0x00, 0x39, 0x80, 0x0c, 0xf0, 0x03, - 0xc0, 0x44, 0x30, 0x00, 0x00, 0x00, 0x00, 0x81, - 0x04, 0x6c, 0x00, 0xbb, 0x00, 0x2e, 0x60, 0x28, - 0xb0, 0x02, 0xec, 0x00, 0xbb, 0x00, 0x2e, 0xc0, - 0x0b, 0x90, 0x02, 0x6c, 0x00, 0xdb, 0x00, 0x02, - 0x40, 0x08, 0xb0, 0x02, 0x69, 0x00, 0xa9, 0x00, - 0x2a, 0xc0, 0x0a, 0xb0, 0x00, 0x2c, 0x00, 0x83, - 0x80, 0x2a, 0xc0, 0x0a, 0xb0, 0x02, 0xec, 0x00, - 0x9b, 0x00, 0x2e, 0xc0, 0x0b, 0xb0, 0x02, 0xac, - 0x00, 0xb8, 0x00, 0x22, 0x00, 0x00, 0xb0, 0x02, - 0xe0, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x05, 0x2c, 0x00, 0xbb, 0x00, 0x2e, 0xe2, 0x08, - 0xb0, 0x02, 0xec, 0x00, 0xbb, 0x00, 0x2e, 0xc0, - 0x0b, 0xb0, 0x02, 0x6c, 0x00, 0x83, 0x10, 0x20, - 0x20, 0x08, 0xb0, 0x02, 0xe8, 0x40, 0x80, 0x80, - 0x2a, 0xc0, 0x1b, 0xb0, 0x42, 0x2c, 0x01, 0x9b, - 0x80, 0xe6, 0xc0, 0x08, 0xb0, 0x02, 0xac, 0x00, - 0xbb, 0x00, 0x2e, 0xc0, 0x1b, 0x30, 0x02, 0x2c, - 0x00, 0xb8, 0x00, 0x2a, 0xc0, 0x0a, 0xb0, 0x02, - 0xe0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x04, 0x0c, 0x00, 0xb3, 0x00, 0x2e, 0x00, 0x08, - 0x30, 0x02, 0xcc, 0x00, 0xb3, 0x00, 0x2c, 0xc0, - 0x0b, 0x30, 0x02, 0x4c, 0x00, 0x90, 0x80, 0x20, - 0x00, 0x18, 0x30, 0x02, 0xc8, 0x00, 0xa0, 0x00, - 0x28, 0xc0, 0x9a, 0x30, 0x02, 0x2c, 0x01, 0x83, - 0x00, 0x2c, 0xc0, 0x0a, 0x30, 0x02, 0xcc, 0x00, - 0x93, 0x00, 0x2c, 0xc0, 0x1b, 0x30, 0x02, 0x8c, - 0x00, 0xb1, 0x00, 0x20, 0x80, 0x08, 0x30, 0x12, - 0xc2, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0d, 0x6c, 0x00, 0xfb, 0x00, 0x3e, 0x40, 0x08, - 0xb0, 0x03, 0xec, 0x00, 0xfb, 0xed, 0x09, 0x00, - 0x6f, 0x00, 0x00, 0x3e, 0xc0, 0x0f, 0xb0, 0x03, - 0x68, 0x00, 0xcb, 0x00, 0x32, 0x00, 0x0c, 0xb0, - 0x03, 0xa8, 0x00, 0xc8, 0x00, 0x37, 0xc0, 0x07, - 0xf0, 0x0b, 0x3c, 0x00, 0xdb, 0x00, 0x37, 0xc0, - 0x0c, 0xb0, 0x03, 0x6c, 0x00, 0xfb, 0x00, 0x3e, - 0xc0, 0x0f, 0xf0, 0x03, 0x2c, 0x00, 0xf2, 0x00, - 0x3a, 0x40, 0x2c, 0xb0, 0x03, 0xc0, 0x03, 0x50, - 0x00, 0x00, 0x00, 0x00, 0xa0, 0x1d, 0xfc, 0x00, - 0xff, 0x00, 0x3f, 0x40, 0x0f, 0xf0, 0x03, 0xfc, - 0x00, 0x7f, 0x00, 0x3f, 0xc0, 0x0f, 0xd0, 0x06, - 0xb0, 0x00, 0xff, 0x00, 0x1f, 0x00, 0x0f, 0xf0, - 0x03, 0x58, 0x04, 0xfc, 0x00, 0x37, 0xc0, 0x0f, - 0x70, 0x03, 0xfc, 0x00, 0xfe, 0x00, 0x3b, 0xc0, - 0x0f, 0xf0, 0x03, 0xfc, 0x00, 0xff, 0x00, 0x3f, - 0xc0, 0x0f, 0xf0, 0x03, 0xfc, 0x00, 0xfc, 0x00, - 0x3f, 0x00, 0x0f, 0xf0, 0x23, 0xe8, 0x06, 0x70, - 0x00, 0x00, 0x00, 0x00, 0xc0, 0x05, 0xf8, 0x40, - 0xfc, 0x00, 0x3f, 0x00, 0x2c, 0xc0, 0x0b, 0x30, - 0x00, 0xc4, 0x00, 0x33, 0x00, 0x0f, 0xc0, 0x03, - 0x30, 0x00, 0xfc, 0x10, 0x33, 0x00, 0x6c, 0xc4, - 0x03, 0x30, 0x00, 0xfc, 0x01, 0x3f, 0x00, 0x0f, - 0xc0, 0x03, 0x70, 0x80, 0x7f, 0x00, 0x33, 0x00, - 0x0f, 0xf0, 0x53, 0xfc, 0x80, 0xcc, 0x01, 0x23, - 0xc4, 0x0e, 0xf2, 0x83, 0x70, 0x08, 0xcf, 0x20, - 0x37, 0x40, 0x0c, 0xd0, 0x03, 0xf0, 0x00, 0x70, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x10, 0xec, 0x80, - 0xb8, 0x00, 0x2e, 0x00, 0x08, 0x80, 0x02, 0x20, - 0x00, 0x88, 0x00, 0x22, 0x00, 0x0b, 0x80, 0x02, - 0x28, 0x00, 0xb8, 0x02, 0x22, 0x00, 0x08, 0x82, - 0x02, 0x20, 0x20, 0xb8, 0x02, 0x2c, 0x00, 0x4e, - 0xa2, 0x82, 0xe1, 0x00, 0xbb, 0x04, 0x3e, 0x12, - 0x0b, 0xb4, 0x02, 0xdd, 0xa2, 0x88, 0x00, 0x2a, - 0xed, 0x09, 0x00, 0x70, 0x00, 0xc8, 0x0b, 0xb4, - 0x80, 0x24, 0x00, 0xdf, 0x01, 0x22, 0x44, 0x0a, - 0x91, 0x02, 0xe0, 0x04, 0x30, 0x00, 0x00, 0x00, - 0x00, 0x88, 0x05, 0xc8, 0x00, 0xb0, 0x00, 0x2c, - 0x00, 0x08, 0x00, 0x02, 0x20, 0x00, 0xa8, 0x80, - 0x28, 0x40, 0x0b, 0x80, 0x12, 0x04, 0x10, 0xb8, - 0x80, 0x20, 0x00, 0x09, 0x90, 0x02, 0x40, 0x80, - 0xb0, 0x03, 0x24, 0x80, 0x0b, 0x10, 0x02, 0xc0, - 0x40, 0xb3, 0x00, 0xa8, 0x0d, 0x0a, 0x31, 0x02, - 0xcd, 0x00, 0x90, 0x00, 0x20, 0xc8, 0x0a, 0x32, - 0x02, 0xe2, 0x00, 0xa3, 0x12, 0x28, 0x40, 0x08, - 0x00, 0x02, 0xe2, 0x11, 0x50, 0x00, 0x00, 0x00, - 0x00, 0xc0, 0x15, 0xac, 0x00, 0xb8, 0x00, 0x2c, - 0x00, 0x08, 0x00, 0x02, 0x22, 0x00, 0xa8, 0x00, - 0x2a, 0x40, 0x0b, 0x88, 0x22, 0x2c, 0x08, 0x98, - 0x00, 0x20, 0x00, 0x09, 0x90, 0x02, 0xa0, 0x00, - 0xb8, 0x00, 0x2e, 0x80, 0x02, 0xb0, 0x02, 0xe3, - 0x01, 0xbb, 0x00, 0x2e, 0x60, 0x0b, 0xb0, 0x02, - 0xec, 0x01, 0x9b, 0x00, 0x22, 0xc0, 0x0b, 0xb0, - 0x02, 0xee, 0x00, 0xbb, 0x00, 0x2a, 0x60, 0x0a, - 0x98, 0x02, 0xf0, 0x04, 0x60, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x14, 0xa8, 0x00, 0xfa, 0x20, 0x3e, - 0x08, 0x0c, 0x84, 0x03, 0x04, 0x00, 0xea, 0x00, - 0x3a, 0x80, 0x0f, 0x10, 0x03, 0x20, 0x00, 0xf2, - 0x00, 0x32, 0x40, 0x49, 0x80, 0x0b, 0x66, 0x50, - 0xfa, 0x42, 0x36, 0x08, 0x0f, 0x80, 0x03, 0x63, - 0x00, 0xfa, 0x02, 0x3a, 0x20, 0x47, 0xb0, 0x03, - 0xec, 0x00, 0xd0, 0xa0, 0x32, 0xc0, 0x0e, 0xb0, - 0x03, 0xc0, 0x00, 0x6b, 0x00, 0x3a, 0x38, 0x0c, - 0x8a, 0x03, 0xd0, 0x04, 0x70, 0x00, 0x00, 0x00, - 0x00, 0xe1, 0x00, 0xbc, 0x00, 0xfe, 0x08, 0x3f, - 0x06, 0x0f, 0xc1, 0x03, 0xf4, 0x00, 0xde, 0x00, - 0x37, 0x80, 0x1f, 0xed, 0x09, 0x00, 0x71, 0x00, - 0xd0, 0x03, 0xf8, 0x00, 0xfe, 0x02, 0x1f, 0x44, - 0x0e, 0xc9, 0x03, 0x74, 0x01, 0xfe, 0x02, 0x37, - 0x00, 0x08, 0xe0, 0x83, 0xf0, 0x00, 0xff, 0x20, - 0x3f, 0x00, 0x0f, 0xb0, 0x01, 0xfc, 0x00, 0x6c, - 0xc8, 0x3f, 0xc0, 0x0d, 0x70, 0x03, 0x34, 0x00, - 0xd7, 0x00, 0x35, 0xc0, 0x0f, 0xc0, 0x03, 0xf8, - 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x40, 0x10, - 0xa8, 0x00, 0xfa, 0x80, 0x3e, 0x20, 0x0f, 0x8c, - 0x0b, 0x26, 0x00, 0xca, 0x80, 0x32, 0xe0, 0x1f, - 0x9a, 0x03, 0x24, 0x03, 0xea, 0x04, 0x2a, 0x60, - 0x0f, 0x90, 0x03, 0xe4, 0x40, 0xfa, 0xc0, 0xb2, - 0xa0, 0x0c, 0x90, 0x01, 0x21, 0x00, 0xda, 0x22, - 0x3e, 0x01, 0x8f, 0xb0, 0x03, 0x0c, 0x10, 0xcb, - 0x56, 0x3e, 0xc0, 0x0c, 0xba, 0x03, 0xe8, 0x00, - 0xfb, 0x80, 0x32, 0x10, 0x0f, 0xa6, 0x03, 0xd0, - 0x04, 0x20, 0x00, 0x00, 0x00, 0x00, 0xca, 0x04, - 0x2c, 0x00, 0x8a, 0xc0, 0x2e, 0x30, 0x0b, 0x8c, - 0x12, 0x24, 0x00, 0x82, 0x00, 0x22, 0xe0, 0x0b, - 0x94, 0x02, 0x2c, 0x20, 0x8a, 0x01, 0x22, 0x74, - 0x0b, 0x15, 0x22, 0xe6, 0x00, 0xba, 0xd4, 0x22, - 0xb4, 0x0d, 0xb0, 0x02, 0x20, 0x40, 0xb3, 0x40, - 0x2e, 0x64, 0x0b, 0xf4, 0x48, 0xbc, 0x00, 0x8b, - 0x00, 0x2f, 0xc1, 0x0a, 0xf4, 0x02, 0xee, 0x88, - 0x9f, 0x50, 0x2a, 0xc0, 0x0b, 0xa4, 0x02, 0xf2, - 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x05, - 0x48, 0x00, 0xb1, 0x43, 0x2c, 0xd0, 0x0b, 0x30, - 0x86, 0x08, 0x00, 0x81, 0x04, 0x00, 0x08, 0x0a, - 0x24, 0x02, 0x00, 0x00, 0x81, 0x00, 0x60, 0x90, - 0x09, 0x20, 0x02, 0x0a, 0x00, 0x21, 0x00, 0x20, - 0x50, 0x0a, 0x00, 0x06, 0x01, 0x40, 0x91, 0xc0, - 0x2c, 0x10, 0x09, 0x36, 0x02, 0x0c, 0x00, 0xb0, - 0x80, 0x24, 0xc0, 0x08, 0x30, 0x40, 0xed, 0x09, - 0x00, 0x72, 0x00, 0xc4, 0x10, 0x33, 0x40, 0x28, - 0x00, 0x8b, 0x14, 0x02, 0xf8, 0x00, 0x50, 0x00, - 0x00, 0x00, 0x00, 0x62, 0x01, 0x1e, 0x02, 0x85, - 0x80, 0x2d, 0xe0, 0x0b, 0x78, 0x06, 0x3a, 0x00, - 0x8d, 0x80, 0x21, 0x20, 0x0b, 0xe8, 0x02, 0x1a, - 0x00, 0xad, 0x92, 0x61, 0xa0, 0x0b, 0x68, 0x22, - 0xdb, 0x00, 0xb5, 0x90, 0x21, 0x60, 0x0b, 0x68, - 0x02, 0x12, 0x10, 0xb7, 0x88, 0x2d, 0x20, 0x09, - 0x79, 0x22, 0x9e, 0x00, 0x97, 0x90, 0x2d, 0xe0, - 0x0a, 0x79, 0x02, 0xde, 0x00, 0x93, 0x90, 0x29, - 0x20, 0x0b, 0x78, 0x02, 0xc8, 0x00, 0x40, 0x00, - 0x00, 0x00, 0x00, 0x48, 0x48, 0x28, 0x10, 0xf1, - 0x02, 0x7c, 0xc0, 0x0f, 0xb4, 0x03, 0x08, 0x00, - 0xc1, 0x00, 0x30, 0x40, 0x0f, 0x21, 0x03, 0x04, - 0x40, 0xa1, 0x00, 0x38, 0x88, 0x0f, 0x32, 0x03, - 0x08, 0x40, 0xf9, 0x44, 0x30, 0xc8, 0x0e, 0x90, - 0x23, 0x00, 0x00, 0xd3, 0x02, 0x3c, 0x0a, 0x0f, - 0x30, 0x03, 0x0c, 0x00, 0xf0, 0x10, 0x3e, 0xc0, - 0x0c, 0x31, 0x03, 0xc4, 0x00, 0xf3, 0x00, 0x30, - 0xc0, 0xcf, 0x00, 0x03, 0xd2, 0x02, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x1d, 0xbc, 0x00, 0xfd, - 0x00, 0x3f, 0xc0, 0x0f, 0xf0, 0x03, 0xd8, 0x00, - 0xfd, 0x00, 0x1f, 0x40, 0x0f, 0x60, 0x03, 0xdc, - 0x00, 0xd5, 0x00, 0x3f, 0x80, 0x4b, 0xf0, 0x03, - 0xf8, 0x40, 0xfd, 0x00, 0x3f, 0xc0, 0x05, 0xf1, - 0x03, 0xfc, 0x40, 0xff, 0x00, 0x3f, 0x40, 0x0f, - 0xf0, 0x81, 0x7c, 0x02, 0xef, 0x10, 0x3f, 0xc0, - 0x0e, 0xf1, 0x03, 0xfc, 0x40, 0xff, 0x00, 0x37, - 0xc0, 0x0f, 0xf0, 0x03, 0xd0, 0x06, 0x60, 0x00, - 0x00, 0x00, 0x00, 0xa8, 0x05, 0xe8, 0x00, 0xfb, - 0x00, 0x3e, 0xc0, 0x0f, 0xb0, 0x03, 0xec, 0x00, - 0xfb, 0x00, 0x3e, 0x80, 0x0f, 0xb0, 0x03, 0x60, - 0x00, 0xed, 0x09, 0x00, 0x73, 0x00, 0xbb, 0x00, - 0x3a, 0xc0, 0x0f, 0xa8, 0x02, 0x2c, 0x00, 0xfb, - 0x00, 0x3a, 0x40, 0x0c, 0x80, 0x03, 0xe2, 0x00, - 0xca, 0x00, 0x36, 0x00, 0x0c, 0xb8, 0x03, 0xac, - 0x84, 0xf3, 0x80, 0xb2, 0xe0, 0x0d, 0xb8, 0x03, - 0x2c, 0x00, 0xfb, 0x00, 0x32, 0x00, 0x1f, 0x90, - 0x03, 0xea, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x48, 0x11, 0x9c, 0x00, 0xb7, 0x00, 0x2d, 0xc0, - 0x0b, 0x70, 0x12, 0xdc, 0x00, 0xb7, 0x00, 0x2d, - 0x80, 0x0b, 0x70, 0x00, 0xd8, 0x00, 0x3f, 0x00, - 0x29, 0xc0, 0x0b, 0x60, 0x42, 0x1c, 0x00, 0xb7, - 0x00, 0x2b, 0x40, 0x4a, 0x60, 0x12, 0x54, 0x00, - 0xa7, 0x00, 0x21, 0x00, 0x08, 0x70, 0x02, 0x1c, - 0x40, 0x97, 0x00, 0x23, 0xd0, 0x0b, 0xf6, 0x02, - 0x1c, 0x00, 0xb7, 0x10, 0x35, 0x80, 0x0e, 0x50, - 0x02, 0xd2, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, - 0xc1, 0x00, 0x9a, 0x00, 0xb7, 0x80, 0x2d, 0xe0, - 0x0b, 0x78, 0x00, 0xde, 0x00, 0xb7, 0x80, 0x2d, - 0xe0, 0x0b, 0x78, 0x02, 0xd6, 0x00, 0xa7, 0x81, - 0x29, 0xe0, 0x8b, 0xf8, 0x06, 0x9e, 0x08, 0xb7, - 0x84, 0x21, 0xe0, 0x08, 0x58, 0x02, 0x42, 0x00, - 0x86, 0x80, 0x24, 0x20, 0x08, 0x38, 0x02, 0x5e, - 0x40, 0xa7, 0x80, 0x29, 0xe1, 0x1a, 0x7a, 0x02, - 0x1e, 0x00, 0xb3, 0xb0, 0x21, 0x60, 0x0b, 0x78, - 0x02, 0xf0, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, - 0x48, 0x14, 0xcc, 0x00, 0xb3, 0x80, 0x2c, 0xc0, - 0x0b, 0x30, 0x02, 0xcc, 0x00, 0xb3, 0x00, 0x2c, - 0xe0, 0x0b, 0x30, 0x02, 0xcc, 0x00, 0xb3, 0x00, - 0x22, 0xd8, 0x0b, 0x30, 0x02, 0x8d, 0x20, 0xb3, - 0x80, 0x28, 0xc0, 0x0a, 0x30, 0x46, 0xcc, 0x80, - 0xa3, 0x80, 0x26, 0xe4, 0x08, 0x30, 0x0a, 0x4c, - 0x00, 0xb3, 0x80, 0x28, 0xc0, 0x0a, 0x30, 0x0a, - 0x0e, 0x10, 0xb3, 0x00, 0xed, 0x09, 0x00, 0x74, - 0x00, 0x24, 0xe6, 0x02, 0x3d, 0x02, 0xd2, 0x04, - 0x30, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x15, 0xa8, - 0x00, 0xfa, 0xa0, 0x3e, 0x80, 0x0b, 0xa0, 0x03, - 0xe8, 0x10, 0xf2, 0x00, 0x3e, 0xa8, 0x4f, 0xa0, - 0x03, 0x68, 0x00, 0xea, 0x00, 0x3a, 0x90, 0x0f, - 0xa0, 0x0b, 0xa9, 0x00, 0xfa, 0xa2, 0x3a, 0x80, - 0x0c, 0xa0, 0x07, 0xf9, 0x00, 0xce, 0xe4, 0x37, - 0xa0, 0x2c, 0xa0, 0x03, 0xe8, 0x00, 0xee, 0x24, - 0x3a, 0x80, 0x8f, 0xa0, 0x07, 0x38, 0x00, 0xfa, - 0x00, 0x03, 0x90, 0x0f, 0xe0, 0x13, 0xfa, 0x04, - 0x60, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0xe0, - 0x00, 0xf8, 0x02, 0x3e, 0x00, 0x0f, 0x80, 0x03, - 0xe2, 0x00, 0xf8, 0x00, 0x3e, 0x00, 0x0f, 0x88, - 0x03, 0x60, 0x00, 0xf8, 0x00, 0x3e, 0x00, 0x8f, - 0x80, 0x01, 0x61, 0x00, 0xf8, 0x00, 0x3e, 0x00, - 0x0f, 0x84, 0x03, 0x60, 0x04, 0xf8, 0x82, 0x3a, - 0x10, 0x0f, 0x80, 0x03, 0xa0, 0x00, 0xd8, 0x20, - 0x36, 0x00, 0x0b, 0x80, 0x07, 0xe0, 0x40, 0xf8, - 0x40, 0x3e, 0x00, 0x0f, 0x82, 0x03, 0xd2, 0x00, - 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0xe4, - 0x00, 0xf9, 0x10, 0x32, 0x68, 0x0f, 0x98, 0x03, - 0xe4, 0x00, 0xf9, 0x00, 0x32, 0x64, 0x0c, 0x90, - 0x03, 0xe4, 0x00, 0xf9, 0x00, 0x36, 0x40, 0x4c, - 0x94, 0x03, 0xe5, 0x10, 0xc9, 0x40, 0x32, 0x71, - 0x4c, 0x90, 0x03, 0xe7, 0x00, 0xd9, 0x00, 0x3e, - 0x70, 0x0c, 0x98, 0x03, 0xe4, 0x00, 0xf9, 0x42, - 0x3e, 0x40, 0x05, 0x9a, 0x03, 0xe4, 0x00, 0xf9, - 0x40, 0x32, 0x40, 0x0f, 0x92, 0x03, 0xc2, 0x04, - 0x30, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0xe4, - 0x00, 0xb9, 0xc2, 0x22, 0x70, 0x09, 0x94, 0x02, - 0xe4, 0x00, 0xb9, 0x00, 0x22, 0x50, 0x88, 0x94, - 0x02, 0xe6, 0x00, 0xb9, 0x00, 0x02, 0x50, 0xed, - 0x09, 0x00, 0x75, 0x00, 0x08, 0x98, 0x62, 0xc4, - 0x00, 0x89, 0x44, 0x22, 0x70, 0x08, 0x94, 0x02, - 0xe4, 0x05, 0xb1, 0x80, 0x2a, 0x48, 0x08, 0x9c, - 0x02, 0xe4, 0x00, 0xe9, 0x00, 0x2e, 0x40, 0x0f, - 0x94, 0x02, 0xe4, 0x04, 0xb1, 0x20, 0x36, 0x40, - 0x0b, 0x90, 0x82, 0xe0, 0x00, 0x10, 0x00, 0x00, - 0x00, 0x00, 0x18, 0x04, 0x24, 0x00, 0xb5, 0x00, - 0x23, 0x41, 0x0b, 0xd1, 0x02, 0xf6, 0x00, 0x9d, - 0x80, 0xa1, 0x40, 0x08, 0xd8, 0x80, 0x74, 0x80, - 0xb5, 0x00, 0x27, 0x44, 0x08, 0xd0, 0x02, 0xf5, - 0x00, 0xa5, 0x00, 0x21, 0x40, 0x08, 0xd2, 0x02, - 0xe4, 0x24, 0xb9, 0x10, 0x6e, 0x40, 0x02, 0x92, - 0x82, 0xe4, 0x10, 0x39, 0x00, 0x2e, 0x40, 0x0b, - 0x90, 0x02, 0xa4, 0x00, 0xb9, 0x00, 0x22, 0x40, - 0x0b, 0x90, 0x22, 0xc6, 0x00, 0x40, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x04, 0x04, 0x00, 0xb5, 0x80, - 0x21, 0x60, 0x09, 0x58, 0x42, 0xd4, 0x00, 0xb5, - 0x00, 0x21, 0x60, 0x08, 0x50, 0x22, 0x54, 0x00, - 0xb5, 0x40, 0x21, 0x61, 0x08, 0x54, 0x02, 0xf5, - 0x00, 0xa5, 0x80, 0x21, 0x60, 0x2a, 0x54, 0x00, - 0xc4, 0x00, 0xb9, 0x00, 0x28, 0x51, 0x2a, 0x10, - 0x00, 0xc5, 0xa0, 0xb1, 0x01, 0x0c, 0x5a, 0x1b, - 0x14, 0x02, 0xc4, 0x04, 0xb1, 0x00, 0x24, 0x40, - 0x9b, 0x10, 0x02, 0xc2, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xb8, 0x08, 0x20, 0x00, 0xf8, 0x00, - 0xb2, 0x00, 0x0f, 0x80, 0x03, 0xe0, 0x00, 0xd8, - 0x00, 0x32, 0x00, 0x2c, 0x80, 0x43, 0xe0, 0x00, - 0xf8, 0x00, 0x36, 0x00, 0x2c, 0x80, 0x03, 0xe0, - 0x02, 0xe0, 0x00, 0xb2, 0x00, 0x08, 0xe0, 0x03, - 0xe0, 0x00, 0xba, 0x00, 0x3e, 0x01, 0x0e, 0x80, - 0x02, 0xe0, 0x80, 0xfa, 0x00, 0x3e, 0x08, 0xcd, - 0xa0, 0x03, 0xe0, 0x00, 0xf8, 0x02, 0x32, 0x00, - 0x0f, 0x80, 0xed, 0x09, 0x00, 0x76, 0x00, 0x03, - 0xee, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00, 0x98, - 0x1d, 0xe4, 0xb0, 0xf9, 0x28, 0x3e, 0x4a, 0x0f, - 0x92, 0x83, 0xe4, 0x00, 0xf9, 0x00, 0x3e, 0x4a, - 0x0f, 0x90, 0x03, 0xe4, 0x00, 0xf9, 0x02, 0x3e, - 0x4a, 0x0f, 0x10, 0x03, 0xe4, 0x00, 0x59, 0x2a, - 0x2e, 0x4b, 0x0d, 0x90, 0x13, 0x75, 0x00, 0xf5, - 0x02, 0x3f, 0x50, 0x0d, 0x94, 0x03, 0xe4, 0x00, - 0xef, 0x00, 0x3e, 0x40, 0x4c, 0x94, 0x23, 0xf4, - 0x00, 0xf9, 0x40, 0x3f, 0x50, 0x0f, 0xf4, 0x03, - 0xe6, 0x06, 0x70, 0x00, 0x00, 0x00, 0x00, 0x98, - 0x51, 0xe4, 0x04, 0xfd, 0x14, 0x33, 0x40, 0x0c, - 0xd0, 0x03, 0xf4, 0x00, 0xff, 0x00, 0x3f, 0x40, - 0x0f, 0xd0, 0x03, 0xf4, 0x00, 0xfb, 0x00, 0x3f, - 0x44, 0x1c, 0xd0, 0x03, 0xf4, 0x00, 0x6d, 0x12, - 0x2f, 0x40, 0x0c, 0xd0, 0x11, 0xb4, 0x81, 0xed, - 0x06, 0x3f, 0x4a, 0x09, 0xd0, 0x83, 0xa4, 0x00, - 0xcd, 0x00, 0x3e, 0x50, 0x0f, 0xd6, 0x43, 0xf4, - 0x00, 0xfd, 0x00, 0x32, 0x40, 0x0f, 0xd2, 0x03, - 0xc6, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x39, - 0x10, 0xe0, 0x20, 0xb8, 0x00, 0x22, 0x0a, 0x08, - 0x82, 0x02, 0xe0, 0x00, 0xb8, 0x00, 0x3e, 0x82, - 0x0b, 0x80, 0x02, 0xe0, 0x00, 0xb8, 0x20, 0x2e, - 0x08, 0x0a, 0x80, 0x80, 0xe0, 0x20, 0x88, 0x00, - 0x2e, 0x0b, 0x08, 0x82, 0x0a, 0x28, 0x40, 0xb8, - 0x01, 0x2e, 0x08, 0x0b, 0x84, 0x02, 0xa1, 0x02, - 0x88, 0x00, 0x2e, 0x04, 0x0b, 0x84, 0x02, 0xe0, - 0x08, 0xb8, 0x40, 0x22, 0x94, 0x0b, 0x85, 0x02, - 0x4e, 0x04, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x05, 0xc4, 0x00, 0xa1, 0x00, 0x20, 0x48, 0x08, - 0x12, 0x82, 0xcc, 0x08, 0xb1, 0x00, 0x2c, 0x40, - 0x0b, 0x10, 0x02, 0xc6, 0x00, 0xb1, 0x08, 0x24, - 0x48, 0x08, 0x12, 0x02, 0xc4, 0xed, 0x09, 0x00, - 0x77, 0x00, 0x00, 0xa1, 0x00, 0x2c, 0x49, 0x88, - 0xb2, 0x82, 0x04, 0x00, 0x91, 0x00, 0x2c, 0x4a, - 0x09, 0x10, 0x12, 0x04, 0xf0, 0x03, 0x00, 0x2c, - 0x40, 0x4b, 0x11, 0x22, 0xc4, 0x00, 0xb1, 0x44, - 0x20, 0x40, 0x0b, 0x10, 0x02, 0xc2, 0x01, 0x70, - 0x00, 0x00, 0x00, 0x00, 0x18, 0x05, 0xa4, 0x00, - 0xb9, 0x05, 0x22, 0x40, 0x08, 0x90, 0x02, 0xe4, - 0x00, 0xb9, 0x00, 0x2e, 0x41, 0x4b, 0x90, 0x42, - 0xe4, 0x00, 0xb9, 0x00, 0x2e, 0xc0, 0xca, 0x94, - 0x22, 0xcc, 0x00, 0x29, 0x00, 0x2e, 0x48, 0x48, - 0x94, 0x00, 0xa4, 0x80, 0xb9, 0x10, 0x6e, 0x48, - 0x8b, 0x90, 0x02, 0xa4, 0x00, 0x89, 0x10, 0x2e, - 0x40, 0x8b, 0xb0, 0x02, 0xe4, 0x40, 0xbb, 0x00, - 0x22, 0x40, 0x0b, 0x98, 0x12, 0x46, 0x04, 0x60, - 0x00, 0x00, 0x00, 0x00, 0xa0, 0x04, 0xa4, 0x00, - 0xf9, 0x00, 0xb2, 0x40, 0x2c, 0x90, 0x03, 0xe4, - 0x00, 0xf9, 0x00, 0x3e, 0x51, 0x0f, 0x90, 0x43, - 0xe4, 0x00, 0xf9, 0x00, 0x36, 0x40, 0x08, 0x90, - 0x02, 0xe4, 0x00, 0xe9, 0x00, 0x3e, 0x40, 0x2c, - 0x14, 0x03, 0xa7, 0x00, 0xd9, 0x80, 0x3e, 0x69, - 0x05, 0x10, 0x03, 0x24, 0x00, 0xc9, 0x80, 0x3e, - 0x40, 0x0f, 0x90, 0x03, 0xe4, 0x00, 0xf9, 0x00, - 0xb2, 0x40, 0x0f, 0x90, 0x03, 0xe8, 0x04, 0x70, - 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0xa4, 0x00, - 0xf9, 0x00, 0x3e, 0x42, 0x0f, 0x90, 0x03, 0xe4, - 0x00, 0xf9, 0x00, 0x3a, 0x40, 0x0f, 0x90, 0x03, - 0xe4, 0x00, 0xf9, 0x00, 0x3e, 0x42, 0x4f, 0x90, - 0x03, 0xe4, 0x00, 0xd9, 0x00, 0x3e, 0x41, 0x0f, - 0x90, 0xc2, 0x66, 0x00, 0xf9, 0x88, 0x26, 0x60, - 0x0f, 0x90, 0x03, 0xc4, 0x00, 0xb9, 0x00, 0x3e, - 0x41, 0x0f, 0x90, 0x83, 0xe4, 0x00, 0xf9, 0x00, - 0x3e, 0x64, 0x0d, 0x90, 0x03, 0x4a, 0x00, 0x60, - 0xed, 0x09, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x2a, 0x00, 0xa0, 0x00, 0xd8, 0x04, 0x3e, - 0x00, 0x0f, 0x81, 0x03, 0xe0, 0x00, 0xf8, 0x00, - 0x3a, 0x10, 0x2c, 0x88, 0x33, 0xe0, 0x04, 0xf8, - 0x01, 0x3e, 0x00, 0x0f, 0x81, 0x03, 0xe0, 0x82, - 0xc8, 0x14, 0x3e, 0x00, 0x0e, 0x80, 0x23, 0xe3, - 0x00, 0xf8, 0x00, 0x3a, 0x04, 0x0d, 0x89, 0x13, - 0xe0, 0x00, 0xd8, 0x20, 0x36, 0x01, 0x02, 0x80, - 0x63, 0xe0, 0x00, 0xa8, 0x04, 0xb2, 0x00, 0x0f, - 0x81, 0x0b, 0x0a, 0x04, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x20, 0x14, 0x28, 0x00, 0x8e, 0xe0, 0x2f, - 0x90, 0x0b, 0xed, 0x22, 0xe8, 0x00, 0xba, 0x00, - 0x3f, 0xb6, 0x08, 0xe4, 0x02, 0x6a, 0x80, 0xba, - 0x00, 0x2f, 0x90, 0x0b, 0xe8, 0x22, 0xf9, 0x00, - 0x8e, 0x54, 0x3f, 0x82, 0x0b, 0xe0, 0x00, 0xf8, - 0x20, 0xbe, 0x88, 0x23, 0x80, 0x4b, 0xe4, 0x02, - 0xe8, 0x00, 0x8e, 0x40, 0x3a, 0x80, 0x0b, 0xec, - 0x02, 0xe8, 0x08, 0xa6, 0x50, 0x22, 0x80, 0x0b, - 0xe0, 0x02, 0x0a, 0x00, 0x40, 0x00, 0x00, 0x00, - 0x00, 0x28, 0x85, 0x4c, 0x00, 0x9b, 0x20, 0x2e, - 0xe0, 0x0b, 0x34, 0x02, 0xc4, 0x00, 0xb1, 0x00, - 0x2c, 0xf0, 0x08, 0x10, 0x02, 0xc6, 0x00, 0xb3, - 0x01, 0x0e, 0xc0, 0x5b, 0x3e, 0x22, 0x8f, 0x40, - 0x83, 0xc0, 0x2e, 0xd8, 0x0a, 0x30, 0x02, 0xce, - 0x00, 0xb3, 0xc0, 0x2c, 0xc0, 0x19, 0x30, 0x02, - 0xcc, 0x00, 0x83, 0x01, 0x2c, 0xc0, 0x0a, 0x34, - 0x02, 0xcc, 0x00, 0x83, 0x10, 0x20, 0xc0, 0x0b, - 0x30, 0x82, 0x0a, 0x00, 0x50, 0x00, 0x00, 0x00, - 0x00, 0x21, 0x01, 0x3e, 0x80, 0x87, 0x00, 0x2d, - 0xc2, 0x0b, 0x70, 0x06, 0xdc, 0x00, 0xb7, 0x40, - 0x2d, 0xe0, 0x08, 0x70, 0x82, 0x5c, 0x00, 0xb7, - 0x20, 0x2d, 0xd0, 0x4b, 0x70, 0x02, 0xfc, 0x04, - 0xa7, 0x00, 0x2d, 0xed, 0x09, 0x00, 0x79, 0x00, - 0xc0, 0x0b, 0x60, 0x02, 0xdc, 0x00, 0xbf, 0x86, - 0x25, 0x00, 0x0b, 0x70, 0x02, 0xdc, 0x06, 0x97, - 0x00, 0x29, 0xc4, 0x03, 0x40, 0xc2, 0xde, 0x00, - 0xa3, 0x00, 0x61, 0xc0, 0x0b, 0x38, 0x02, 0x28, - 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x28, 0x48, - 0x1e, 0x80, 0xd7, 0x80, 0x3d, 0xe0, 0x0f, 0x78, - 0x03, 0xde, 0x00, 0xf7, 0x80, 0x3b, 0xe1, 0x1c, - 0x78, 0x02, 0xde, 0x00, 0xf7, 0xc0, 0x3d, 0xe0, - 0x0f, 0x78, 0x03, 0xde, 0x00, 0xc7, 0x80, 0x3d, - 0xe0, 0x0e, 0x58, 0x02, 0xde, 0x00, 0xf7, 0x80, - 0x3d, 0x20, 0x8d, 0x78, 0x03, 0xff, 0x82, 0xd7, - 0x82, 0x3d, 0xe0, 0x4e, 0x78, 0x23, 0xde, 0x00, - 0x47, 0x80, 0x31, 0xe0, 0x0f, 0x78, 0x13, 0x2a, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0d, - 0x8c, 0x40, 0xfa, 0x00, 0x3e, 0x80, 0x0f, 0xb0, - 0x03, 0xec, 0x10, 0xfb, 0x00, 0x3a, 0xc0, 0x0f, - 0xb0, 0x03, 0x6c, 0x00, 0xfb, 0x48, 0x3e, 0x00, - 0x0f, 0xb0, 0x03, 0xc4, 0x00, 0xd9, 0x04, 0x3a, - 0x80, 0x0f, 0x80, 0x03, 0xec, 0x00, 0x73, 0x00, - 0x3a, 0x00, 0x0f, 0xb0, 0x03, 0xed, 0xa0, 0xe9, - 0x00, 0x3e, 0xc0, 0x0f, 0x80, 0x03, 0xcc, 0x00, - 0x7b, 0x00, 0x3e, 0xc0, 0x0f, 0xb0, 0x03, 0xc2, - 0x12, 0x60, 0x00, 0x00, 0x00, 0x00, 0x40, 0x15, - 0xfe, 0x00, 0xff, 0x80, 0x33, 0xe0, 0x0c, 0xf8, - 0x03, 0x1e, 0x00, 0xef, 0x80, 0x3f, 0xe0, 0x0c, - 0xf8, 0x03, 0xfe, 0x00, 0xcf, 0x80, 0x37, 0xe0, - 0x0f, 0xe8, 0x02, 0x3e, 0x00, 0xff, 0x90, 0x33, - 0xe0, 0x0f, 0x48, 0x02, 0x3e, 0x50, 0xf5, 0x10, - 0x3b, 0x60, 0x0f, 0xf9, 0x13, 0xfe, 0x08, 0xff, - 0x80, 0x33, 0xe0, 0x4d, 0xf8, 0x23, 0xde, 0x04, - 0x8f, 0x80, 0x3f, 0xe0, 0x0f, 0xf8, 0x03, 0x40, - 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0xed, 0x09, - 0x00, 0x7a, 0x00, 0xa8, 0x19, 0x9c, 0x00, 0xbf, - 0x00, 0x23, 0xc0, 0x08, 0xf4, 0x02, 0x1c, 0x00, - 0x85, 0x00, 0x2f, 0x44, 0x08, 0x51, 0x00, 0xd4, - 0x00, 0x87, 0x00, 0x21, 0xc0, 0x4b, 0xe0, 0x02, - 0x1c, 0x80, 0xbf, 0x00, 0x29, 0x50, 0x0e, 0x44, - 0x03, 0x58, 0x04, 0x37, 0x60, 0x21, 0x04, 0x0b, - 0x70, 0x02, 0xdc, 0x00, 0xb7, 0x01, 0x69, 0xc0, - 0x0b, 0x61, 0x02, 0x5c, 0x40, 0x85, 0x20, 0x2d, - 0xc0, 0x0b, 0x70, 0x02, 0x6a, 0x04, 0x60, 0x00, - 0x00, 0x00, 0x00, 0x98, 0x00, 0x9c, 0x00, 0xb7, - 0x00, 0x21, 0xc0, 0x08, 0x60, 0x02, 0x14, 0x00, - 0xa7, 0x00, 0x2d, 0x80, 0x08, 0x70, 0x02, 0xfc, - 0x00, 0x87, 0x00, 0x21, 0xc0, 0x0b, 0x40, 0x02, - 0x18, 0x04, 0xb6, 0x04, 0x21, 0xc0, 0x09, 0xc0, - 0x02, 0x15, 0x04, 0xb7, 0x40, 0x29, 0x00, 0x0b, - 0x60, 0x06, 0xdc, 0x00, 0xbe, 0x00, 0x25, 0xc0, - 0x0b, 0x50, 0x02, 0x7c, 0x00, 0x87, 0x00, 0x2d, - 0xc0, 0x0b, 0x70, 0x02, 0x40, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x62, 0x04, 0xcd, 0x80, 0xb3, - 0x00, 0x20, 0xc0, 0x08, 0x30, 0x42, 0x0c, 0x00, - 0x83, 0x00, 0x2c, 0xc0, 0x08, 0x30, 0x02, 0xcc, - 0x00, 0x83, 0x00, 0x40, 0xc0, 0x0b, 0x00, 0x02, - 0x20, 0x00, 0xb3, 0x00, 0x28, 0xc0, 0x0a, 0x00, - 0x0a, 0x00, 0x40, 0xb3, 0x80, 0x20, 0x20, 0x0b, - 0x20, 0x22, 0xcc, 0x08, 0xb0, 0xc4, 0x6c, 0xc0, - 0x09, 0x00, 0x42, 0x4e, 0x40, 0x80, 0x00, 0x2c, - 0xe2, 0x0b, 0x26, 0x22, 0x48, 0x04, 0x30, 0x00, - 0x00, 0x00, 0x00, 0xaa, 0x05, 0xbd, 0x10, 0xfb, - 0x00, 0x32, 0xc0, 0x0c, 0xb0, 0x03, 0x2c, 0x00, - 0xeb, 0x00, 0x3e, 0xc0, 0x0c, 0xb0, 0x03, 0xcc, - 0x00, 0xcf, 0x00, 0xb2, 0xc0, 0x0f, 0x90, 0x03, - 0x2c, 0x04, 0xfb, 0x02, 0x32, 0xc0, 0x0d, 0x90, - 0x02, 0xed, 0x09, 0x00, 0x7b, 0x00, 0x0d, 0x00, - 0xfb, 0xc0, 0x1a, 0x58, 0x0f, 0x30, 0x03, 0xfc, - 0x04, 0xf3, 0x8a, 0x37, 0xc0, 0x0f, 0xb0, 0x03, - 0x6d, 0x00, 0xcb, 0x00, 0x3e, 0xf8, 0x0f, 0x3c, - 0x03, 0x6a, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, - 0x90, 0x10, 0xec, 0x00, 0xf9, 0x40, 0x3e, 0x50, - 0x0f, 0x94, 0x13, 0xe4, 0x00, 0xfb, 0x00, 0x3e, - 0xc0, 0x0f, 0xb4, 0x03, 0xee, 0x04, 0xfb, 0x00, - 0x3e, 0xc0, 0x0f, 0x80, 0x0b, 0xe9, 0x00, 0xfb, - 0x40, 0x3e, 0xc0, 0x0f, 0x88, 0x03, 0xec, 0x00, - 0xfb, 0x10, 0x3e, 0x08, 0x07, 0xa4, 0x03, 0xec, - 0x00, 0xfa, 0x48, 0x3a, 0xc0, 0x0b, 0x90, 0x23, - 0x64, 0x80, 0xf3, 0x00, 0x3e, 0xc0, 0x0f, 0xb8, - 0x13, 0xe0, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, - 0x81, 0x90, 0xfc, 0x00, 0xff, 0x10, 0x33, 0xe0, - 0x0c, 0xf1, 0x03, 0x3c, 0x00, 0xfd, 0x80, 0x3f, - 0xc8, 0x0c, 0xdc, 0x02, 0xb4, 0x00, 0xcf, 0x00, - 0x3f, 0xd0, 0x0c, 0xd0, 0x07, 0xfe, 0x00, 0xcf, - 0x80, 0x3f, 0xf0, 0x0f, 0xc0, 0x03, 0xff, 0x01, - 0xcf, 0x00, 0x2f, 0x00, 0x0c, 0xf2, 0x03, 0x3c, - 0x00, 0xdf, 0xa0, 0x31, 0xc0, 0x0c, 0x70, 0x03, - 0x3e, 0x00, 0xfe, 0x10, 0x33, 0xc0, 0x8f, 0xf4, - 0x23, 0x00, 0x44, 0x30, 0x00, 0x00, 0x00, 0x00, - 0xc1, 0x04, 0x6c, 0x00, 0xbb, 0xc8, 0x22, 0xd6, - 0x08, 0xb8, 0x02, 0x2c, 0x00, 0xbb, 0x90, 0x2e, - 0xf8, 0x08, 0x38, 0x02, 0x2e, 0x00, 0x8b, 0x00, - 0x2e, 0xc0, 0x0d, 0x88, 0x02, 0xe0, 0x40, 0x8b, - 0xd0, 0x2e, 0xd0, 0x0b, 0x8c, 0x02, 0xed, 0x04, - 0x8b, 0x00, 0x1e, 0x21, 0x0b, 0xac, 0x02, 0xac, - 0x04, 0x98, 0x48, 0x3e, 0xc0, 0x0d, 0x9c, 0x03, - 0xe6, 0x48, 0xb8, 0x40, 0x2a, 0xc0, 0x09, 0xb8, - 0x02, 0x20, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x04, 0x2c, 0x00, 0xed, 0x09, 0x00, 0x7c, - 0x00, 0xb3, 0x00, 0x20, 0xc0, 0x08, 0x30, 0x02, - 0x2e, 0x00, 0xbb, 0x00, 0x2c, 0xc0, 0x08, 0xb0, - 0x82, 0x2c, 0x80, 0x8b, 0x00, 0x28, 0xc0, 0x08, - 0x88, 0x00, 0xe4, 0x00, 0x8b, 0x08, 0x2e, 0xc0, - 0x0b, 0x88, 0x02, 0xec, 0x20, 0x89, 0x00, 0x2e, - 0x60, 0x0b, 0xb4, 0x0a, 0x2c, 0x05, 0x99, 0x02, - 0x2a, 0xc0, 0x08, 0x88, 0x02, 0x2c, 0x00, 0xab, - 0x00, 0x22, 0xc0, 0x0b, 0xb0, 0x06, 0xa0, 0x00, - 0x40, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x0c, - 0x00, 0xb3, 0x00, 0x20, 0xc0, 0x08, 0x30, 0x12, - 0x0c, 0x00, 0xb3, 0x00, 0x2c, 0xc0, 0x08, 0x30, - 0x06, 0x2c, 0x00, 0x83, 0x00, 0x2c, 0xc0, 0x09, - 0x08, 0x02, 0xc0, 0x01, 0x83, 0x00, 0x2c, 0xc0, - 0x0b, 0x00, 0x62, 0x40, 0x02, 0x83, 0x02, 0x2c, - 0x00, 0x1b, 0x20, 0x02, 0x8c, 0x00, 0x98, 0x00, - 0x24, 0xc0, 0x09, 0x00, 0x02, 0xc4, 0x00, 0xb1, - 0x00, 0xa8, 0xc0, 0x09, 0x30, 0x02, 0x02, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x08, 0x6c, - 0x00, 0xfb, 0x00, 0x32, 0xc0, 0x0c, 0xb0, 0x03, - 0x2c, 0x00, 0xbb, 0x00, 0x3e, 0xc0, 0x0c, 0xb0, - 0x03, 0x2c, 0x00, 0xc7, 0x00, 0x3a, 0xc0, 0x0c, - 0x80, 0x02, 0xe0, 0x10, 0xcb, 0x00, 0x3e, 0xc0, - 0x0f, 0x80, 0x02, 0xe0, 0x00, 0x8b, 0x02, 0x2e, - 0x00, 0x0e, 0x80, 0x03, 0x3c, 0x00, 0xd8, 0x00, - 0x3a, 0xc0, 0x0c, 0x90, 0x03, 0x2c, 0x00, 0xfa, - 0x01, 0x32, 0xc1, 0x0f, 0x90, 0x0b, 0x80, 0x03, - 0x50, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x1d, 0xbc, - 0x00, 0xff, 0x00, 0x3f, 0xc0, 0x0f, 0xf0, 0x03, - 0xf4, 0x00, 0xfd, 0x00, 0x3f, 0xc0, 0x0f, 0xc0, - 0x03, 0x54, 0x00, 0xff, 0x00, 0x3f, 0xc0, 0x0f, - 0xc0, 0x03, 0xf0, 0x00, 0xff, 0x00, 0x3f, 0xc0, - 0x0f, 0xc0, 0x03, 0xf0, 0x00, 0xfe, 0x00, 0xed, - 0x09, 0x00, 0x7d, 0x00, 0x3b, 0x00, 0x07, 0xc0, - 0x0b, 0xfc, 0x00, 0xd4, 0x00, 0x3f, 0xc0, 0x0f, - 0xd0, 0x03, 0xb4, 0x00, 0xbc, 0x01, 0x1f, 0xc0, - 0x8f, 0xc0, 0x03, 0xe8, 0x02, 0x70, 0x00, 0x00, - 0x00, 0x00, 0xc0, 0x05, 0xfc, 0x00, 0xff, 0x00, - 0x3f, 0x80, 0x81, 0xc1, 0x0b, 0x30, 0xc0, 0xef, - 0x00, 0x3f, 0xc0, 0x0f, 0xf0, 0x03, 0xfc, 0x00, - 0xef, 0x00, 0x33, 0xc0, 0x0c, 0xf0, 0x03, 0xfc, - 0x00, 0xfc, 0x00, 0x37, 0x80, 0x0f, 0xf0, 0x03, - 0x7c, 0x00, 0xdf, 0x00, 0x33, 0xc0, 0x0c, 0xf4, - 0x13, 0xbc, 0x40, 0xff, 0x00, 0x33, 0xd0, 0x0e, - 0xf0, 0x03, 0x70, 0x44, 0xec, 0x35, 0x33, 0x0c, - 0x0c, 0xc2, 0x03, 0xf0, 0x00, 0x70, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x10, 0xec, 0x00, 0xbb, 0x00, - 0x2e, 0x80, 0x0b, 0x82, 0x02, 0x01, 0xc0, 0x8b, - 0x00, 0x2e, 0xc0, 0x0b, 0xb0, 0x02, 0xec, 0x00, - 0xbb, 0x00, 0xa0, 0xc0, 0x08, 0xb0, 0x06, 0xec, - 0x10, 0xb8, 0x00, 0x22, 0x80, 0x08, 0xb0, 0x02, - 0x3c, 0x04, 0x87, 0x00, 0x23, 0xc0, 0x08, 0xf2, - 0x02, 0x3c, 0x80, 0xbb, 0x00, 0x22, 0xc0, 0x0b, - 0xb0, 0x02, 0xc1, 0x80, 0xb9, 0x30, 0xa2, 0x18, - 0x48, 0x96, 0x82, 0xe0, 0x06, 0x30, 0x00, 0x00, - 0x00, 0x00, 0x88, 0x05, 0xcc, 0x00, 0xb3, 0x00, - 0x2c, 0x40, 0x0b, 0x88, 0x06, 0x0a, 0x04, 0x83, - 0x04, 0x28, 0xc0, 0x0b, 0x30, 0x02, 0xc4, 0x00, - 0xb3, 0x00, 0x20, 0xc0, 0x08, 0x30, 0x02, 0xcc, - 0x00, 0xb8, 0x00, 0x24, 0x80, 0x0a, 0x30, 0x02, - 0xcc, 0x00, 0x93, 0x00, 0x24, 0xc1, 0x08, 0x32, - 0x02, 0x8c, 0x00, 0xb3, 0x00, 0x20, 0xc8, 0x0b, - 0x30, 0x02, 0x81, 0x80, 0x90, 0x20, 0x20, 0x0c, - 0x08, 0x21, 0x02, 0xe2, 0x01, 0x70, 0x00, 0x00, - 0x00, 0x00, 0xc0, 0x15, 0xac, 0x00, 0xbb, 0x00, - 0x2e, 0xc8, 0xed, 0x09, 0x00, 0x7e, 0x00, 0x8b, - 0x80, 0x02, 0x22, 0x10, 0x8b, 0x00, 0x2e, 0xc0, - 0x0b, 0xb0, 0x10, 0xec, 0x48, 0xbb, 0x00, 0x22, - 0xc0, 0x08, 0xb0, 0x02, 0xec, 0x00, 0xba, 0x00, - 0x22, 0xe0, 0x08, 0xb2, 0x02, 0x8c, 0x00, 0x83, - 0x00, 0xa6, 0xc0, 0x1a, 0xb0, 0x02, 0x2c, 0x00, - 0xbb, 0x00, 0x22, 0xc0, 0x03, 0xb0, 0x02, 0xe8, - 0x01, 0xb3, 0x00, 0x20, 0x00, 0x08, 0x95, 0x02, - 0xf0, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x40, - 0x15, 0xec, 0x00, 0xfb, 0x00, 0x3e, 0xc0, 0x0f, - 0x88, 0x03, 0x22, 0x02, 0xcb, 0x00, 0x3e, 0xc0, - 0x0f, 0xb0, 0x03, 0xe9, 0x00, 0xe3, 0x00, 0x32, - 0xc0, 0x08, 0xb0, 0x02, 0xec, 0x00, 0xf0, 0xd8, - 0x34, 0x88, 0x0e, 0x30, 0x03, 0xec, 0x00, 0xdb, - 0x04, 0x16, 0xc0, 0x0c, 0xb0, 0x12, 0xac, 0x00, - 0xfb, 0x00, 0xb2, 0xc0, 0x0e, 0xb0, 0x43, 0x64, - 0x20, 0xea, 0x04, 0x32, 0x30, 0x24, 0x88, 0x03, - 0xd0, 0x44, 0x70, 0x00, 0x00, 0x00, 0x00, 0xe0, - 0x01, 0xbc, 0x00, 0xff, 0x00, 0x3f, 0xc2, 0x8f, - 0xc9, 0x03, 0xd4, 0x20, 0xff, 0x00, 0x3f, 0xc0, - 0x0f, 0xf0, 0x03, 0xfa, 0x00, 0xff, 0x08, 0x3f, - 0xc0, 0x4f, 0xf0, 0x03, 0xfc, 0x00, 0xfc, 0x01, - 0x3f, 0xc0, 0x0e, 0xf8, 0x23, 0x7c, 0x00, 0xff, - 0x00, 0x0b, 0xc0, 0x2d, 0x70, 0x0b, 0xfc, 0x20, - 0xfb, 0x00, 0x3f, 0xc0, 0x0f, 0xf0, 0x02, 0x77, - 0x00, 0xfc, 0x01, 0x3f, 0xa4, 0x4f, 0xc8, 0x01, - 0xf8, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x40, - 0x10, 0xac, 0x00, 0xfb, 0x00, 0x3e, 0xc0, 0x0d, - 0x81, 0x83, 0x28, 0x00, 0xcb, 0x00, 0x3e, 0xc0, - 0x0f, 0xb0, 0x03, 0xed, 0x00, 0xeb, 0x00, 0x3e, - 0xc0, 0x0c, 0xb0, 0x03, 0xec, 0x00, 0xf8, 0x40, - 0x3a, 0xb2, 0x0c, 0xba, 0x03, 0x2c, 0x00, 0xdb, - 0x00, 0x3a, 0xc0, 0x0d, 0xb2, 0xed, 0x09, 0x00, - 0x7f, 0x00, 0x03, 0xec, 0x02, 0xcb, 0x00, 0x32, - 0xc0, 0x0d, 0xb0, 0x03, 0xe4, 0x22, 0xca, 0x00, - 0x3e, 0x50, 0x0c, 0xa4, 0x0b, 0x10, 0x04, 0x20, - 0x00, 0x00, 0x00, 0x00, 0xc8, 0x05, 0x2c, 0x00, - 0xbb, 0x00, 0x2e, 0xe0, 0x88, 0x0c, 0x02, 0x25, - 0x00, 0x8b, 0x00, 0x2e, 0xc0, 0x0b, 0xf0, 0x02, - 0xec, 0x00, 0x8b, 0x40, 0x2e, 0xc0, 0x08, 0xb0, - 0x02, 0xec, 0x08, 0xba, 0x00, 0x22, 0xc0, 0x08, - 0xb0, 0x00, 0xbc, 0x00, 0x8f, 0x00, 0x23, 0xc0, - 0x00, 0xf4, 0x82, 0xfe, 0x00, 0x8f, 0x00, 0x22, - 0xc0, 0x0b, 0xb0, 0x02, 0xef, 0x00, 0x8a, 0x00, - 0x2e, 0xd6, 0x08, 0x85, 0x02, 0x32, 0x00, 0x40, - 0x00, 0x00, 0x00, 0x00, 0xe0, 0x05, 0x4c, 0x00, - 0xb3, 0x00, 0x2c, 0xb4, 0x09, 0x0c, 0x02, 0x43, - 0x40, 0x83, 0x00, 0x2c, 0xc0, 0x0b, 0x30, 0x02, - 0xcc, 0x00, 0xa3, 0x00, 0x2e, 0xc0, 0x08, 0x30, - 0x42, 0xcc, 0x00, 0xb1, 0x00, 0x28, 0x80, 0x08, - 0x34, 0x00, 0x0c, 0x00, 0x93, 0x00, 0x2a, 0xc0, - 0x09, 0x34, 0x02, 0xcf, 0x08, 0x8b, 0x00, 0x28, - 0xc0, 0x89, 0x30, 0x12, 0x48, 0x00, 0x80, 0x00, - 0x2c, 0xc0, 0x08, 0x00, 0x06, 0x30, 0x00, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x1e, 0x00, - 0xb7, 0x80, 0x2d, 0xa4, 0x08, 0x48, 0x0a, 0x52, - 0x00, 0x87, 0x80, 0x2d, 0xe0, 0x0b, 0x78, 0x02, - 0xfe, 0x00, 0x07, 0x80, 0x2d, 0xe0, 0x28, 0x78, - 0x02, 0xde, 0x00, 0xbc, 0x90, 0x23, 0xac, 0x08, - 0xd9, 0x02, 0x1e, 0x00, 0x87, 0x80, 0x25, 0xe0, - 0x09, 0x78, 0x02, 0xde, 0x20, 0x87, 0x80, 0x29, - 0xf4, 0x8b, 0x78, 0x02, 0xd6, 0x20, 0x05, 0x80, - 0x2c, 0xe0, 0x2a, 0x38, 0x06, 0x88, 0x00, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x48, 0x08, 0x0c, 0x00, - 0xf3, 0x00, 0x3c, 0xc0, 0x0d, 0x80, 0x03, 0x48, - 0xed, 0x09, 0x00, 0x80, 0x00, 0x42, 0xc3, 0x00, - 0x3c, 0xc0, 0x0f, 0x30, 0x03, 0xcd, 0x40, 0xe3, - 0x00, 0x3c, 0xc0, 0x0c, 0x30, 0x03, 0xcc, 0x00, - 0xf1, 0x00, 0x38, 0xcc, 0x0c, 0x31, 0x13, 0x2c, - 0x00, 0xd3, 0x00, 0x7a, 0xc8, 0x0d, 0x30, 0x03, - 0xec, 0x00, 0xc3, 0x00, 0x38, 0xc0, 0x0d, 0x30, - 0x03, 0xc8, 0x00, 0xc0, 0x40, 0x3c, 0xc9, 0x8c, - 0x20, 0x03, 0x12, 0x02, 0x10, 0x00, 0x00, 0x00, - 0x00, 0x40, 0x1d, 0xbc, 0x00, 0xff, 0x00, 0x3d, - 0xc0, 0x0f, 0xc1, 0x03, 0xb8, 0x10, 0xff, 0x00, - 0x3f, 0xc0, 0x0f, 0xf0, 0x83, 0xd4, 0x10, 0xff, - 0x00, 0x3f, 0xc0, 0xaf, 0xf0, 0x03, 0xfc, 0x00, - 0xf4, 0x04, 0x3d, 0xcd, 0xaf, 0x71, 0x53, 0xfc, - 0x40, 0xff, 0x00, 0x33, 0xc0, 0x0e, 0xf0, 0x03, - 0xfc, 0x00, 0x7f, 0x00, 0x37, 0xc0, 0x0f, 0xf0, - 0x17, 0xfc, 0x0c, 0xef, 0x10, 0x3f, 0xc0, 0x0d, - 0xf0, 0x03, 0x50, 0x06, 0x60, 0x00, 0x00, 0x00, - 0x00, 0xa8, 0x05, 0xec, 0x00, 0xfb, 0x00, 0x3e, - 0xc0, 0x0c, 0x88, 0x03, 0x20, 0x00, 0xfb, 0x00, - 0x3e, 0xc0, 0x0f, 0xb0, 0x03, 0xec, 0x00, 0xfb, - 0x00, 0x3e, 0xc0, 0x0c, 0xb0, 0x43, 0xec, 0x00, - 0xfa, 0x80, 0x30, 0xe0, 0x0a, 0xa8, 0x03, 0xac, - 0xa0, 0xfb, 0xa8, 0x3e, 0xe6, 0x0e, 0xb3, 0x03, - 0x2c, 0xc0, 0xcb, 0x00, 0x3e, 0xe0, 0x84, 0xb0, - 0x01, 0xe8, 0x00, 0xfb, 0x00, 0x2e, 0x00, 0x0f, - 0x90, 0x03, 0xc2, 0x00, 0x70, 0x00, 0x00, 0x00, - 0x00, 0x48, 0x11, 0x9c, 0x00, 0xb7, 0x00, 0x2d, - 0xc0, 0x0d, 0xc0, 0x02, 0x10, 0x00, 0xb7, 0x00, - 0x2d, 0xc0, 0x0b, 0x72, 0x02, 0xdc, 0x00, 0xb7, - 0x00, 0x2f, 0xc0, 0x28, 0x70, 0x12, 0xdc, 0x00, - 0xb6, 0x00, 0x29, 0xc0, 0x28, 0x50, 0x02, 0x1d, - 0x00, 0xb7, 0x40, 0x2d, 0xc8, 0x08, 0x32, 0xea, - 0x0c, 0x20, 0xa7, 0xed, 0x09, 0x00, 0x81, 0x00, - 0x40, 0x2f, 0xc0, 0x88, 0x70, 0x02, 0xd4, 0x00, - 0x85, 0x00, 0x2d, 0x80, 0x0b, 0x70, 0x02, 0xd2, - 0x26, 0x60, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, - 0x9e, 0x00, 0xb7, 0x80, 0x2b, 0xe0, 0x08, 0x48, - 0x02, 0x1e, 0x00, 0xb7, 0x80, 0x2d, 0xe0, 0x0b, - 0x78, 0x02, 0xde, 0x00, 0xb7, 0x80, 0x2d, 0xe0, - 0x28, 0x78, 0x42, 0xde, 0x00, 0xbc, 0x80, 0x29, - 0xe0, 0x2a, 0xf8, 0x02, 0x1e, 0x08, 0xb7, 0x00, - 0x25, 0xe8, 0x0a, 0x78, 0x02, 0x1c, 0x80, 0x87, - 0xa0, 0x2d, 0xe0, 0x08, 0x78, 0x02, 0xca, 0x10, - 0x97, 0x8e, 0x6d, 0x60, 0x0b, 0x78, 0x02, 0xc8, - 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x48, 0x14, - 0xcc, 0x00, 0xb3, 0x00, 0x6c, 0xe4, 0x29, 0x30, - 0x12, 0x0c, 0x00, 0xb3, 0x00, 0x2c, 0xc0, 0x0b, - 0x30, 0x02, 0xcd, 0x80, 0xb3, 0x00, 0x2e, 0xc0, - 0x08, 0x30, 0x02, 0xcc, 0x00, 0xb0, 0x10, 0x28, - 0x40, 0x88, 0x34, 0x06, 0x0c, 0x04, 0xb3, 0x00, - 0x2c, 0xc0, 0x08, 0xb0, 0x02, 0x0c, 0x00, 0xa3, - 0x00, 0x2c, 0xc0, 0x08, 0x30, 0x02, 0xcd, 0x00, - 0xa3, 0xa0, 0x6c, 0xf4, 0x0b, 0x34, 0x02, 0xda, - 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x11, - 0xa8, 0x00, 0xfa, 0x00, 0x3d, 0x90, 0x08, 0xe4, - 0x8b, 0x38, 0x00, 0xfa, 0x00, 0x3e, 0x80, 0x0f, - 0xa0, 0x03, 0xfb, 0x80, 0xfa, 0x00, 0x3e, 0x80, - 0x0c, 0xa0, 0x03, 0xe8, 0x00, 0xfe, 0xd0, 0x3b, - 0x90, 0x0e, 0xe4, 0x4b, 0x28, 0x00, 0xba, 0x00, - 0x36, 0x80, 0x0a, 0xa0, 0x03, 0x28, 0x00, 0xca, - 0x00, 0x3e, 0x80, 0x0c, 0xa0, 0x03, 0xf8, 0x41, - 0xfe, 0x01, 0x3f, 0x80, 0x47, 0xe0, 0x03, 0xfa, - 0x04, 0x70, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, - 0xe0, 0x00, 0xf8, 0x00, 0x3e, 0x20, 0x0f, 0x8c, - 0x03, 0xe1, 0x80, 0xf8, 0x00, 0x3e, 0xed, 0x09, - 0x00, 0x82, 0x00, 0x00, 0x0f, 0x80, 0x03, 0xe0, - 0x00, 0xf8, 0x40, 0x3e, 0x00, 0x4f, 0x80, 0x03, - 0xe0, 0x00, 0xf8, 0x00, 0x3e, 0x21, 0x2f, 0x82, - 0x00, 0x60, 0x00, 0xf8, 0x00, 0x3e, 0x00, 0x4f, - 0x84, 0x03, 0xe1, 0x00, 0xd8, 0x00, 0x3e, 0x00, - 0x2f, 0x80, 0x03, 0xc0, 0x01, 0xd0, 0x00, 0x3e, - 0x02, 0x0f, 0x80, 0x03, 0xd2, 0x00, 0x60, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x10, 0xe4, 0x00, 0xf9, - 0x00, 0x3e, 0x40, 0x0e, 0x90, 0x03, 0xe4, 0x00, - 0xf9, 0x00, 0x3e, 0x40, 0x0f, 0x90, 0x03, 0x64, - 0x00, 0xf9, 0xa0, 0x3e, 0x40, 0x0e, 0x90, 0x03, - 0xe4, 0x00, 0xf9, 0x00, 0x3e, 0x40, 0x0d, 0x98, - 0x03, 0xe4, 0x02, 0xc1, 0x00, 0x22, 0x40, 0x0e, - 0x9c, 0x03, 0x27, 0x00, 0xb9, 0x00, 0x3e, 0x70, - 0x0f, 0x90, 0x03, 0x64, 0x00, 0xc9, 0x01, 0x32, - 0x44, 0x8f, 0x10, 0x81, 0x02, 0x04, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x04, 0x64, 0x00, 0xb9, - 0x00, 0x2e, 0x60, 0x0c, 0x94, 0x82, 0xe5, 0x2c, - 0xb9, 0x00, 0x2e, 0x40, 0x0b, 0x90, 0x12, 0xe4, - 0x00, 0xb9, 0x40, 0x2e, 0x40, 0x08, 0x90, 0x02, - 0xe4, 0x08, 0xb9, 0x00, 0x2e, 0x40, 0x0b, 0x90, - 0x02, 0xe4, 0x08, 0x89, 0x00, 0x22, 0x41, 0x0b, - 0x90, 0x02, 0x25, 0x00, 0xb9, 0x00, 0x2e, 0x60, - 0x0b, 0x90, 0x02, 0xe4, 0x00, 0x89, 0x30, 0x22, - 0x48, 0x0b, 0x90, 0x8a, 0x20, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x18, 0x05, 0x24, 0x00, 0xb9, - 0x00, 0x2e, 0x48, 0x0a, 0x90, 0x02, 0xe6, 0x00, - 0xb9, 0x00, 0x2e, 0x40, 0x0b, 0x90, 0x02, 0xe4, - 0x00, 0xb9, 0x00, 0x2e, 0x40, 0x08, 0x90, 0x42, - 0xe4, 0x00, 0xb9, 0x00, 0x2e, 0x61, 0x0b, 0xb2, - 0x02, 0xc4, 0x00, 0x89, 0x00, 0x2a, 0x40, 0x0b, - 0x94, 0x0a, 0x25, 0x00, 0xb9, 0x00, 0x2e, 0x40, - 0x0b, 0xed, 0x09, 0x00, 0x83, 0x00, 0x90, 0x02, - 0xe4, 0x00, 0x89, 0x00, 0x26, 0xc0, 0x01, 0x92, - 0x02, 0x0e, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, - 0x08, 0x04, 0x04, 0x00, 0xb1, 0x00, 0x2e, 0xc0, - 0x09, 0x14, 0x02, 0xc5, 0x00, 0xb1, 0x00, 0x2c, - 0x40, 0x0b, 0x14, 0x02, 0xc4, 0x00, 0xb3, 0x00, - 0x2c, 0x50, 0x08, 0x10, 0x02, 0xc4, 0x00, 0xb1, - 0x00, 0x2c, 0x40, 0x0b, 0x10, 0x02, 0xc5, 0x04, - 0x81, 0x40, 0x28, 0x50, 0x8b, 0x14, 0x02, 0x05, - 0x00, 0xb1, 0x28, 0x2c, 0xd0, 0x0b, 0x10, 0x02, - 0xc5, 0x12, 0x81, 0x42, 0xa4, 0x50, 0x0b, 0x14, - 0x02, 0x8a, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xb8, 0x0d, 0x60, 0x00, 0xf8, 0x00, 0x3e, 0x00, - 0x0e, 0x80, 0x43, 0xe0, 0x00, 0xf8, 0x00, 0x3e, - 0x00, 0x0f, 0x88, 0x03, 0xe0, 0x00, 0xf8, 0x00, - 0x3e, 0x00, 0x0c, 0x80, 0x03, 0xe0, 0x00, 0xf8, - 0x02, 0x3e, 0x00, 0x0f, 0xa0, 0x13, 0xe0, 0x08, - 0xc8, 0x04, 0x38, 0x00, 0x0e, 0x80, 0x03, 0x20, - 0x00, 0xf8, 0x22, 0x3e, 0x00, 0x0f, 0x80, 0x23, - 0x60, 0x00, 0xc8, 0x00, 0x36, 0x00, 0x0f, 0x80, - 0x03, 0x2e, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00, - 0x98, 0x1d, 0xe4, 0x00, 0xf9, 0x00, 0x3d, 0x40, - 0x0e, 0xd0, 0x43, 0xf5, 0x10, 0xf9, 0x00, 0x3e, - 0x40, 0x0f, 0x9c, 0x03, 0xf4, 0x00, 0xf9, 0x00, - 0x3e, 0x40, 0x2b, 0x90, 0x03, 0xe4, 0x00, 0xf5, - 0x01, 0x3f, 0xc0, 0x0f, 0x50, 0x13, 0xe5, 0x01, - 0xf9, 0x42, 0x36, 0x50, 0x0f, 0x94, 0x03, 0xe5, - 0x00, 0xf9, 0x28, 0x3e, 0x40, 0x0f, 0x90, 0x03, - 0x75, 0x00, 0xfd, 0x40, 0x3b, 0xd0, 0x0f, 0xd4, - 0x03, 0x66, 0x24, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x18, 0x01, 0xe4, 0x00, 0xf9, 0x00, 0x3d, 0x40, - 0x0c, 0xd1, 0x03, 0x34, 0x80, 0xc9, 0x00, 0x3e, - 0x40, 0x07, 0x93, 0x03, 0xed, 0x09, 0x00, 0x84, - 0x00, 0x24, 0x00, 0xfd, 0x00, 0x3f, 0x40, 0x2c, - 0x90, 0x03, 0xe4, 0x00, 0xf9, 0x00, 0x31, 0xc0, - 0x0e, 0xd0, 0x03, 0xe4, 0x80, 0xf9, 0x28, 0x36, - 0x4c, 0x0e, 0xd0, 0x03, 0x74, 0x00, 0xc9, 0x28, - 0x3f, 0x40, 0x0f, 0x90, 0x03, 0xf4, 0xc0, 0xfd, - 0x01, 0x2f, 0x40, 0x8f, 0xd1, 0x03, 0xc6, 0x00, - 0x70, 0x00, 0x00, 0x00, 0x00, 0x38, 0x10, 0xe0, - 0x00, 0xb8, 0x00, 0x2e, 0x01, 0x0d, 0x00, 0x02, - 0x20, 0xa0, 0x88, 0x00, 0x2e, 0x00, 0x0b, 0x83, - 0x22, 0x20, 0x00, 0xb8, 0x00, 0x2e, 0x0a, 0x08, - 0x80, 0x02, 0xe0, 0x00, 0xb8, 0x00, 0x2a, 0x00, - 0x08, 0xa0, 0x02, 0xe0, 0xa5, 0xb8, 0x20, 0x2c, - 0x0d, 0x0e, 0x84, 0x82, 0xa0, 0x20, 0x88, 0x20, - 0x2e, 0x0a, 0x0b, 0x80, 0x02, 0xe0, 0xc0, 0xb8, - 0x48, 0x2e, 0x02, 0x0b, 0x01, 0x02, 0xce, 0x06, - 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x05, 0xc4, - 0x00, 0xb1, 0x00, 0x2c, 0x40, 0x08, 0x90, 0x02, - 0x04, 0xc0, 0x81, 0x00, 0x2c, 0x40, 0x0b, 0x12, - 0x02, 0x04, 0x00, 0xb1, 0x00, 0x2c, 0x48, 0x08, - 0x10, 0x02, 0xc4, 0x00, 0xb9, 0x00, 0x20, 0x40, - 0x8a, 0x10, 0x02, 0xc4, 0xc0, 0xb1, 0x28, 0x28, - 0x48, 0x0a, 0x13, 0x02, 0x44, 0x50, 0x81, 0x28, - 0x2c, 0x48, 0x0b, 0x10, 0x40, 0x44, 0x80, 0xb1, - 0x30, 0x2c, 0x44, 0x0b, 0x10, 0x02, 0xd2, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x18, 0x15, 0xa4, - 0x00, 0xb9, 0x04, 0x2e, 0x40, 0x09, 0xb0, 0x02, - 0x26, 0x0c, 0x89, 0x00, 0x2e, 0x40, 0x0b, 0x90, - 0x02, 0x25, 0x00, 0xb9, 0x00, 0x2e, 0x40, 0x08, - 0x90, 0x02, 0xe4, 0x00, 0xb9, 0x01, 0x2a, 0x49, - 0x08, 0x90, 0x02, 0xe4, 0x00, 0xb9, 0x00, 0x0e, - 0x40, 0x4a, 0x90, 0x02, 0xa4, 0x00, 0x89, 0x00, - 0x2e, 0x40, 0x0b, 0x90, 0x02, 0xe4, 0x84, 0xed, - 0x09, 0x00, 0x85, 0x00, 0xb9, 0x20, 0x2e, 0x40, - 0x03, 0x90, 0x02, 0xc6, 0x00, 0x20, 0x00, 0x00, - 0x00, 0x00, 0xa0, 0x15, 0xe4, 0x00, 0xf9, 0x00, - 0x3c, 0x56, 0x0c, 0x94, 0x8b, 0x26, 0x82, 0xc9, - 0x00, 0x3e, 0x40, 0x0f, 0x90, 0x0b, 0x26, 0x04, - 0xb9, 0x04, 0x3e, 0x40, 0x0c, 0x90, 0x03, 0xe4, - 0x00, 0xf1, 0x10, 0x20, 0x50, 0x0a, 0x98, 0x03, - 0xe4, 0x00, 0xb9, 0x00, 0x36, 0x40, 0x0e, 0x90, - 0x03, 0x64, 0x02, 0xc9, 0x00, 0x3e, 0x40, 0x0f, - 0x90, 0x03, 0xe4, 0x00, 0xf9, 0x00, 0x3e, 0x40, - 0x07, 0x98, 0x03, 0xe8, 0x04, 0x70, 0x00, 0x00, - 0x00, 0x00, 0x28, 0x01, 0xa4, 0x00, 0xf9, 0x00, - 0x3e, 0x60, 0x0f, 0x99, 0x03, 0xc4, 0x00, 0xf9, - 0x00, 0x3e, 0x40, 0x0f, 0x90, 0x03, 0xe4, 0x40, - 0xf9, 0x00, 0x1e, 0x40, 0x0f, 0x90, 0x03, 0xe4, - 0x00, 0xf9, 0x00, 0x3e, 0x41, 0x0f, 0x94, 0x03, - 0xe4, 0x00, 0xf9, 0x00, 0x1e, 0x40, 0x07, 0x90, - 0x07, 0x64, 0x00, 0xf9, 0x00, 0x1e, 0x40, 0x0f, - 0x90, 0x03, 0xe4, 0x00, 0xf9, 0x00, 0x3e, 0x40, - 0x0f, 0x91, 0x03, 0xd2, 0x00, 0x20, 0x00, 0x00, - 0x00, 0x00, 0x28, 0x10, 0xa0, 0x00, 0xf8, 0x00, - 0x3e, 0x08, 0x0c, 0x84, 0x03, 0x21, 0x20, 0xf8, - 0x00, 0x3e, 0x00, 0x0f, 0x80, 0x23, 0xe1, 0x00, - 0xf8, 0x80, 0x32, 0x01, 0x0f, 0x80, 0x03, 0xe0, - 0x00, 0xf8, 0x00, 0x3e, 0x20, 0x4c, 0x88, 0x0b, - 0x20, 0x10, 0xf8, 0x00, 0x3a, 0x00, 0x0e, 0x00, - 0x23, 0xe0, 0x20, 0xc8, 0x00, 0x32, 0x08, 0x0f, - 0x80, 0x03, 0xe0, 0x20, 0xc8, 0x22, 0x3e, 0x11, - 0x0f, 0x82, 0x0b, 0x02, 0x04, 0x20, 0x00, 0x00, - 0x00, 0x00, 0x28, 0x05, 0x28, 0x00, 0xba, 0x00, - 0x2f, 0x80, 0x28, 0x68, 0x82, 0x3a, 0x00, 0xba, - 0x00, 0x3a, 0x80, 0x0b, 0xa0, 0x03, 0xa8, 0x00, - 0xee, 0x40, 0xed, 0x09, 0x00, 0x86, 0x00, 0x2a, - 0x80, 0x0b, 0xa0, 0x02, 0xe8, 0x00, 0xba, 0x01, - 0x27, 0x91, 0x08, 0xe4, 0x02, 0x28, 0x00, 0x9a, - 0x00, 0x22, 0x81, 0x08, 0xe1, 0x03, 0xb9, 0x00, - 0xaa, 0x05, 0x23, 0x80, 0x0b, 0xa0, 0x02, 0xfb, - 0x10, 0x8e, 0xc0, 0x2f, 0x90, 0x0b, 0xec, 0x02, - 0x0a, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, - 0x05, 0x4c, 0x00, 0xb3, 0x00, 0x2c, 0xd4, 0x18, - 0x38, 0x02, 0x0f, 0x40, 0xb3, 0x04, 0x2c, 0xc0, - 0x0b, 0xb0, 0x02, 0x8c, 0x04, 0xb3, 0x00, 0x02, - 0xe4, 0x0b, 0x30, 0x02, 0xcc, 0x00, 0xb3, 0x00, - 0x2c, 0xe0, 0x08, 0x38, 0x02, 0x0c, 0x00, 0xb3, - 0x00, 0x28, 0xc0, 0x0a, 0x30, 0x02, 0xad, 0x00, - 0xa3, 0x00, 0xa0, 0xe0, 0x0b, 0x30, 0x02, 0xcf, - 0x00, 0x83, 0x81, 0x2c, 0xc8, 0x0b, 0x30, 0x02, - 0x0a, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x01, 0x1c, 0x00, 0xb7, 0x00, 0x2d, 0xc0, 0x08, - 0x50, 0x02, 0x18, 0x00, 0xb7, 0x00, 0x29, 0xc0, - 0x0b, 0x72, 0x02, 0x9c, 0x00, 0xa7, 0x80, 0x29, - 0xc0, 0x0b, 0x70, 0x02, 0xdc, 0x00, 0xb7, 0x00, - 0x2d, 0xc2, 0x08, 0xf8, 0x82, 0x1c, 0x80, 0x97, - 0x80, 0x21, 0xe0, 0x08, 0x70, 0x02, 0x8c, 0x08, - 0xa3, 0xa0, 0x21, 0x90, 0x0b, 0x70, 0x00, 0xd6, - 0x2a, 0x87, 0x41, 0x2d, 0xc0, 0x0b, 0x68, 0x82, - 0x20, 0x04, 0x40, 0x00, 0x00, 0x00, 0x00, 0xa8, - 0x08, 0x1e, 0x00, 0xf7, 0x80, 0x2d, 0xe0, 0x08, - 0x78, 0x03, 0x1e, 0x00, 0xf7, 0x80, 0x3d, 0xe0, - 0x0f, 0x7c, 0x03, 0x9e, 0x08, 0xf7, 0x82, 0x31, - 0xe0, 0x0f, 0x78, 0x03, 0xde, 0x00, 0xf7, 0x80, - 0x2d, 0xe0, 0x0c, 0x78, 0x03, 0x1f, 0x40, 0xff, - 0xf0, 0x39, 0xe8, 0x0e, 0x78, 0x03, 0x9e, 0x00, - 0xe7, 0xa4, 0x31, 0xe1, 0x0f, 0x78, 0x03, 0xfe, - 0x00, 0xc5, 0x80, 0x2d, 0xa0, 0xed, 0x09, 0x00, - 0x87, 0x00, 0x0f, 0x78, 0x03, 0x22, 0x02, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x08, 0x1d, 0xac, 0x00, - 0xfb, 0x00, 0x3e, 0x40, 0x0f, 0x80, 0x0b, 0xe4, - 0x00, 0xfb, 0x00, 0x3e, 0xc0, 0x0f, 0xb0, 0x03, - 0xac, 0x00, 0xf3, 0x00, 0x3e, 0xd0, 0x07, 0xb0, - 0x03, 0xec, 0x00, 0xfb, 0x00, 0x36, 0xc0, 0x2f, - 0x20, 0x03, 0xec, 0x80, 0xdb, 0x20, 0x3a, 0xd0, - 0x0f, 0x80, 0x03, 0xa0, 0x00, 0xfb, 0x10, 0x3e, - 0x80, 0x0f, 0xb0, 0x03, 0xe4, 0x00, 0xf9, 0x00, - 0x3e, 0x40, 0x0f, 0xa0, 0x13, 0xc2, 0x04, 0x60, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0xfe, 0x00, - 0xff, 0x80, 0x3d, 0xe0, 0x0c, 0xf8, 0x03, 0x3e, - 0x10, 0xcf, 0x80, 0x3f, 0xe0, 0x0f, 0xf2, 0x03, - 0xfe, 0x00, 0xef, 0x80, 0x33, 0x70, 0x2c, 0xf8, - 0x03, 0xfe, 0x00, 0xff, 0x80, 0x3f, 0x60, 0x0f, - 0xe8, 0x43, 0xfe, 0x00, 0xcf, 0x80, 0x3f, 0xf2, - 0x0c, 0xe8, 0x03, 0xfa, 0x00, 0xff, 0x94, 0x3f, - 0xe0, 0x0f, 0xf8, 0x03, 0xfa, 0x00, 0xfe, 0x90, - 0x33, 0xe0, 0x0c, 0xd8, 0x03, 0x00, 0x00, 0x20, - 0x00, 0x00, 0x00, 0x00, 0xa8, 0x19, 0x9c, 0x00, - 0xb7, 0x00, 0x2d, 0xc8, 0x08, 0x71, 0x8a, 0x18, - 0x40, 0x87, 0x00, 0x2d, 0xc0, 0x0e, 0x70, 0x42, - 0xdc, 0x10, 0xb7, 0x00, 0x21, 0x40, 0x28, 0x70, - 0x03, 0x9c, 0x00, 0xb7, 0x00, 0x2d, 0x82, 0x0b, - 0x40, 0x02, 0xdc, 0x40, 0xd7, 0x00, 0x2d, 0xc4, - 0x0d, 0x70, 0x02, 0xdc, 0x80, 0xf7, 0x30, 0x39, - 0xc4, 0x0b, 0x70, 0x02, 0xd4, 0x00, 0xb6, 0x00, - 0x23, 0x81, 0x0f, 0xd0, 0x03, 0xe2, 0x06, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9c, 0x00, - 0xb7, 0x00, 0x2f, 0xc0, 0x18, 0x70, 0x02, 0x18, - 0x02, 0x87, 0x00, 0x2d, 0xc0, 0x0b, 0x71, 0x02, - 0xdc, 0x00, 0xa6, 0x10, 0x21, 0x60, 0x09, 0x70, - 0xed, 0x09, 0x00, 0x88, 0x00, 0x02, 0xdc, 0x00, - 0xb7, 0x00, 0x2d, 0xc4, 0x0b, 0x60, 0x02, 0xcc, - 0x00, 0x87, 0x10, 0x2c, 0xc0, 0x08, 0x60, 0x02, - 0xd8, 0x04, 0xb7, 0x00, 0x6d, 0x40, 0x0b, 0x70, - 0x02, 0xd8, 0x00, 0xb5, 0x0e, 0x21, 0x82, 0x09, - 0x60, 0x02, 0x00, 0x10, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x20, 0x04, 0xcc, 0x00, 0xb3, 0x00, 0x6c, - 0x40, 0x08, 0x24, 0x06, 0x0a, 0x00, 0x83, 0x00, - 0x2c, 0xc0, 0x0a, 0x30, 0x22, 0xce, 0x00, 0xb3, - 0x00, 0x22, 0x40, 0x09, 0x30, 0x02, 0x8c, 0x00, - 0xb3, 0x54, 0x2c, 0x88, 0x0b, 0x26, 0x02, 0xcc, - 0x00, 0x93, 0x04, 0x2c, 0xc0, 0x09, 0x80, 0x42, - 0xc0, 0x00, 0xa3, 0x00, 0x6a, 0x40, 0x0b, 0x30, - 0x02, 0xc5, 0x80, 0xb9, 0x0c, 0xa0, 0x00, 0x0b, - 0x2d, 0x02, 0x88, 0x00, 0x20, 0x00, 0x00, 0x00, - 0x00, 0xa8, 0x05, 0xac, 0x00, 0xfb, 0x00, 0x3e, - 0xc0, 0x0c, 0xa0, 0x03, 0x2d, 0x80, 0xcb, 0x00, - 0x2e, 0xc0, 0x0f, 0xf0, 0x02, 0xec, 0x20, 0x69, - 0x02, 0xb2, 0x40, 0x2d, 0xb0, 0x03, 0xec, 0x00, - 0xfb, 0x10, 0x3e, 0xe0, 0x0b, 0xb4, 0x83, 0xfc, - 0x18, 0xcf, 0x04, 0x3f, 0xc0, 0x08, 0x90, 0x03, - 0xe4, 0x00, 0xbf, 0x00, 0x3e, 0x40, 0x0f, 0xb0, - 0x42, 0xec, 0x20, 0xfb, 0x40, 0x32, 0x40, 0x0d, - 0xb0, 0x02, 0x2a, 0x04, 0x60, 0x00, 0x00, 0x00, - 0x00, 0x80, 0x00, 0xec, 0x00, 0xfb, 0x00, 0x3e, - 0xe0, 0x0f, 0x84, 0x83, 0xe8, 0x80, 0xfb, 0x00, - 0x3e, 0xc0, 0x0f, 0xb0, 0x03, 0xec, 0x00, 0xf9, - 0x40, 0x36, 0x40, 0x2e, 0xb0, 0x03, 0xec, 0x00, - 0xfb, 0x00, 0x3e, 0xc0, 0x0f, 0xb0, 0x03, 0xec, - 0x04, 0xf3, 0x02, 0x3e, 0xc1, 0x0f, 0x90, 0x03, - 0xe4, 0x00, 0xfb, 0x00, 0x3e, 0x50, 0x4f, 0xb0, - 0x00, 0xe8, 0x00, 0xfb, 0x40, 0x3e, 0x40, 0x4c, - 0xa0, 0x23, 0xe0, 0xed, 0x09, 0x00, 0x89, 0x00, - 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, - 0xfc, 0x00, 0xff, 0x00, 0x3f, 0xc0, 0x0c, 0xf9, - 0x03, 0x3c, 0x00, 0xcf, 0x00, 0x3f, 0xc0, 0xcf, - 0x70, 0x03, 0x7c, 0x00, 0xdf, 0x00, 0x33, 0x44, - 0x0c, 0xf0, 0x03, 0xfc, 0x00, 0xff, 0x00, 0x33, - 0xf0, 0x0e, 0xfc, 0x13, 0xdc, 0x00, 0xcf, 0x00, - 0x31, 0xc0, 0x0c, 0xd0, 0x03, 0x34, 0x00, 0xf7, - 0x00, 0xb3, 0x00, 0x0c, 0xf0, 0x03, 0xbe, 0x04, - 0xda, 0xc2, 0x31, 0x80, 0x0e, 0xd1, 0x83, 0xc8, - 0x44, 0x30, 0x00, 0x00, 0x00, 0x00, 0x81, 0x04, - 0x6c, 0x00, 0xbb, 0x00, 0x2c, 0xc0, 0x08, 0x8c, - 0x02, 0x26, 0x00, 0x8b, 0x00, 0x2e, 0xc0, 0x0b, - 0xb0, 0x22, 0x0c, 0x00, 0x83, 0xf4, 0x36, 0x40, - 0x08, 0xb0, 0x03, 0xec, 0x00, 0xb3, 0x00, 0x36, - 0xe2, 0x0b, 0x80, 0x02, 0xec, 0x00, 0xab, 0x00, - 0x2a, 0xc1, 0x0a, 0x8c, 0x02, 0x23, 0x00, 0xbb, - 0x00, 0x22, 0x20, 0x08, 0xb0, 0x22, 0x69, 0x60, - 0x3a, 0x60, 0x22, 0x40, 0x08, 0x88, 0x02, 0xe8, - 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x80, 0x05, - 0x2c, 0x00, 0xbb, 0x00, 0x2e, 0x60, 0x08, 0x00, - 0x02, 0x0c, 0x80, 0x8b, 0x00, 0x2e, 0xc0, 0x0b, - 0xb0, 0x02, 0x2c, 0x00, 0x99, 0x00, 0x22, 0xc0, - 0x18, 0xb0, 0x02, 0xec, 0x00, 0xbb, 0x00, 0x22, - 0x80, 0x0b, 0xa0, 0x02, 0xec, 0x00, 0x8b, 0x00, - 0x22, 0xc0, 0x89, 0x9c, 0x02, 0x66, 0x20, 0xab, - 0x00, 0x22, 0x70, 0x08, 0xb0, 0x02, 0xe0, 0x00, - 0xb8, 0x00, 0x2a, 0x48, 0x88, 0x90, 0x12, 0xe0, - 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, - 0x0c, 0x00, 0xb3, 0x00, 0x2c, 0xe0, 0x08, 0x00, - 0x0a, 0x00, 0x00, 0x83, 0x00, 0x2c, 0xc0, 0x0b, - 0x30, 0x02, 0x2c, 0x08, 0x81, 0x00, 0x24, 0xc0, - 0x28, 0x30, 0x02, 0xcc, 0x00, 0xbb, 0xed, 0x09, - 0x00, 0x8a, 0x00, 0x00, 0x24, 0x80, 0x0b, 0x00, - 0x02, 0xcc, 0x08, 0xa3, 0x00, 0x28, 0xc0, 0x0a, - 0x10, 0x0a, 0x44, 0x00, 0xb3, 0x00, 0x20, 0x40, - 0x08, 0x30, 0x02, 0x40, 0x00, 0xb0, 0x00, 0x20, - 0x00, 0x18, 0x10, 0x02, 0xc2, 0x15, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x0d, 0x6c, 0x00, 0xfb, - 0x00, 0x3e, 0x40, 0x0c, 0x10, 0x02, 0x08, 0x02, - 0xcb, 0x04, 0x2e, 0xc0, 0x0f, 0xb0, 0x02, 0x2c, - 0x04, 0xdb, 0x00, 0x31, 0xc0, 0x0c, 0xb0, 0x43, - 0xec, 0x00, 0xfb, 0x00, 0x32, 0x80, 0x0f, 0xa0, - 0x03, 0xfc, 0x00, 0xcf, 0x00, 0x33, 0xc0, 0x0d, - 0x90, 0x03, 0x64, 0x00, 0xfb, 0x01, 0x32, 0x00, - 0x2c, 0xb0, 0x03, 0xa0, 0x00, 0xd8, 0x00, 0xb2, - 0x80, 0x0e, 0x80, 0x03, 0xc0, 0x03, 0x50, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x1d, 0xfc, 0x00, 0xff, - 0x00, 0x3f, 0x80, 0x0f, 0xc0, 0x03, 0xf0, 0x00, - 0xff, 0x00, 0x7f, 0xc0, 0x0b, 0xf0, 0x17, 0xbc, - 0x08, 0xf7, 0x00, 0x3f, 0xc0, 0x0f, 0xf0, 0x03, - 0xbc, 0x00, 0xff, 0x00, 0x3f, 0x80, 0x8f, 0xc0, - 0x03, 0xfc, 0x00, 0xff, 0x02, 0x3f, 0xc0, 0x0f, - 0xc0, 0x03, 0xb0, 0x00, 0xff, 0x00, 0x3f, 0x00, - 0x0f, 0xf0, 0x00, 0x70, 0x00, 0x7c, 0x00, 0x3f, - 0x00, 0x0f, 0xc0, 0x03, 0xe8, 0x04, 0x70, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0x85, 0xfc, 0x00, 0xd5, - 0x12, 0x31, 0x44, 0x8f, 0xf0, 0x03, 0xfd, 0x00, - 0xcf, 0x00, 0x37, 0xc8, 0x0d, 0xf2, 0x03, 0xfc, - 0x80, 0xcf, 0x00, 0x33, 0x00, 0x0f, 0xf0, 0x03, - 0xd0, 0x00, 0xec, 0x01, 0x3f, 0xc8, 0x0c, 0xc0, - 0x03, 0x7c, 0xc0, 0xfc, 0x22, 0x33, 0x84, 0x0e, - 0xf3, 0x03, 0x30, 0x40, 0x3f, 0x20, 0x7b, 0xc2, - 0x0f, 0xf0, 0x83, 0xf0, 0x00, 0xcc, 0x00, 0x2f, - 0xca, 0x0b, 0xd2, 0x43, 0x30, 0x01, 0x70, 0x00, - 0x00, 0xed, 0x09, 0x00, 0x8b, 0x00, 0x00, 0x00, - 0xc2, 0x18, 0xec, 0x00, 0xbb, 0x20, 0x22, 0xc8, - 0x0b, 0xf5, 0x03, 0x8c, 0x00, 0x8b, 0x02, 0x2f, - 0xd4, 0x0b, 0xf5, 0x22, 0xdc, 0x40, 0x8b, 0x04, - 0x22, 0x00, 0x0b, 0xb2, 0x82, 0xe0, 0x80, 0xb8, - 0x50, 0x2f, 0xce, 0x2a, 0x00, 0x02, 0x2d, 0xc0, - 0xc8, 0x68, 0x3e, 0x80, 0x0b, 0xf7, 0x42, 0x20, - 0x84, 0xbf, 0x40, 0x22, 0xd0, 0x0b, 0xb4, 0x02, - 0xe0, 0x02, 0x88, 0x20, 0x2e, 0xd2, 0x09, 0x91, - 0x02, 0x20, 0x04, 0x20, 0x00, 0x00, 0x00, 0x00, - 0xc8, 0x00, 0x8c, 0x08, 0x93, 0x20, 0x20, 0xc8, - 0x0b, 0x30, 0x22, 0xcc, 0x80, 0x83, 0x00, 0x2c, - 0xc0, 0x0a, 0x30, 0x02, 0xcc, 0x00, 0x83, 0x00, - 0x24, 0x00, 0x0b, 0x30, 0x10, 0xc0, 0xa0, 0xa0, - 0x00, 0x2c, 0xc8, 0x0b, 0x80, 0x02, 0x0c, 0x90, - 0x90, 0x10, 0x2c, 0x88, 0x0a, 0x30, 0x0e, 0x40, - 0x00, 0xb3, 0x10, 0x20, 0xc0, 0x0b, 0x30, 0x06, - 0xe2, 0x00, 0xa0, 0x08, 0x2c, 0xc8, 0x0b, 0x00, - 0x02, 0xa2, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, - 0xc0, 0x05, 0xec, 0x00, 0xb3, 0x80, 0x22, 0xe0, - 0x0b, 0xb0, 0x00, 0xec, 0x00, 0x8b, 0x00, 0x2e, - 0xc0, 0x0b, 0xb0, 0x02, 0xec, 0x00, 0x8b, 0x20, - 0x26, 0xc0, 0x0b, 0xb0, 0x02, 0xe0, 0x80, 0xb9, - 0x80, 0x2e, 0xc0, 0x8b, 0xa0, 0x02, 0x2c, 0x00, - 0x89, 0x88, 0x2e, 0x90, 0x0b, 0x30, 0x22, 0x61, - 0x08, 0xbb, 0x00, 0x26, 0xc0, 0x1b, 0xb0, 0x46, - 0xe8, 0x40, 0x88, 0x08, 0x2e, 0xc0, 0x0b, 0x88, - 0x00, 0xb0, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, - 0x41, 0x15, 0xec, 0x00, 0xdb, 0x00, 0x32, 0xc0, - 0x0f, 0xb0, 0x03, 0xec, 0x01, 0xcb, 0x00, 0x36, - 0xc0, 0x0d, 0xb0, 0x03, 0xec, 0x04, 0xcb, 0x08, - 0x96, 0x26, 0x0f, 0xb8, 0x83, 0xed, 0x20, 0xe8, - 0xa0, 0x3e, 0xc0, 0x0d, 0xed, 0x09, 0x00, 0x8c, - 0x00, 0x84, 0x03, 0x6c, 0x00, 0xd8, 0x80, 0x2e, - 0xa0, 0x0e, 0xb0, 0x03, 0x66, 0x04, 0xfb, 0x00, - 0x32, 0xc0, 0x0b, 0xb0, 0x03, 0xc2, 0x00, 0xe8, - 0x80, 0x3e, 0xc0, 0x1f, 0x9c, 0x01, 0x90, 0x04, - 0x70, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0xbc, - 0x00, 0xff, 0x00, 0xbf, 0x40, 0x0f, 0xf0, 0x83, - 0xbc, 0x00, 0xff, 0x00, 0x37, 0xc0, 0x0f, 0xf0, - 0x23, 0xfc, 0x00, 0xf7, 0x80, 0x3b, 0x20, 0x0f, - 0xfa, 0x03, 0xfe, 0x10, 0xfd, 0x00, 0x3d, 0xc0, - 0x0c, 0xfc, 0x43, 0x9c, 0x00, 0xfc, 0x01, 0x3b, - 0xf0, 0x0f, 0xf0, 0x23, 0xb6, 0x40, 0xf7, 0x01, - 0x33, 0xc0, 0x0f, 0xf0, 0x03, 0xf4, 0x00, 0xfe, - 0x94, 0x3e, 0xc8, 0x4d, 0x50, 0x03, 0x78, 0x00, - 0x60, 0x00, 0x00, 0x00, 0x00, 0x40, 0x10, 0xac, - 0x00, 0xf9, 0x00, 0x32, 0xc0, 0x0c, 0xb8, 0x03, - 0xec, 0x00, 0xcb, 0x00, 0x3e, 0xe0, 0x0f, 0xb0, - 0x83, 0x2c, 0x00, 0xeb, 0x00, 0x32, 0xc0, 0x0f, - 0xb0, 0x03, 0x60, 0x80, 0xc8, 0x40, 0x3e, 0xc4, - 0x0e, 0x94, 0x03, 0x2c, 0x00, 0xf9, 0x40, 0x3a, - 0xd0, 0x0f, 0xb0, 0x03, 0xe5, 0x04, 0xeb, 0x00, - 0x32, 0xc1, 0x0f, 0xb1, 0x03, 0x6c, 0x20, 0xfa, - 0x41, 0x7e, 0xc0, 0x2c, 0xb0, 0x03, 0xd0, 0x04, - 0x20, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x05, 0x2c, - 0x00, 0xbb, 0x00, 0x22, 0xc0, 0x08, 0xf4, 0x02, - 0xec, 0x00, 0x8b, 0x00, 0x2f, 0xc0, 0x0b, 0xf6, - 0x02, 0x3e, 0x00, 0x8b, 0x80, 0x22, 0xd0, 0x0b, - 0xb0, 0x02, 0x20, 0x14, 0xa9, 0x00, 0x2f, 0xe0, - 0x1b, 0x3d, 0x82, 0x3e, 0x20, 0xb9, 0x09, 0x2e, - 0xc0, 0x48, 0xf0, 0x02, 0xec, 0x00, 0xbf, 0x5b, - 0x23, 0xe0, 0x1b, 0xfd, 0x02, 0xec, 0x80, 0xba, - 0x00, 0x22, 0xd4, 0x08, 0xb0, 0x02, 0xf2, 0x00, - 0x40, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x04, 0xed, - 0x09, 0x00, 0x8d, 0x00, 0x4c, 0x00, 0xb3, 0x00, - 0x20, 0xc0, 0x48, 0x34, 0x02, 0xec, 0x00, 0x83, - 0x00, 0x2c, 0xc0, 0xcb, 0x30, 0x00, 0x2e, 0x04, - 0x83, 0x82, 0xac, 0x0c, 0x0b, 0x30, 0x02, 0x00, - 0x01, 0x80, 0x04, 0x2c, 0xc8, 0x0a, 0x00, 0x02, - 0x0f, 0x80, 0xb8, 0x20, 0x6c, 0x80, 0x0a, 0x30, - 0x42, 0xc8, 0x08, 0xa3, 0x80, 0xa0, 0xe0, 0x0b, - 0x3c, 0x02, 0x83, 0x00, 0xb0, 0x06, 0x28, 0xc0, - 0x18, 0x00, 0x20, 0xf8, 0x00, 0x50, 0x00, 0x00, - 0x00, 0x00, 0xb0, 0x10, 0x5e, 0x00, 0xbd, 0x80, - 0xa3, 0xe0, 0x08, 0x78, 0x02, 0xde, 0x00, 0x87, - 0x80, 0x2d, 0xe0, 0x0b, 0x78, 0x0a, 0x1f, 0x28, - 0xa0, 0x80, 0x2d, 0xe0, 0x0b, 0x68, 0x22, 0x72, - 0x00, 0xa4, 0x80, 0x2d, 0xe4, 0x0b, 0x58, 0x02, - 0x1e, 0x00, 0xb7, 0x81, 0x2d, 0xe0, 0x08, 0x78, - 0x02, 0xda, 0x41, 0xb3, 0xb0, 0x21, 0xe2, 0x03, - 0x79, 0x00, 0xde, 0x00, 0xbe, 0x82, 0x21, 0x60, - 0x58, 0x78, 0x02, 0xc8, 0x00, 0x40, 0x00, 0x00, - 0x00, 0x00, 0x48, 0x08, 0x4c, 0x40, 0xf3, 0x00, - 0x30, 0x40, 0x0c, 0x31, 0x03, 0xcc, 0x00, 0xc3, - 0x00, 0x3c, 0xc0, 0x0f, 0xb0, 0x03, 0x0c, 0x00, - 0xe3, 0x09, 0x38, 0x00, 0x8f, 0xb0, 0x01, 0x0c, - 0x00, 0xc1, 0x04, 0x3c, 0xc1, 0x1e, 0x36, 0x23, - 0x0c, 0x40, 0xf2, 0x00, 0x3e, 0xc4, 0x0e, 0x31, - 0x03, 0xc8, 0x40, 0xe3, 0x30, 0x30, 0xc0, 0x0b, - 0x30, 0x03, 0x44, 0x10, 0xf2, 0x00, 0x78, 0x40, - 0x2c, 0x04, 0x43, 0xd2, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x40, 0x15, 0xbc, 0x00, 0xff, 0x00, - 0x3f, 0xc4, 0x2b, 0xf0, 0x03, 0xfc, 0x00, 0xff, - 0x00, 0x3f, 0xd0, 0x0f, 0xf0, 0x0b, 0xfc, 0x08, - 0xdf, 0x02, 0x33, 0xc4, 0x0f, 0xf0, 0x03, 0xbc, - 0x08, 0xff, 0x00, 0x3f, 0xc0, 0x0f, 0xf0, 0x03, - 0xfc, 0x20, 0xed, 0x09, 0x00, 0x8e, 0x00, 0xff, - 0x10, 0x37, 0xc0, 0x0e, 0xf4, 0x03, 0xfc, 0x40, - 0xff, 0x31, 0x3f, 0xc0, 0x8f, 0xf0, 0x46, 0xfc, - 0x00, 0xf6, 0x10, 0x3f, 0x44, 0x0f, 0xf1, 0x03, - 0xd0, 0x06, 0x60, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x04, 0xac, 0x00, 0xfb, 0x80, 0xb2, 0xc0, 0x2c, - 0xb6, 0x03, 0xec, 0x00, 0xfb, 0x00, 0x3e, 0xc8, - 0x0f, 0xb2, 0x83, 0xed, 0x10, 0x8b, 0x04, 0x3e, - 0xe0, 0x0d, 0x90, 0x03, 0x0e, 0x10, 0xc9, 0x02, - 0x3a, 0xfc, 0x0c, 0xa0, 0x03, 0xec, 0x00, 0xdb, - 0x80, 0x1a, 0x00, 0x0f, 0xb1, 0x03, 0xec, 0x00, - 0xcb, 0x08, 0x32, 0xc4, 0x0f, 0xb0, 0x03, 0xa8, - 0x01, 0xf8, 0x00, 0x32, 0x40, 0x07, 0x80, 0x03, - 0xea, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0xc8, - 0x98, 0x9c, 0x00, 0xbf, 0x00, 0x21, 0xc0, 0x08, - 0x76, 0xb2, 0xdc, 0x00, 0xb7, 0x00, 0x2d, 0xd0, - 0x0b, 0x70, 0x13, 0x9d, 0xa0, 0xa7, 0x00, 0x2d, - 0xc0, 0x08, 0x30, 0x20, 0x1c, 0x00, 0xa7, 0x04, - 0x2f, 0xca, 0x08, 0x70, 0x02, 0xdc, 0x00, 0xb7, - 0x02, 0x19, 0xc1, 0x0f, 0x70, 0x02, 0xf4, 0x00, - 0x83, 0x41, 0x21, 0xc0, 0x8b, 0x74, 0x02, 0x9c, - 0x00, 0xf6, 0x00, 0x21, 0xc0, 0x0b, 0x50, 0x02, - 0xd2, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x20, - 0x00, 0x1e, 0x00, 0xb7, 0x80, 0x21, 0xe0, 0x0a, - 0x78, 0x02, 0xde, 0x00, 0xb7, 0x80, 0x2d, 0xe8, - 0x0b, 0x79, 0x02, 0x9e, 0x00, 0xa7, 0xc0, 0x2d, - 0xe0, 0x0b, 0x78, 0x4e, 0x3e, 0x00, 0x85, 0x80, - 0x29, 0xe0, 0x0a, 0x7c, 0x02, 0xde, 0x00, 0xb3, - 0x80, 0x61, 0xe2, 0x0b, 0x78, 0x32, 0xdb, 0x01, - 0x87, 0xa0, 0x21, 0xe8, 0x19, 0x7a, 0x06, 0x1e, - 0x10, 0xb6, 0xc2, 0x21, 0xe0, 0x0b, 0x68, 0x02, - 0xf0, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x68, - 0x04, 0x8c, 0x00, 0xb1, 0x00, 0xed, 0x09, 0x00, - 0x8f, 0x00, 0x22, 0x40, 0x0a, 0x30, 0x02, 0xcc, - 0x00, 0xb3, 0x00, 0x2c, 0xc0, 0x0b, 0x30, 0x02, - 0xac, 0x08, 0xa3, 0x00, 0x2c, 0xc6, 0x0b, 0x34, - 0x02, 0x0c, 0x48, 0xa3, 0x30, 0x2c, 0xc0, 0x4a, - 0x38, 0x02, 0xcc, 0x00, 0xb3, 0x24, 0x2c, 0xe0, - 0x4a, 0x30, 0x02, 0xcf, 0x89, 0x83, 0x01, 0x24, - 0xc0, 0x0b, 0x30, 0x02, 0x8c, 0x28, 0xb3, 0x00, - 0x22, 0xe4, 0x8b, 0x38, 0x02, 0xd2, 0x04, 0x30, - 0x00, 0x00, 0x00, 0x00, 0xe0, 0x15, 0xe8, 0x00, - 0xfa, 0x00, 0x32, 0x80, 0x0e, 0xa0, 0x03, 0xe8, - 0x04, 0xfa, 0x00, 0x3e, 0x80, 0x0f, 0xa0, 0x03, - 0xe8, 0x04, 0xce, 0xc0, 0x3f, 0xa0, 0x0f, 0xee, - 0x02, 0x39, 0x00, 0xce, 0x00, 0x3a, 0x80, 0x4e, - 0xe1, 0x03, 0xe8, 0x00, 0x9e, 0x00, 0x3b, 0x90, - 0x03, 0xa0, 0x02, 0xfb, 0x02, 0xca, 0x05, 0xb2, - 0x80, 0x0f, 0xa0, 0x01, 0x98, 0x01, 0xbe, 0x40, - 0xb2, 0x80, 0x0f, 0xee, 0x03, 0xfa, 0x04, 0x60, - 0x00, 0x00, 0x00, 0x00, 0x48, 0x01, 0xa0, 0x00, - 0xf8, 0x00, 0x3e, 0x00, 0x0d, 0x80, 0x03, 0xe0, - 0x00, 0xf8, 0x01, 0x1e, 0x00, 0x0f, 0x80, 0x03, - 0xa0, 0x00, 0xf8, 0x24, 0x2e, 0x00, 0x0c, 0x80, - 0x83, 0xe0, 0x00, 0xf8, 0x00, 0x3e, 0x10, 0x29, - 0x84, 0x03, 0xe0, 0x10, 0xf8, 0x10, 0x3a, 0x20, - 0x0f, 0x80, 0x03, 0xe0, 0x00, 0xf8, 0x02, 0x3a, - 0x00, 0x0f, 0x80, 0x13, 0xe0, 0x40, 0xe8, 0x80, - 0x7e, 0x00, 0x0f, 0x82, 0x07, 0xd2, 0x00, 0x30, - 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0xa4, 0x00, - 0xf9, 0x00, 0x3e, 0x40, 0x82, 0x90, 0x03, 0x64, - 0x00, 0xe9, 0x00, 0x3e, 0x40, 0x0f, 0x10, 0x03, - 0x64, 0x00, 0xe9, 0x80, 0x3e, 0x44, 0x0f, 0x10, - 0x0a, 0xa4, 0x20, 0xf9, 0x00, 0x3e, 0x40, 0x0d, - 0x9c, 0x03, 0xe4, 0x80, 0xf9, 0x84, 0x3e, 0x40, - 0xed, 0x09, 0x00, 0x90, 0x00, 0x0f, 0x90, 0x03, - 0xe4, 0x00, 0xc1, 0x40, 0xb6, 0x64, 0x0f, 0x90, - 0x03, 0x24, 0x80, 0xc9, 0x00, 0x32, 0x40, 0x48, - 0x90, 0x63, 0xc2, 0x04, 0x30, 0x00, 0x00, 0x00, - 0x00, 0x80, 0x04, 0x64, 0x00, 0xb9, 0x00, 0x2e, - 0x40, 0x08, 0x10, 0x02, 0x24, 0x00, 0xb9, 0x00, - 0x2e, 0x40, 0x09, 0x94, 0x02, 0x24, 0x00, 0xd9, - 0x80, 0x2e, 0x60, 0x8b, 0x90, 0x02, 0x64, 0x40, - 0xb9, 0x04, 0x2e, 0x40, 0x09, 0x9c, 0x42, 0xe6, - 0x00, 0x39, 0x89, 0x2c, 0x40, 0x08, 0x90, 0x02, - 0xe4, 0x00, 0xa9, 0x00, 0x22, 0x60, 0x0b, 0x19, - 0x22, 0x24, 0x00, 0x89, 0x00, 0x3a, 0x50, 0x68, - 0x90, 0x02, 0xe0, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x00, 0x38, 0x05, 0x24, 0x00, 0xb9, 0x00, 0x2e, - 0x40, 0x08, 0x98, 0x02, 0x64, 0x00, 0xb9, 0x00, - 0x2e, 0x60, 0x1b, 0x98, 0x8a, 0x26, 0x00, 0x89, - 0x10, 0x2e, 0x40, 0x4a, 0x90, 0x02, 0x64, 0x08, - 0xb9, 0x00, 0x6e, 0x40, 0x09, 0x90, 0x02, 0xe4, - 0x00, 0xa9, 0x11, 0x2e, 0x40, 0x0b, 0x90, 0x02, - 0x44, 0x00, 0xa9, 0x00, 0x22, 0x42, 0x09, 0x90, - 0x02, 0x65, 0x04, 0x81, 0x00, 0x26, 0x50, 0x08, - 0x90, 0x02, 0xc6, 0x00, 0x40, 0x00, 0x00, 0x00, - 0x00, 0x28, 0x14, 0x04, 0x00, 0xb1, 0x00, 0x2c, - 0x40, 0x28, 0x12, 0xa2, 0x04, 0x00, 0xb1, 0x00, - 0x6c, 0x4a, 0x0b, 0x12, 0x82, 0x04, 0xa4, 0x91, - 0x28, 0x2c, 0x40, 0x1b, 0x16, 0x82, 0x46, 0x00, - 0xb1, 0x00, 0x2c, 0xc0, 0x81, 0x30, 0x02, 0xc5, - 0x00, 0xb1, 0x28, 0x2e, 0x40, 0x28, 0x14, 0x06, - 0xc5, 0x00, 0xa3, 0x00, 0x60, 0x40, 0x4b, 0x10, - 0x02, 0x64, 0x00, 0x81, 0x40, 0x28, 0x50, 0x0a, - 0x10, 0x02, 0xc2, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xf8, 0x0d, 0x60, 0x00, 0xf8, 0x00, 0x3c, - 0x00, 0x08, 0xa2, 0xed, 0x09, 0x00, 0x91, 0x00, - 0x03, 0x60, 0x00, 0xe8, 0x00, 0x3e, 0x08, 0x0f, - 0x82, 0x03, 0x08, 0x80, 0xc8, 0x20, 0x3e, 0x00, - 0x0f, 0x82, 0x07, 0x20, 0x00, 0xf8, 0x00, 0x3e, - 0x00, 0x0d, 0x80, 0x43, 0xe0, 0x00, 0xe8, 0x20, - 0x3e, 0x00, 0x2f, 0x80, 0x02, 0xe0, 0x02, 0xe8, - 0x00, 0x32, 0x00, 0x0f, 0x80, 0x03, 0x60, 0x02, - 0xc0, 0x00, 0x36, 0x00, 0x0c, 0x80, 0x03, 0xee, - 0x03, 0x50, 0x00, 0x00, 0x00, 0x00, 0x98, 0x95, - 0xe4, 0x00, 0xfd, 0x28, 0x3f, 0x4a, 0x0d, 0x90, - 0x03, 0xe4, 0xa0, 0xf9, 0x00, 0x16, 0x40, 0x0d, - 0x92, 0x83, 0xe4, 0xa0, 0xfd, 0x00, 0x3d, 0x40, - 0x0f, 0xd0, 0x03, 0x34, 0xa0, 0xfd, 0x40, 0x3e, - 0x5a, 0x4f, 0xd2, 0x83, 0xe5, 0x00, 0xfd, 0x28, - 0x3f, 0x4a, 0x0f, 0x94, 0x03, 0xf5, 0x08, 0xd9, - 0x40, 0x3e, 0x50, 0x0f, 0x14, 0x0b, 0xb4, 0x00, - 0xfd, 0x00, 0x3b, 0x50, 0x0d, 0xd4, 0x13, 0xe6, - 0x06, 0x70, 0x00, 0x00, 0x00, 0x00, 0x18, 0x11, - 0xe4, 0x00, 0xfb, 0x10, 0x3e, 0xc0, 0x0f, 0xd2, - 0x83, 0xe4, 0x44, 0xf9, 0x01, 0x3f, 0x40, 0x0c, - 0xd1, 0x0b, 0xb4, 0x90, 0xcd, 0x28, 0x33, 0x41, - 0x0e, 0x90, 0x23, 0x34, 0x10, 0xf9, 0x00, 0x3f, - 0x40, 0x0d, 0xd0, 0x0b, 0x74, 0xc0, 0xfd, 0x00, - 0x3e, 0x40, 0x0f, 0x90, 0x03, 0xe4, 0x00, 0xbd, - 0x04, 0x35, 0x48, 0x1e, 0xd2, 0x83, 0x34, 0x01, - 0xd9, 0x00, 0x73, 0x40, 0x0e, 0x90, 0x23, 0xc6, - 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, - 0xe0, 0x00, 0xb8, 0x00, 0x0e, 0x0a, 0x0b, 0x80, - 0x02, 0xe0, 0x80, 0xb8, 0x00, 0x2e, 0x01, 0x08, - 0x81, 0x06, 0xa0, 0xa0, 0x8a, 0x00, 0x22, 0x00, - 0x88, 0x86, 0x02, 0x20, 0x20, 0xba, 0x10, 0x2e, - 0x0a, 0x1b, 0x02, 0x02, 0xa0, 0x80, 0xba, 0x49, - 0x2e, 0x00, 0x09, 0x84, 0x8a, 0x20, 0xed, 0x09, - 0x00, 0x92, 0x00, 0x24, 0xb8, 0x10, 0x22, 0x01, - 0x0d, 0x80, 0x0a, 0xa0, 0x04, 0xb8, 0x0a, 0x62, - 0x02, 0x28, 0x81, 0x02, 0xce, 0x04, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x48, 0x00, 0x84, 0x00, 0xb1, - 0x00, 0x2c, 0x48, 0x0b, 0x10, 0x02, 0xc4, 0x80, - 0xb1, 0x04, 0x24, 0x44, 0x08, 0x30, 0x42, 0x84, - 0xc0, 0x81, 0x02, 0x0a, 0x41, 0x0a, 0x13, 0x82, - 0xc4, 0x00, 0xa1, 0x00, 0x24, 0x4c, 0x0b, 0x12, - 0x82, 0x04, 0xc0, 0xb1, 0x30, 0x2c, 0x4a, 0x0b, - 0x13, 0x02, 0x04, 0x4c, 0x91, 0x00, 0x28, 0x44, - 0x8a, 0x10, 0x00, 0x84, 0x00, 0xb1, 0x20, 0xa0, - 0x44, 0x00, 0x10, 0x02, 0xc2, 0x01, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x98, 0x04, 0xa4, 0x00, 0xb9, - 0x00, 0x2e, 0x48, 0x0b, 0x90, 0x02, 0x64, 0x00, - 0xb9, 0x00, 0x2e, 0x40, 0x68, 0x90, 0x06, 0xa4, - 0x00, 0x89, 0x00, 0xa2, 0x44, 0x00, 0x94, 0x02, - 0xec, 0x20, 0xb9, 0x00, 0x6e, 0x40, 0x8b, 0xb0, - 0x02, 0xe4, 0x00, 0xb9, 0x20, 0x6e, 0x58, 0x09, - 0x90, 0x02, 0x24, 0x00, 0xb9, 0x04, 0xaa, 0x40, - 0x09, 0x90, 0x00, 0xa4, 0x20, 0xb9, 0x40, 0x20, - 0x60, 0x0a, 0x98, 0x02, 0xc6, 0x04, 0x60, 0x00, - 0x00, 0x00, 0x00, 0xa0, 0x05, 0xe4, 0x00, 0xf9, - 0x80, 0x3e, 0x40, 0x0f, 0x90, 0x03, 0xe4, 0x00, - 0xf9, 0x00, 0x3e, 0x40, 0x0c, 0x90, 0x02, 0xa4, - 0x04, 0x49, 0x84, 0x38, 0x48, 0x0e, 0x91, 0x0b, - 0xe4, 0x10, 0xf9, 0x00, 0x3e, 0x40, 0x09, 0x9c, - 0x83, 0x64, 0x00, 0xf9, 0x02, 0x3e, 0x60, 0x07, - 0x90, 0x03, 0xa4, 0x20, 0xf9, 0x00, 0x3a, 0x40, - 0x0a, 0x90, 0x03, 0xa4, 0x40, 0xb9, 0x80, 0x22, - 0x40, 0x0e, 0x92, 0x01, 0xe8, 0x04, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x48, 0x01, 0xa4, 0x00, 0xf9, - 0x20, 0x3e, 0x40, 0x0f, 0x90, 0x03, 0xe4, 0x00, - 0xf9, 0xed, 0x09, 0x00, 0x93, 0x00, 0x00, 0x3e, - 0x40, 0x0f, 0x90, 0x43, 0xc4, 0x22, 0xf1, 0x20, - 0x3e, 0x40, 0xcf, 0x10, 0x03, 0x24, 0x40, 0xf9, - 0x40, 0x3e, 0x40, 0x0f, 0x91, 0x03, 0xa4, 0x00, - 0xf9, 0x88, 0x3e, 0x40, 0x0f, 0x90, 0x23, 0xa4, - 0x48, 0xf9, 0x00, 0x36, 0x40, 0x0f, 0x10, 0x02, - 0xe6, 0x00, 0xf9, 0x20, 0x3e, 0x43, 0x0d, 0x90, - 0x03, 0xca, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, - 0x08, 0x00, 0xa0, 0x00, 0xf8, 0x00, 0x3e, 0x00, - 0x0f, 0x88, 0x03, 0x20, 0x00, 0xf8, 0x00, 0x3a, - 0x00, 0x0e, 0x82, 0x13, 0x60, 0x00, 0xc8, 0x40, - 0x3e, 0x20, 0x0f, 0x80, 0x03, 0x60, 0x00, 0xd8, - 0x00, 0x3e, 0x04, 0x0f, 0x84, 0xc3, 0x20, 0x00, - 0xf8, 0x40, 0x26, 0x10, 0x8e, 0x80, 0x43, 0xe1, - 0x00, 0xf8, 0x00, 0xb6, 0x20, 0x0c, 0x80, 0x43, - 0xa0, 0x40, 0xf8, 0x04, 0x32, 0x00, 0x08, 0x80, - 0x03, 0xca, 0x04, 0x20, 0x00, 0x00, 0x00, 0x00, - 0x28, 0x15, 0xa8, 0x00, 0x9a, 0x00, 0x2e, 0x80, - 0x0b, 0xe4, 0x02, 0x28, 0x04, 0xba, 0x00, 0x18, - 0x80, 0x08, 0xe4, 0x02, 0x39, 0x00, 0x8a, 0x80, - 0x6f, 0xb2, 0x0b, 0xa0, 0x02, 0x38, 0x82, 0x8a, - 0x00, 0x2f, 0x94, 0x0b, 0xe0, 0x03, 0x78, 0x80, - 0xbe, 0x00, 0x4e, 0x80, 0x08, 0xa0, 0x03, 0xa8, - 0x00, 0xb6, 0xa0, 0x21, 0x90, 0x88, 0xe0, 0x43, - 0x7a, 0x00, 0xba, 0x02, 0x23, 0xb0, 0x0a, 0xa0, - 0x02, 0xca, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x28, 0x04, 0x4c, 0x00, 0xb3, 0x00, 0x2c, 0xc0, - 0x0b, 0x18, 0x02, 0x0c, 0x00, 0x93, 0x00, 0x28, - 0x60, 0x08, 0xb0, 0x02, 0x0e, 0x02, 0xa1, 0x12, - 0x2c, 0xc0, 0x0b, 0x30, 0x10, 0x0c, 0x28, 0xa3, - 0x00, 0x2c, 0xc0, 0x09, 0xbd, 0x02, 0x0e, 0x00, - 0xb3, 0x90, 0x2c, 0xc0, 0x09, 0xb0, 0x02, 0x8c, - 0x00, 0xb3, 0x88, 0x20, 0xed, 0x09, 0x00, 0x94, - 0x00, 0xe0, 0x1a, 0x39, 0x02, 0x0c, 0x00, 0xbb, - 0x00, 0x20, 0x40, 0x22, 0x30, 0x02, 0xca, 0x00, - 0x50, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x5c, - 0x00, 0x97, 0x00, 0x2d, 0xc0, 0x0b, 0x7c, 0x02, - 0x9c, 0x00, 0xb7, 0x00, 0x28, 0xd0, 0x08, 0x70, - 0x02, 0x1d, 0x00, 0xa7, 0x00, 0x2d, 0x00, 0x0b, - 0x73, 0x02, 0x1e, 0x00, 0x87, 0x00, 0x0d, 0xc0, - 0x0b, 0x70, 0x22, 0x58, 0x00, 0x37, 0x01, 0x2f, - 0xe0, 0x0b, 0x71, 0x02, 0x9c, 0x04, 0xb3, 0x01, - 0x21, 0xc2, 0x1a, 0x70, 0x02, 0xdc, 0x00, 0xb7, - 0x00, 0x01, 0x02, 0x0a, 0x70, 0x02, 0xe8, 0x00, - 0x40, 0x00, 0x00, 0x00, 0x00, 0x88, 0x80, 0x5e, - 0x00, 0xf7, 0xf0, 0x3d, 0xe4, 0x0f, 0x38, 0x0b, - 0x1e, 0x20, 0xd7, 0x80, 0x39, 0xe0, 0x2c, 0x38, - 0x03, 0x0e, 0x00, 0xe7, 0x82, 0x2d, 0x60, 0x4f, - 0x3b, 0x0b, 0x7e, 0x00, 0xc7, 0x80, 0x0d, 0xe0, - 0x0f, 0x78, 0x13, 0x16, 0x10, 0xf7, 0x81, 0x2d, - 0xe2, 0x2e, 0x7a, 0x03, 0x9e, 0xa8, 0xf7, 0x80, - 0x31, 0xa0, 0x0e, 0x78, 0x03, 0x1e, 0x00, 0xff, - 0xe8, 0xa3, 0x20, 0x0c, 0x78, 0x03, 0xea, 0x02, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x1d, 0xac, - 0x00, 0xdb, 0x00, 0x3e, 0xc4, 0x0f, 0xb0, 0x03, - 0x6d, 0x80, 0x7b, 0x00, 0x3e, 0xc0, 0x0f, 0xb0, - 0x0b, 0xac, 0x00, 0xd9, 0x00, 0x3e, 0x00, 0x0f, - 0xb2, 0x03, 0xec, 0x00, 0xeb, 0x01, 0x3e, 0xc0, - 0x0f, 0xb0, 0x00, 0xe0, 0x00, 0xfb, 0x00, 0x3c, - 0xd0, 0x4c, 0xb4, 0x83, 0xad, 0x00, 0xd8, 0x00, - 0x3a, 0x80, 0x6d, 0x30, 0x27, 0x68, 0x00, 0xfb, - 0x20, 0x3e, 0x40, 0x0f, 0xb0, 0x03, 0xc2, 0x06, - 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0xbe, - 0x00, 0xff, 0x80, 0x3f, 0xe0, 0x0f, 0xf8, 0x03, - 0xfe, 0x20, 0xff, 0x80, 0x3f, 0xe0, 0x0f, 0xed, - 0x09, 0x00, 0x95, 0x00, 0xf0, 0x03, 0x7e, 0x04, - 0xd7, 0x80, 0x33, 0x20, 0x0d, 0xf8, 0x03, 0x3e, - 0x00, 0xff, 0x80, 0x7f, 0xe4, 0x4f, 0xf9, 0x23, - 0xfe, 0x00, 0xff, 0x02, 0x3f, 0xe2, 0x0d, 0xf9, - 0x03, 0x3e, 0x20, 0xcf, 0x80, 0xf3, 0xe1, 0x8d, - 0xf8, 0x03, 0xfe, 0x50, 0xff, 0x80, 0x3f, 0xe0, - 0x0e, 0xf8, 0x03, 0xc0, 0x00, 0x70, 0x00, 0x00, - 0x00, 0x00, 0xa9, 0x08, 0x9c, 0x00, 0xb7, 0x00, - 0x2d, 0xc0, 0x0e, 0x74, 0x02, 0xdc, 0x00, 0xb7, - 0x00, 0x2d, 0x40, 0x0b, 0x76, 0x12, 0xdc, 0x00, - 0xb7, 0x00, 0x21, 0x00, 0x0b, 0x70, 0x82, 0x1c, - 0x00, 0xb7, 0x18, 0x2d, 0x10, 0x0a, 0x73, 0x03, - 0x90, 0x00, 0xb7, 0x00, 0x2f, 0xc0, 0x09, 0x70, - 0x03, 0x5c, 0x40, 0xa7, 0x00, 0x21, 0xd8, 0x08, - 0x76, 0x02, 0x5c, 0x40, 0xb7, 0x00, 0x2f, 0xc0, - 0x0a, 0x70, 0x02, 0xea, 0x04, 0x60, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x9c, 0x00, 0xb7, 0x00, - 0x2d, 0xc0, 0x0b, 0x50, 0x02, 0xdc, 0x00, 0xb7, - 0x00, 0x2d, 0xc0, 0x09, 0x71, 0x06, 0x5c, 0x40, - 0xb7, 0x00, 0x21, 0x00, 0x09, 0x70, 0x02, 0x10, - 0x00, 0xb7, 0x00, 0x2c, 0xc0, 0x0a, 0x70, 0x42, - 0xd4, 0x40, 0xb6, 0x00, 0x29, 0xc0, 0x08, 0x70, - 0x06, 0x0c, 0x00, 0x83, 0x00, 0x21, 0x00, 0x89, - 0x50, 0x12, 0xd4, 0x00, 0xb7, 0x40, 0x2d, 0xc0, - 0x08, 0x70, 0x02, 0xc0, 0x00, 0x20, 0x00, 0x00, - 0x00, 0x00, 0x20, 0x04, 0xcc, 0x00, 0xb3, 0x00, - 0x2c, 0xc0, 0x0a, 0x30, 0x02, 0xcc, 0x00, 0xb3, - 0x00, 0x0c, 0xc0, 0x0b, 0x30, 0x12, 0xcc, 0x00, - 0xb3, 0x0a, 0x20, 0x08, 0x0b, 0x30, 0x02, 0x80, - 0x00, 0xb3, 0x48, 0x2c, 0x00, 0x0a, 0x32, 0x02, - 0xa0, 0x10, 0xb0, 0x10, 0x2c, 0xc2, 0x09, 0x30, - 0x06, 0x0d, 0x20, 0xa0, 0x00, 0x20, 0x80, 0x08, - 0x10, 0x00, 0xed, 0x09, 0x00, 0x96, 0x00, 0x40, - 0x00, 0x3b, 0x10, 0x2c, 0xc0, 0x08, 0x30, 0x82, - 0xc8, 0x04, 0x30, 0x00, 0x00, 0x00, 0x00, 0xa8, - 0x15, 0xec, 0x00, 0xff, 0xa0, 0x3f, 0xe8, 0xcf, - 0xb0, 0x03, 0xfc, 0x00, 0xfb, 0x00, 0x3e, 0xc0, - 0x0d, 0xb0, 0x03, 0x6c, 0x00, 0x5b, 0x48, 0xb0, - 0x10, 0x8d, 0xf0, 0x07, 0x24, 0x00, 0xfb, 0xc0, - 0x3e, 0x40, 0x07, 0xbe, 0x03, 0xe0, 0x01, 0xf9, - 0xd0, 0x3b, 0xd0, 0x0c, 0xf0, 0x02, 0x3e, 0x00, - 0xcb, 0x01, 0x72, 0xc0, 0x8d, 0xb0, 0x03, 0xce, - 0x00, 0xbf, 0x00, 0x3e, 0xc0, 0x0e, 0xb4, 0x03, - 0xea, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x01, 0xac, 0x00, 0xfb, 0x00, 0x3e, 0xc0, 0x0f, - 0x90, 0x00, 0xec, 0x04, 0xfb, 0x02, 0x3c, 0xc0, - 0x0f, 0xb4, 0x03, 0xe8, 0x00, 0xf3, 0x00, 0x3e, - 0x14, 0x0f, 0xb0, 0x8b, 0x60, 0x10, 0xfb, 0x00, - 0x3e, 0x40, 0x2d, 0xb4, 0x03, 0xa1, 0x10, 0xf8, - 0x00, 0x3e, 0xc4, 0x0e, 0x30, 0x33, 0xec, 0x40, - 0xfb, 0x40, 0x3e, 0xd0, 0x0f, 0x84, 0x03, 0xe6, - 0x20, 0xfb, 0x00, 0x3e, 0xa0, 0x0f, 0xb8, 0x13, - 0xe0, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x21, - 0x10, 0xbc, 0x00, 0xff, 0x00, 0x3f, 0xc0, 0x0f, - 0x70, 0x07, 0x3c, 0x00, 0xff, 0x00, 0x3b, 0x40, - 0x0c, 0xf0, 0x03, 0xf4, 0x04, 0xff, 0x80, 0x33, - 0x24, 0x0d, 0xf0, 0x02, 0xf4, 0x08, 0xf7, 0x00, - 0x73, 0x00, 0x0f, 0xc0, 0x03, 0x70, 0x00, 0xcd, - 0x00, 0x3f, 0xc0, 0x0c, 0xb0, 0x03, 0x1c, 0x00, - 0xef, 0x00, 0x30, 0x80, 0x0c, 0xf8, 0x03, 0xfe, - 0x80, 0xcf, 0x00, 0x33, 0x90, 0x0e, 0xf0, 0x03, - 0xc0, 0x44, 0x30, 0x00, 0x00, 0x00, 0x00, 0xa1, - 0x04, 0x6c, 0x00, 0xbb, 0x00, 0x2e, 0xc0, 0x0b, - 0xb9, 0x02, 0x2c, 0x00, 0xbb, 0x00, 0x3e, 0xe4, - 0x08, 0xbc, 0x23, 0xad, 0x00, 0xed, 0x09, 0x00, - 0x97, 0x00, 0xbb, 0x80, 0x32, 0x28, 0x08, 0xb0, - 0x02, 0xe2, 0x00, 0xbb, 0x02, 0x22, 0x30, 0x4b, - 0x34, 0x62, 0x23, 0x00, 0x08, 0xe0, 0x26, 0xc0, - 0x08, 0xb0, 0x02, 0xec, 0x08, 0xa0, 0x90, 0x2a, - 0x84, 0x08, 0x81, 0x20, 0xe0, 0x00, 0x8b, 0x00, - 0x22, 0xc0, 0x0a, 0xb0, 0x02, 0xe0, 0x40, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x05, 0x2c, 0x00, - 0xbb, 0x00, 0x2e, 0xc0, 0x0b, 0xb0, 0x02, 0x2c, - 0x01, 0xbb, 0x00, 0x2e, 0xc0, 0x48, 0xb8, 0x42, - 0xec, 0x60, 0xb9, 0x20, 0x2a, 0x00, 0x0b, 0xb0, - 0x02, 0xe6, 0x00, 0xbb, 0x01, 0x2e, 0x60, 0x0b, - 0xb1, 0x02, 0x62, 0x20, 0x89, 0x82, 0x2c, 0xc0, - 0x08, 0xb0, 0x22, 0x2c, 0x08, 0x08, 0x40, 0x22, - 0x80, 0x08, 0xb0, 0x00, 0xec, 0x00, 0x8b, 0x00, - 0x20, 0xc0, 0x08, 0xb0, 0x02, 0xe0, 0x00, 0x40, - 0x00, 0x00, 0x00, 0x00, 0x0a, 0x04, 0x0c, 0x00, - 0xb3, 0x00, 0x2c, 0xc0, 0x1b, 0x30, 0x02, 0x0c, - 0x01, 0xb3, 0x00, 0x2c, 0xc0, 0x08, 0x30, 0x12, - 0x8c, 0x00, 0xb3, 0x00, 0x22, 0x00, 0x0a, 0x30, - 0x02, 0xc0, 0x00, 0xb3, 0x00, 0x20, 0x00, 0x0b, - 0xb0, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0xc0, - 0x08, 0x30, 0x12, 0x0c, 0x10, 0xa0, 0x00, 0x20, - 0x80, 0x08, 0x00, 0x42, 0x44, 0x00, 0x83, 0x01, - 0xa0, 0xc0, 0x0a, 0x30, 0x02, 0xc2, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x6c, 0x00, - 0xff, 0x00, 0x2f, 0xc0, 0x0f, 0xb0, 0x0a, 0x3c, - 0x00, 0xfb, 0x00, 0x3a, 0xc0, 0x2c, 0xb0, 0x03, - 0xec, 0x04, 0xfb, 0x00, 0xba, 0x00, 0x0f, 0x70, - 0x03, 0xe0, 0x10, 0xfb, 0x00, 0x1a, 0x00, 0x8f, - 0xb0, 0x03, 0x60, 0x02, 0xc8, 0x00, 0x3f, 0xc0, - 0x0c, 0xf0, 0x03, 0x3c, 0x00, 0xe8, 0x00, 0x32, - 0x80, 0x0c, 0x90, 0x03, 0xe4, 0x01, 0xcf, 0x00, - 0xed, 0x09, 0x00, 0x98, 0x00, 0x32, 0xc0, 0x0e, - 0xb0, 0x03, 0xc0, 0x03, 0x50, 0x00, 0x00, 0x00, - 0x00, 0xa1, 0x11, 0xfc, 0x00, 0xff, 0x00, 0x3f, - 0xc0, 0x0f, 0xc0, 0x23, 0xfc, 0x00, 0xff, 0x00, - 0x3b, 0x40, 0x0f, 0xc0, 0x03, 0xbc, 0x00, 0xfd, - 0x00, 0x3b, 0x00, 0x0d, 0xf0, 0x13, 0xf0, 0x00, - 0xff, 0x00, 0x3f, 0x00, 0x0f, 0xf0, 0x43, 0xf0, - 0x04, 0xfc, 0x01, 0x37, 0xc0, 0x0f, 0xf0, 0x03, - 0xfc, 0x00, 0xbc, 0x00, 0x3f, 0x80, 0x0f, 0xc0, - 0x03, 0xf0, 0x00, 0xff, 0x00, 0x3f, 0xc0, 0x0f, - 0xf0, 0x43, 0xe8, 0x06, 0x70, 0x00, 0x00, 0x00, - 0x00, 0xc0, 0x05, 0xfc, 0x00, 0xfd, 0x24, 0x33, - 0x41, 0x0f, 0xc2, 0x03, 0x34, 0x41, 0xfd, 0x00, - 0x3f, 0xc0, 0x0d, 0xc0, 0x02, 0x3c, 0x00, 0xf7, - 0x00, 0x3f, 0xc0, 0x0d, 0xf0, 0x03, 0xf4, 0x00, - 0xfc, 0x00, 0x37, 0x84, 0x0c, 0x60, 0x03, 0xb0, - 0xd0, 0x3c, 0x00, 0x3f, 0xc4, 0x07, 0xf0, 0x02, - 0xfc, 0x00, 0xff, 0x00, 0x33, 0x00, 0x0f, 0xc0, - 0xa3, 0xf0, 0x20, 0xcc, 0x60, 0x33, 0x10, 0x2d, - 0xc2, 0x23, 0x30, 0x00, 0x70, 0x00, 0x00, 0x00, - 0x00, 0x80, 0x10, 0xec, 0x00, 0xba, 0x10, 0x22, - 0xc0, 0x0b, 0x85, 0x02, 0x2c, 0x80, 0xbb, 0x00, - 0x2e, 0xc0, 0x0b, 0x80, 0x03, 0x6c, 0x00, 0xbb, - 0x20, 0x2c, 0x40, 0x08, 0xb0, 0x02, 0xe4, 0x00, - 0xba, 0x00, 0x22, 0x44, 0x08, 0xa0, 0x02, 0xe5, - 0x08, 0xb8, 0x50, 0x2f, 0xc8, 0x89, 0xb0, 0x12, - 0xec, 0x00, 0xb9, 0x00, 0x22, 0x54, 0x4b, 0xb4, - 0x02, 0xe5, 0x00, 0x89, 0x60, 0x22, 0x18, 0x08, - 0x90, 0x02, 0x20, 0x04, 0x30, 0x00, 0x00, 0x00, - 0x00, 0x88, 0x05, 0xcc, 0x00, 0xb1, 0x00, 0x20, - 0x40, 0x0b, 0x00, 0x02, 0x0c, 0x08, 0xb3, 0x00, - 0x2c, 0xc0, 0x48, 0x80, 0x42, 0x0c, 0x00, 0x93, - 0x08, 0x2c, 0x40, 0xed, 0x09, 0x00, 0x99, 0x00, - 0x09, 0x30, 0x02, 0xc0, 0x00, 0xba, 0x07, 0x20, - 0xc0, 0x89, 0x20, 0x02, 0x84, 0xc0, 0x90, 0x00, - 0x2c, 0xc0, 0x0b, 0x30, 0x02, 0xcc, 0x00, 0xbb, - 0x01, 0x24, 0x00, 0x0b, 0x02, 0x82, 0xc8, 0xa8, - 0x80, 0x40, 0x22, 0x8c, 0x08, 0x09, 0x02, 0x22, - 0x01, 0x60, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x15, - 0xac, 0x01, 0xbb, 0x20, 0xa2, 0x70, 0x0b, 0x98, - 0x02, 0x24, 0x10, 0xbb, 0x40, 0x2e, 0xc0, 0x1b, - 0x90, 0x02, 0x6c, 0x00, 0xbb, 0x10, 0x0e, 0x40, - 0x09, 0xb2, 0x00, 0xe1, 0x00, 0xba, 0x88, 0x20, - 0x50, 0x09, 0xa2, 0x02, 0xe6, 0x20, 0xb8, 0x88, - 0x2e, 0xc0, 0x09, 0xb0, 0x02, 0xec, 0x00, 0xb9, - 0x00, 0x26, 0x62, 0x0b, 0xb0, 0x12, 0xe0, 0x00, - 0x88, 0x10, 0x22, 0x0a, 0x08, 0x90, 0x02, 0x30, - 0x05, 0x20, 0x00, 0x00, 0x00, 0x00, 0x40, 0x15, - 0xec, 0x00, 0xf9, 0x84, 0x32, 0x30, 0x0f, 0x08, - 0x13, 0x2a, 0x30, 0xb8, 0x00, 0x2e, 0xc0, 0x0c, - 0xa0, 0x03, 0x2c, 0x00, 0xda, 0xa0, 0x3e, 0x40, - 0x0d, 0xb4, 0x82, 0xe4, 0x00, 0xf8, 0x80, 0x32, - 0x34, 0x0d, 0xae, 0x03, 0xa2, 0x10, 0xd9, 0xc0, - 0x3e, 0xc0, 0x0f, 0xb0, 0x41, 0xec, 0x00, 0xfa, - 0x00, 0x36, 0x30, 0x0f, 0x86, 0x03, 0xe0, 0x02, - 0xc8, 0x88, 0x32, 0x10, 0x2c, 0x88, 0x0b, 0x10, - 0x04, 0x70, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, - 0xbc, 0x00, 0xfc, 0x00, 0x3f, 0x80, 0x0f, 0xc0, - 0x03, 0xf7, 0x00, 0xff, 0x20, 0x3f, 0xc0, 0x0f, - 0xf9, 0x03, 0xfc, 0x00, 0x7e, 0x00, 0x3f, 0xc0, - 0x0e, 0xf8, 0x03, 0x7c, 0x01, 0xfe, 0x01, 0xbb, - 0xe0, 0x2e, 0xe8, 0x43, 0xf4, 0x00, 0xf9, 0x00, - 0x3f, 0xc2, 0x8f, 0xf0, 0x13, 0xfc, 0x00, 0x7d, - 0xc0, 0x3b, 0x41, 0x0f, 0xa9, 0x03, 0xfc, 0x00, - 0xf9, 0x80, 0xbf, 0x20, 0x0f, 0xec, 0xed, 0x09, - 0x00, 0x9a, 0x00, 0x03, 0xf8, 0x00, 0x60, 0x00, - 0x00, 0x00, 0x00, 0x40, 0x10, 0xac, 0x00, 0xf9, - 0x00, 0x32, 0x00, 0x0f, 0x90, 0x03, 0xe0, 0x20, - 0xfa, 0xc6, 0x36, 0xc0, 0x0e, 0xa0, 0x07, 0xec, - 0x00, 0xba, 0xc0, 0x3a, 0xc0, 0x0c, 0xb0, 0x03, - 0x21, 0x00, 0xfa, 0x08, 0x32, 0x40, 0x2c, 0xb6, - 0x03, 0xa5, 0x00, 0xc9, 0x44, 0x32, 0xc0, 0x4f, - 0xb0, 0x03, 0xec, 0x00, 0xfb, 0x00, 0x32, 0x10, - 0x0f, 0x84, 0x0b, 0x0c, 0x04, 0xe2, 0x00, 0x32, - 0x90, 0x0d, 0x00, 0x03, 0xd0, 0x04, 0x20, 0x00, - 0x00, 0x00, 0x00, 0xc8, 0x05, 0x2c, 0x00, 0xb1, - 0x00, 0x22, 0x34, 0x0b, 0x94, 0x02, 0xed, 0x01, - 0xbb, 0x80, 0x2e, 0xc0, 0x0b, 0x30, 0x02, 0xec, - 0x00, 0xba, 0x90, 0x36, 0xe2, 0x8d, 0xbd, 0x03, - 0x68, 0x00, 0xb2, 0x20, 0x36, 0xf8, 0x88, 0xb8, - 0x92, 0x25, 0x46, 0xa9, 0x00, 0x23, 0xd3, 0x0b, - 0xb0, 0x02, 0xec, 0x04, 0xb1, 0x00, 0x22, 0x40, - 0x4b, 0xa8, 0x02, 0x2e, 0x20, 0xba, 0x00, 0x20, - 0x08, 0x08, 0xa0, 0x02, 0xf2, 0x00, 0x40, 0x00, - 0x00, 0x00, 0x00, 0xe0, 0x05, 0x4c, 0x00, 0xb1, - 0x10, 0x20, 0x14, 0x0b, 0x30, 0x82, 0xca, 0x44, - 0xb1, 0x08, 0x2c, 0xc0, 0x0a, 0x00, 0x02, 0xcc, - 0x00, 0xb1, 0x00, 0x6a, 0xd2, 0x08, 0x20, 0x02, - 0x84, 0x00, 0xb2, 0x80, 0x20, 0x48, 0x88, 0x0c, - 0x02, 0x82, 0x40, 0xa1, 0x21, 0x20, 0xd0, 0x0b, - 0x30, 0x02, 0xcc, 0x00, 0x93, 0x00, 0x20, 0x40, - 0x0b, 0x00, 0x02, 0x02, 0x00, 0xa2, 0x00, 0x20, - 0x40, 0x08, 0x20, 0x02, 0xf8, 0x00, 0x50, 0x00, - 0x00, 0x00, 0x00, 0x20, 0x01, 0x1e, 0x00, 0xb2, - 0x80, 0x21, 0xa0, 0x0b, 0x78, 0x42, 0xde, 0x00, - 0xb7, 0x80, 0x2d, 0xe0, 0x0b, 0x48, 0x02, 0xde, - 0x00, 0xbd, 0x80, 0x2d, 0x40, 0x09, 0x79, 0x0a, - 0xd6, 0xed, 0x09, 0x00, 0x9b, 0x00, 0x00, 0xb6, - 0x80, 0xa4, 0x60, 0x08, 0x78, 0x02, 0x16, 0x02, - 0xa6, 0x10, 0x21, 0xe0, 0x8b, 0x78, 0x02, 0xde, - 0x00, 0xb7, 0x80, 0x21, 0x61, 0x83, 0x58, 0x82, - 0x16, 0x00, 0xb7, 0xc0, 0xa1, 0xe0, 0x08, 0x58, - 0x02, 0xc8, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, - 0x48, 0x08, 0x0c, 0x00, 0xf1, 0x00, 0x30, 0x00, - 0x0f, 0x34, 0x82, 0xc8, 0xc0, 0xb3, 0x00, 0x2c, - 0xc0, 0x0e, 0x20, 0x22, 0xcc, 0x48, 0xf3, 0x00, - 0x38, 0x44, 0x0c, 0x90, 0x83, 0x80, 0x00, 0xf2, - 0x10, 0x30, 0x44, 0xac, 0x01, 0x03, 0xa8, 0x44, - 0xc1, 0x10, 0xb0, 0xc0, 0x0f, 0x30, 0x03, 0xcc, - 0x40, 0xfb, 0x00, 0xb0, 0x88, 0x07, 0x21, 0x02, - 0x08, 0xc0, 0xe3, 0x00, 0x32, 0xc8, 0x0c, 0x20, - 0x23, 0xd2, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x40, 0x1d, 0xbc, 0x00, 0xff, 0x10, 0x3f, 0x00, - 0x0f, 0xf0, 0x03, 0xfc, 0x40, 0xff, 0x10, 0x7f, - 0xc0, 0x0f, 0xf0, 0x03, 0xfc, 0x00, 0xff, 0x00, - 0x37, 0x40, 0x2f, 0xf0, 0x03, 0x70, 0x00, 0xf6, - 0x10, 0x3f, 0x44, 0x0f, 0xf0, 0x51, 0xf8, 0x40, - 0xdf, 0x34, 0x3f, 0xc0, 0x0f, 0xf0, 0x03, 0xfc, - 0x10, 0xff, 0x00, 0x3f, 0x80, 0x0f, 0xf0, 0x03, - 0xf0, 0x40, 0xff, 0x10, 0x3f, 0xc0, 0x0e, 0xd0, - 0x13, 0xd0, 0x06, 0x60, 0x00, 0x00, 0x00, 0x00, - 0xa8, 0x05, 0xec, 0x00, 0xfb, 0x80, 0x32, 0x40, - 0x0f, 0x90, 0x03, 0xec, 0x04, 0xf1, 0x84, 0x32, - 0xc0, 0x0f, 0xa0, 0x03, 0xec, 0x00, 0xbb, 0x00, - 0x3e, 0x40, 0x0f, 0xa0, 0x1b, 0x86, 0x00, 0xca, - 0x81, 0x3e, 0xc0, 0x8f, 0x80, 0x03, 0xe8, 0x00, - 0xfb, 0x00, 0x2a, 0xc8, 0x0c, 0xb8, 0x01, 0x2c, - 0x00, 0xfa, 0x00, 0x3e, 0xc0, 0x0f, 0x90, 0x03, - 0xe0, 0x00, 0xf8, 0x00, 0x3e, 0x20, 0x0c, 0xb0, - 0x03, 0xea, 0x00, 0x70, 0xed, 0x09, 0x00, 0x9c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x11, 0x9c, - 0x00, 0xb2, 0x00, 0x21, 0xc0, 0x0b, 0x50, 0x22, - 0xdc, 0x00, 0xb5, 0x00, 0x21, 0xc0, 0x0e, 0x70, - 0x02, 0xdc, 0x00, 0xb7, 0x00, 0x2d, 0xc0, 0x88, - 0x70, 0x02, 0x1c, 0x00, 0x86, 0x00, 0x2d, 0xc0, - 0x0b, 0x70, 0x02, 0xdc, 0x00, 0xbe, 0x00, 0x23, - 0xca, 0x28, 0xf0, 0x13, 0x5c, 0x00, 0xb7, 0x00, - 0x2d, 0xc0, 0x0b, 0x50, 0x02, 0xdc, 0x00, 0xb5, - 0x00, 0x2d, 0x80, 0x08, 0x70, 0x02, 0xd2, 0x04, - 0x60, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x9e, - 0x00, 0xb7, 0x88, 0x21, 0xe0, 0x0b, 0x58, 0x02, - 0xde, 0x20, 0xbf, 0x80, 0x25, 0xe0, 0x0b, 0x68, - 0x02, 0xde, 0x00, 0xb7, 0x86, 0x2d, 0xc0, 0x8b, - 0x18, 0x02, 0xb2, 0x00, 0xa6, 0x00, 0x2d, 0xe2, - 0x0b, 0x58, 0x02, 0x9e, 0x00, 0xb7, 0x80, 0x2d, - 0xe4, 0x88, 0x78, 0x02, 0x1e, 0x00, 0xb7, 0x80, - 0x2d, 0xe0, 0x0b, 0x78, 0x02, 0xde, 0x00, 0xb7, - 0x80, 0x2c, 0xa0, 0x08, 0x78, 0x02, 0xf0, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x48, 0x14, 0xcc, - 0x00, 0xb3, 0x80, 0x24, 0xd8, 0x4b, 0x35, 0x02, - 0xcd, 0x00, 0xb3, 0x80, 0x20, 0xc0, 0x1b, 0x31, - 0x06, 0xcc, 0x00, 0xb3, 0x00, 0x2c, 0xe0, 0x08, - 0x30, 0x02, 0x0e, 0x00, 0xa3, 0x60, 0x2c, 0xc0, - 0x0b, 0x30, 0x02, 0xcd, 0x50, 0xb3, 0x00, 0x26, - 0xc0, 0x08, 0x30, 0x02, 0x4c, 0x00, 0xb3, 0x40, - 0x2c, 0xc0, 0x0b, 0x30, 0x02, 0xec, 0x50, 0xbb, - 0x80, 0x2c, 0x80, 0x68, 0x35, 0x02, 0xd2, 0x04, - 0x30, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x15, 0xa8, - 0x00, 0xfe, 0x80, 0xb3, 0xa0, 0x0f, 0xe8, 0x03, - 0xf9, 0x00, 0xfe, 0x40, 0xb6, 0x80, 0x0f, 0xec, - 0x03, 0xe8, 0x00, 0xfe, 0xe0, 0x3e, 0xa8, 0x0f, - 0xe0, 0x03, 0xbb, 0x00, 0xee, 0x40, 0x3f, 0xed, - 0x09, 0x00, 0x9d, 0x00, 0xa0, 0x0f, 0xe4, 0x03, - 0xba, 0x00, 0xfe, 0x40, 0x3e, 0x80, 0x0c, 0xa0, - 0x03, 0x28, 0x00, 0xfe, 0x00, 0x3f, 0xa8, 0x0f, - 0xe0, 0x03, 0xfa, 0x00, 0xfe, 0x00, 0x3f, 0x94, - 0x0c, 0xec, 0x03, 0xfa, 0x04, 0x60, 0x00, 0x00, - 0x00, 0x00, 0x48, 0x00, 0xe0, 0x00, 0xf8, 0x00, - 0x3a, 0x04, 0x0f, 0x80, 0x83, 0xe0, 0x20, 0xf8, - 0xd0, 0x3e, 0x00, 0x0e, 0x88, 0x03, 0xe0, 0x00, - 0xf8, 0x80, 0x3e, 0x00, 0x4f, 0x80, 0x03, 0xe2, - 0x42, 0x98, 0x04, 0x3e, 0x00, 0x0f, 0x8c, 0x00, - 0xe1, 0x20, 0xf8, 0x58, 0x3a, 0x10, 0x0f, 0x80, - 0x03, 0xe0, 0x04, 0xf8, 0x08, 0x3e, 0x20, 0x07, - 0x04, 0x17, 0xe2, 0x00, 0xf8, 0x10, 0x3e, 0x10, - 0x0f, 0x80, 0x83, 0xd2, 0x00, 0x30, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x10, 0xe4, 0x00, 0xf9, 0x00, - 0x3c, 0x40, 0x0e, 0x10, 0x0b, 0x24, 0x04, 0xf9, - 0xc0, 0x3e, 0x40, 0x0f, 0x90, 0x03, 0xe4, 0x00, - 0xf9, 0x00, 0x3c, 0x40, 0x0d, 0x1a, 0x03, 0xa4, - 0x00, 0xf1, 0x01, 0x22, 0x44, 0x0f, 0x90, 0x03, - 0xc4, 0x00, 0xc9, 0xa0, 0x36, 0x40, 0x0c, 0x90, - 0x03, 0xe4, 0x00, 0xf9, 0x00, 0x3e, 0x40, 0x0f, - 0x90, 0x83, 0x24, 0x04, 0xc9, 0x81, 0x32, 0x64, - 0x0f, 0x90, 0x03, 0xc2, 0x04, 0x30, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x04, 0x64, 0x00, 0xb9, 0x02, - 0x2e, 0x60, 0x08, 0x9e, 0x02, 0x25, 0x00, 0xb9, - 0x48, 0x2e, 0x40, 0x0b, 0x98, 0x02, 0xe4, 0x00, - 0xb9, 0xd0, 0x2e, 0x40, 0xac, 0x98, 0x02, 0xa4, - 0x00, 0xb9, 0x04, 0x2a, 0x40, 0x1b, 0x9c, 0x02, - 0xe4, 0x02, 0x89, 0x20, 0x22, 0x40, 0x28, 0x90, - 0x02, 0xe4, 0x00, 0xe9, 0x00, 0x2e, 0x40, 0x0b, - 0x93, 0x02, 0x24, 0x00, 0x89, 0x40, 0xa2, 0x40, - 0x0b, 0x90, 0x02, 0xe0, 0x00, 0x10, 0x00, 0x00, - 0x00, 0x00, 0xed, 0x09, 0x00, 0x9e, 0x00, 0x18, - 0x04, 0x24, 0x00, 0xb9, 0x80, 0x2e, 0x44, 0x0a, - 0x91, 0x02, 0x26, 0x00, 0xb9, 0x00, 0x2e, 0x40, - 0x0b, 0x98, 0x06, 0xe4, 0x00, 0xb9, 0x00, 0x2e, - 0x40, 0x08, 0x90, 0x02, 0xa4, 0x00, 0xb9, 0x20, - 0x2a, 0x40, 0x0b, 0x98, 0x02, 0xe4, 0x08, 0x81, - 0x00, 0x26, 0x40, 0x08, 0x90, 0x02, 0xe4, 0x00, - 0xb9, 0x00, 0x2e, 0x40, 0x0b, 0x90, 0x02, 0x24, - 0x00, 0x89, 0x10, 0x22, 0x50, 0x0b, 0x90, 0x02, - 0xc6, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x04, 0x04, 0x00, 0xb1, 0x00, 0x2c, 0x60, 0x08, - 0x10, 0x02, 0x07, 0x00, 0xb1, 0x00, 0x2c, 0x40, - 0x0b, 0x18, 0x02, 0xc4, 0x00, 0xb1, 0xc0, 0x2c, - 0x50, 0x49, 0x34, 0x02, 0x84, 0x00, 0xb1, 0x00, - 0x28, 0x50, 0x8b, 0x10, 0x02, 0xc5, 0x00, 0x01, - 0x40, 0x04, 0x50, 0x08, 0x14, 0x02, 0xc5, 0x00, - 0xa1, 0x04, 0x2c, 0x40, 0x0b, 0x14, 0x08, 0x0d, - 0x02, 0x81, 0x40, 0x20, 0x50, 0x0b, 0x10, 0x02, - 0xc2, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, - 0x09, 0x60, 0x00, 0xf8, 0x00, 0x3e, 0x00, 0x0e, - 0x80, 0x03, 0x20, 0x00, 0xb8, 0x00, 0x3e, 0x00, - 0x0f, 0x80, 0x03, 0xe0, 0x00, 0xf8, 0x00, 0x3c, - 0x00, 0x2c, 0x80, 0x03, 0xa0, 0x00, 0xfa, 0x00, - 0x3a, 0x00, 0x0b, 0xa0, 0x03, 0xe8, 0x00, 0xc8, - 0x00, 0x36, 0x80, 0x0c, 0x80, 0x03, 0xe0, 0x00, - 0xf8, 0x00, 0x3e, 0x00, 0x0f, 0x80, 0x03, 0x20, - 0x00, 0xca, 0x00, 0x32, 0x00, 0x0f, 0x80, 0x03, - 0xee, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00, 0x98, - 0x1d, 0xe4, 0x00, 0xfd, 0x40, 0x3f, 0x50, 0x0f, - 0xd4, 0x53, 0xf4, 0x14, 0xfd, 0x00, 0x3e, 0x40, - 0x0f, 0xd0, 0x03, 0xe4, 0x00, 0xfd, 0x00, 0x3f, - 0x50, 0x2e, 0xd4, 0x03, 0xf4, 0x00, 0xfd, 0x40, - 0x37, 0x50, 0x0f, 0xf0, 0x03, 0xed, 0x09, 0x00, - 0x9f, 0x00, 0xfd, 0x04, 0xfd, 0x40, 0x3a, 0x50, - 0x0f, 0x90, 0x03, 0xe4, 0x00, 0xed, 0x6a, 0x3f, - 0x50, 0x0f, 0xd4, 0x03, 0xf5, 0x00, 0xfd, 0x40, - 0x3f, 0x50, 0x0f, 0xd4, 0x03, 0xe6, 0x06, 0x70, - 0x00, 0x00, 0x00, 0x00, 0x18, 0x05, 0xe4, 0x00, - 0xfd, 0x28, 0x3f, 0x41, 0x0f, 0xd2, 0x03, 0xf4, - 0x00, 0xcd, 0x00, 0x32, 0x40, 0x07, 0xd0, 0x12, - 0x64, 0x00, 0xfd, 0x00, 0x2f, 0x50, 0x0f, 0xd0, - 0x03, 0x64, 0x00, 0xfd, 0x08, 0x3f, 0x42, 0x0c, - 0xd0, 0x03, 0xf5, 0x20, 0xfd, 0x60, 0x33, 0x4a, - 0x0f, 0x90, 0x42, 0xe4, 0x40, 0xf9, 0x08, 0x3e, - 0x42, 0x0f, 0x56, 0x03, 0xf4, 0xa0, 0xfd, 0x08, - 0x3f, 0x42, 0x0c, 0x90, 0x83, 0xc6, 0x00, 0x70, - 0x00, 0x00, 0x00, 0x00, 0x38, 0x10, 0xe0, 0x00, - 0xba, 0x40, 0x2e, 0x00, 0x0b, 0xa5, 0x12, 0xe0, - 0x84, 0x88, 0x00, 0x22, 0x00, 0x0b, 0x80, 0x02, - 0xe0, 0x00, 0xb8, 0x21, 0x2e, 0x14, 0x0b, 0x86, - 0x82, 0x28, 0x00, 0xb8, 0x40, 0x2e, 0x18, 0x28, - 0x80, 0x02, 0xe1, 0x88, 0xb8, 0x61, 0x36, 0x18, - 0x4b, 0x80, 0x02, 0xe0, 0x00, 0xb8, 0x68, 0x2e, - 0x10, 0x0b, 0x86, 0x02, 0xc1, 0x80, 0xba, 0x40, - 0x2e, 0x10, 0x08, 0x84, 0x02, 0xce, 0x04, 0x30, - 0x00, 0x00, 0x00, 0x00, 0x08, 0x05, 0xc4, 0x00, - 0xb1, 0x00, 0x2c, 0x50, 0x0b, 0x10, 0x12, 0xe4, - 0x30, 0x81, 0x00, 0xa8, 0x40, 0x09, 0x10, 0x02, - 0xc4, 0x00, 0xb1, 0x08, 0x2c, 0xc8, 0x0b, 0x14, - 0x02, 0x44, 0x00, 0xb1, 0x00, 0x2c, 0x42, 0x08, - 0x10, 0x02, 0xc4, 0x00, 0xb1, 0x40, 0x20, 0x42, - 0x0b, 0x12, 0x82, 0x44, 0x88, 0xb1, 0x20, 0x2c, - 0x40, 0x0b, 0x14, 0x02, 0xc4, 0x20, 0xb1, 0x28, - 0x2c, 0x4a, 0x08, 0x10, 0x22, 0xc2, 0x01, 0x70, - 0x00, 0x00, 0x00, 0x00, 0x18, 0x15, 0xa4, 0x00, - 0xed, 0x09, 0x00, 0xa0, 0x00, 0xb9, 0x00, 0x2e, - 0x40, 0x0b, 0x90, 0x12, 0xe4, 0x01, 0x8b, 0x00, - 0x22, 0x40, 0x0b, 0x91, 0x82, 0xe4, 0x00, 0xb9, - 0x00, 0x2e, 0x60, 0x0b, 0x94, 0x0a, 0x64, 0x00, - 0xb9, 0x40, 0x2e, 0x42, 0x08, 0x90, 0x02, 0xe4, - 0x00, 0xb9, 0x00, 0x26, 0x40, 0x1b, 0x90, 0x02, - 0xe4, 0x08, 0xb9, 0x02, 0x2e, 0x40, 0x0b, 0x92, - 0x02, 0xe4, 0x64, 0xb9, 0x00, 0x2c, 0x41, 0x08, - 0x90, 0x02, 0xc6, 0x04, 0x60, 0x00, 0x00, 0x00, - 0x00, 0xa0, 0x15, 0xe4, 0x00, 0xf9, 0x40, 0x3e, - 0x60, 0x0f, 0x90, 0x02, 0xe6, 0x02, 0xc1, 0x90, - 0x3a, 0x40, 0x0d, 0x98, 0x02, 0x64, 0x08, 0xf9, - 0x00, 0x0e, 0x40, 0x0f, 0x90, 0x03, 0x64, 0x00, - 0xb9, 0xc0, 0x3e, 0x50, 0x0c, 0x94, 0x03, 0xe5, - 0x40, 0xf9, 0x48, 0x32, 0x40, 0x4f, 0x90, 0x03, - 0x64, 0x00, 0xf9, 0x60, 0x3e, 0x7c, 0x07, 0x90, - 0x03, 0xe5, 0x00, 0xf9, 0x80, 0x3e, 0x60, 0x2c, - 0x90, 0x03, 0xe8, 0x04, 0x70, 0x00, 0x00, 0x00, - 0x00, 0x28, 0x01, 0xa4, 0x00, 0xf9, 0x00, 0x3e, - 0x70, 0x0f, 0x9c, 0x03, 0xe4, 0x80, 0xf9, 0x00, - 0x3e, 0x40, 0x0f, 0x90, 0x03, 0xe4, 0x00, 0xf9, - 0x20, 0x3e, 0x40, 0x0f, 0x91, 0x03, 0xa4, 0x00, - 0xf9, 0x40, 0x3c, 0x40, 0x2f, 0x90, 0x03, 0xe6, - 0x00, 0xf1, 0x00, 0x3e, 0x41, 0x8f, 0x90, 0x43, - 0xe4, 0x00, 0xf9, 0x00, 0x3e, 0x40, 0x0f, 0x90, - 0x03, 0xe4, 0x00, 0xf9, 0x21, 0x3e, 0x70, 0x4f, - 0x90, 0x03, 0xca, 0x00, 0x60, 0x00, 0x00, 0x00, - 0x00, 0x28, 0x10, 0xa0, 0x00, 0xf8, 0x50, 0xb2, - 0x20, 0x0f, 0x8c, 0x03, 0xe0, 0x28, 0xc8, 0x80, - 0x3e, 0x00, 0x0f, 0x84, 0x53, 0x20, 0x08, 0xd8, - 0x00, 0x3e, 0x20, 0x0c, 0x00, 0x03, 0xe1, 0x00, - 0xf8, 0x83, 0x3e, 0x08, 0x0c, 0x88, 0x03, 0x20, - 0x08, 0xf8, 0x60, 0xed, 0x09, 0x00, 0xa1, 0x00, - 0x3e, 0x08, 0x0f, 0x80, 0x23, 0xe0, 0x00, 0xf8, - 0x40, 0x3e, 0x00, 0x0f, 0x80, 0x03, 0x21, 0x20, - 0xc8, 0x43, 0x3e, 0x00, 0x4e, 0x80, 0x03, 0xca, - 0x04, 0x20, 0x00, 0x00, 0x00, 0x00, 0x28, 0x05, - 0x28, 0x00, 0xba, 0x80, 0x23, 0x90, 0x0b, 0xe4, - 0x82, 0xd8, 0x00, 0x8e, 0x40, 0x2e, 0x80, 0x0b, - 0xe6, 0x02, 0xa8, 0x00, 0xbe, 0x00, 0x2f, 0x80, - 0x08, 0xe0, 0x02, 0xe8, 0x00, 0xbe, 0x48, 0x2f, - 0x91, 0x28, 0xe6, 0x02, 0x38, 0x60, 0xbe, 0x00, - 0x2f, 0xb9, 0x0b, 0xa0, 0x22, 0xe8, 0x00, 0xba, - 0x00, 0x2e, 0x80, 0x0b, 0xe5, 0x52, 0x38, 0x00, - 0xce, 0xc0, 0x2f, 0x90, 0x08, 0xa0, 0x02, 0xca, - 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x28, 0x05, - 0x4c, 0x00, 0xb3, 0x00, 0x20, 0xc0, 0x0b, 0x38, - 0x02, 0xcc, 0x04, 0x93, 0x04, 0x2c, 0xc0, 0x0b, - 0x36, 0x02, 0x0c, 0x00, 0x93, 0x80, 0x2c, 0xc0, - 0x0a, 0x30, 0x02, 0xcc, 0x00, 0xb3, 0x00, 0x2c, - 0x40, 0x28, 0x18, 0x02, 0x0c, 0x00, 0xb3, 0xc0, - 0x2c, 0xe0, 0x8b, 0x30, 0x02, 0xcc, 0x00, 0xb3, - 0x00, 0x2c, 0xc0, 0x0b, 0x24, 0x02, 0x0f, 0x00, - 0x93, 0xc8, 0x2c, 0xc8, 0xca, 0x30, 0x22, 0xca, - 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x01, - 0x1c, 0x00, 0xb1, 0x80, 0x21, 0x00, 0x0b, 0x60, - 0x02, 0xdc, 0x00, 0x95, 0x40, 0x2d, 0xc0, 0x0b, - 0xf8, 0x02, 0x9c, 0x00, 0xb7, 0x40, 0x2c, 0xe0, - 0x0a, 0x50, 0x00, 0xdc, 0x00, 0xb7, 0x00, 0x2c, - 0x90, 0x08, 0xd8, 0x02, 0x18, 0x00, 0xb7, 0x40, - 0x2d, 0x80, 0x0b, 0x72, 0x02, 0xdc, 0x80, 0xb7, - 0x34, 0x2d, 0xc0, 0x0b, 0x48, 0x02, 0x1f, 0x00, - 0x86, 0x09, 0x2f, 0x40, 0x08, 0x70, 0x02, 0xe8, - 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x08, - 0x1e, 0x00, 0xf5, 0x80, 0x31, 0x20, 0xed, 0x09, - 0x00, 0xa2, 0x00, 0x0f, 0x78, 0x03, 0xf2, 0x02, - 0xd7, 0x84, 0x3d, 0xe1, 0x0f, 0x78, 0x03, 0x1e, - 0x00, 0xd7, 0x80, 0x3d, 0xe0, 0x0e, 0x78, 0x03, - 0xde, 0x00, 0x77, 0x80, 0x3d, 0xe0, 0x2c, 0x78, - 0x0b, 0x1e, 0x04, 0xf7, 0x80, 0x3d, 0xe0, 0x5b, - 0x7a, 0x23, 0xde, 0xa0, 0xf7, 0x80, 0x3d, 0xe0, - 0x0f, 0x68, 0x03, 0x1e, 0x02, 0xd7, 0x80, 0x3d, - 0xe0, 0x0e, 0x78, 0x03, 0xea, 0x02, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x1d, 0xac, 0x00, 0xf9, - 0x00, 0x3e, 0x80, 0x0f, 0xa0, 0x13, 0xe0, 0x10, - 0xe9, 0x00, 0x3e, 0xc0, 0x0f, 0x30, 0x03, 0xec, - 0x00, 0xfb, 0x00, 0x3e, 0xc1, 0x2d, 0xa0, 0x03, - 0xec, 0x00, 0xfb, 0x04, 0x3e, 0x80, 0x0f, 0x10, - 0x03, 0xec, 0x00, 0xfb, 0x00, 0x3e, 0xc0, 0x0f, - 0xb4, 0x03, 0xec, 0x00, 0xfb, 0x01, 0x3e, 0xc0, - 0x0f, 0xa0, 0x0b, 0xec, 0x00, 0xfa, 0x00, 0x3c, - 0xc0, 0x0f, 0xb0, 0x03, 0xc2, 0x06, 0x60, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x05, 0xfe, 0x00, 0xfd, - 0x80, 0x3f, 0xa0, 0x0f, 0xe8, 0x03, 0x3a, 0x80, - 0xc7, 0x90, 0xb3, 0xe4, 0x0b, 0x68, 0x03, 0x3e, - 0x00, 0xff, 0x80, 0x3b, 0xe0, 0x0c, 0xf8, 0x03, - 0x3e, 0x00, 0xff, 0x86, 0x3f, 0x20, 0x0c, 0xe8, - 0x03, 0x3e, 0x00, 0xff, 0x80, 0x3f, 0xe0, 0x0c, - 0xfc, 0x83, 0xfe, 0x20, 0xcf, 0x80, 0x3f, 0xe4, - 0x0c, 0xf8, 0x03, 0xb2, 0x06, 0xad, 0x90, 0x31, - 0xe0, 0x0c, 0xf8, 0x03, 0x00, 0x00, 0x70, 0x00, - 0x00, 0x00, 0x00, 0xa8, 0x11, 0x9c, 0x00, 0xb5, - 0x00, 0x2d, 0x10, 0x0b, 0x44, 0x92, 0x38, 0xa0, - 0x84, 0x18, 0xa9, 0xc4, 0x0b, 0x62, 0x03, 0x5c, - 0x00, 0xbf, 0x10, 0x29, 0x40, 0x88, 0xd0, 0x03, - 0x5c, 0x00, 0xb7, 0x00, 0x2d, 0xc4, 0x28, 0x40, - 0x02, 0x94, 0x00, 0xb7, 0x14, 0x2d, 0x00, 0x0d, - 0x70, 0xed, 0x09, 0x00, 0xa3, 0x00, 0x02, 0xfc, - 0x00, 0xd7, 0x10, 0x2d, 0xc0, 0x0d, 0x50, 0x02, - 0x18, 0xa0, 0x85, 0x04, 0x35, 0x50, 0x2d, 0x70, - 0x02, 0x2a, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x9c, 0x00, 0xb5, 0x00, 0x2d, 0x00, - 0x0b, 0x41, 0x02, 0x10, 0xc0, 0x86, 0x04, 0xa1, - 0xc0, 0x8b, 0x40, 0x62, 0x1c, 0x00, 0xb7, 0x00, - 0x29, 0xc0, 0x09, 0x70, 0x02, 0x1c, 0x00, 0xb7, - 0x40, 0x2d, 0x00, 0x2b, 0xe0, 0x02, 0x1c, 0x00, - 0xb7, 0x00, 0x2c, 0x84, 0x08, 0x70, 0x02, 0xdc, - 0x00, 0x87, 0x00, 0x2d, 0xc0, 0x19, 0x60, 0x02, - 0x94, 0x10, 0x86, 0x02, 0x23, 0x80, 0x08, 0x70, - 0x82, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, - 0x20, 0x14, 0xcc, 0x00, 0xb1, 0x00, 0x2c, 0x80, - 0x0b, 0x20, 0x20, 0x22, 0x00, 0x81, 0x42, 0xa8, - 0xc0, 0x0b, 0x00, 0x02, 0x4c, 0x01, 0xb3, 0x00, - 0x20, 0x40, 0x09, 0x2d, 0x02, 0x4f, 0x40, 0xb3, - 0x10, 0x2e, 0xf4, 0x2b, 0x14, 0x06, 0x84, 0x20, - 0xb2, 0x04, 0x2c, 0x00, 0x09, 0x30, 0x02, 0xcc, - 0x00, 0x93, 0x00, 0x2c, 0xd0, 0x09, 0xac, 0x02, - 0x0e, 0x00, 0x82, 0x40, 0x24, 0xa0, 0x08, 0x38, - 0x42, 0x08, 0x04, 0x30, 0x00, 0x00, 0x00, 0x00, - 0xa8, 0x15, 0xac, 0x00, 0xf9, 0x60, 0x3e, 0xa0, - 0x8f, 0xb4, 0x03, 0x27, 0x00, 0x4b, 0x80, 0xb2, - 0xc0, 0x0f, 0x90, 0x02, 0x2c, 0x00, 0xfb, 0x00, - 0x2a, 0xc0, 0x8d, 0xb0, 0x03, 0x2d, 0x00, 0xfb, - 0x40, 0x3e, 0x50, 0x2f, 0xb0, 0x03, 0x25, 0x00, - 0xfb, 0xd8, 0x7e, 0x40, 0x0c, 0xf0, 0x03, 0xfc, - 0x00, 0xcf, 0x40, 0x2e, 0xc4, 0x0d, 0xa4, 0x43, - 0xae, 0x04, 0xcb, 0x04, 0xb2, 0x82, 0x08, 0xb9, - 0x0b, 0x2a, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x00, 0xec, 0x00, 0xf9, 0x00, 0x3e, 0x30, - 0x0f, 0xb0, 0x2b, 0xe8, 0xed, 0x09, 0x00, 0xa4, - 0x00, 0x00, 0xf9, 0x08, 0x3e, 0xc0, 0x0f, 0x92, - 0x03, 0xec, 0x00, 0xfb, 0x40, 0x3e, 0xe0, 0x6e, - 0xb4, 0x03, 0xec, 0x04, 0xfa, 0x40, 0x3e, 0x88, - 0x0c, 0xb7, 0x03, 0xe0, 0x08, 0xfb, 0x00, 0x3e, - 0x40, 0x0f, 0xb0, 0x03, 0xec, 0x00, 0xfb, 0xa0, - 0x3e, 0xc0, 0x8f, 0x81, 0x8b, 0xe5, 0x28, 0xfa, - 0x08, 0x3a, 0x10, 0x0f, 0xb0, 0x43, 0xe0, 0x00, - 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x10, 0xfc, - 0x00, 0xf5, 0x18, 0x33, 0x00, 0x8f, 0xa8, 0xa3, - 0xf0, 0x24, 0xcf, 0x00, 0x7f, 0xc0, 0x0f, 0xc2, - 0x03, 0x7c, 0x00, 0xff, 0x00, 0x30, 0xc0, 0x0c, - 0xf0, 0x83, 0x7c, 0x20, 0xcf, 0x80, 0x3f, 0x70, - 0x2c, 0xf0, 0x03, 0xd0, 0x00, 0xcf, 0x00, 0x3d, - 0x40, 0x0c, 0xf0, 0x03, 0x7c, 0x00, 0xc7, 0x00, - 0x32, 0xc0, 0x0f, 0xc4, 0x03, 0x28, 0x00, 0xfd, - 0x40, 0x3f, 0x00, 0x05, 0xb0, 0x01, 0xc0, 0x44, - 0x30, 0x00, 0x00, 0x00, 0x00, 0x81, 0x04, 0x6c, - 0x00, 0xb9, 0x00, 0x22, 0x90, 0x0b, 0xad, 0x42, - 0xe3, 0x20, 0x89, 0x80, 0x2e, 0xc0, 0x0b, 0x0a, - 0x02, 0x2c, 0x00, 0xb8, 0x18, 0x2a, 0xc0, 0x28, - 0xbd, 0x03, 0x4c, 0x00, 0x09, 0xa0, 0x2e, 0xa0, - 0x08, 0xb0, 0x82, 0xe2, 0x02, 0x8b, 0x86, 0x2e, - 0x69, 0x0a, 0xb0, 0x02, 0xac, 0x00, 0xab, 0x00, - 0x2a, 0xc0, 0x0b, 0x88, 0x02, 0x22, 0x04, 0xb8, - 0x80, 0x2e, 0x14, 0x0b, 0xb0, 0x02, 0xe0, 0x40, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x80, 0x05, 0x2c, - 0x00, 0xb9, 0x00, 0x22, 0x80, 0x0b, 0x80, 0x02, - 0xe6, 0x04, 0x9a, 0x10, 0x2e, 0xc0, 0x0b, 0x80, - 0x02, 0x6c, 0x00, 0xb3, 0x00, 0x22, 0xe0, 0x08, - 0x34, 0x02, 0x6c, 0x02, 0xab, 0x10, 0x2a, 0x00, - 0x0a, 0xa8, 0x02, 0xe6, 0x00, 0x9b, 0x21, 0x2e, - 0x60, 0x08, 0x30, 0x02, 0x0c, 0x00, 0x8b, 0xed, - 0x09, 0x00, 0xa5, 0x00, 0x00, 0x22, 0xc0, 0x0b, - 0xb0, 0x1a, 0x61, 0x80, 0xb9, 0x00, 0x2e, 0xc0, - 0x09, 0xb0, 0x02, 0xe0, 0x00, 0x40, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x04, 0x0c, 0x00, 0xb1, 0x04, - 0xa0, 0x00, 0x0b, 0x20, 0x02, 0xc8, 0x00, 0x93, - 0x00, 0x2c, 0xc0, 0x0b, 0x00, 0x02, 0x0c, 0x00, - 0xb3, 0x00, 0x28, 0xa0, 0x08, 0x30, 0x02, 0x6c, - 0x00, 0x83, 0x00, 0x2c, 0xc0, 0xb8, 0x20, 0x02, - 0x46, 0x00, 0x93, 0x00, 0x2c, 0x40, 0x0a, 0x30, - 0x02, 0x8c, 0x00, 0xa3, 0x00, 0x28, 0xc0, 0x8b, - 0x10, 0x02, 0x40, 0x00, 0xb1, 0x00, 0x2c, 0x40, - 0x0b, 0x30, 0x02, 0xc2, 0x11, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x0d, 0x6c, 0x00, 0xf9, 0x00, - 0x32, 0x00, 0x0f, 0xa0, 0x03, 0xe0, 0x00, 0xdb, - 0x00, 0x2e, 0xc0, 0x0f, 0x80, 0x47, 0x6c, 0x08, - 0xf9, 0x00, 0x32, 0xc0, 0x0c, 0xb0, 0x03, 0x6c, - 0x00, 0xeb, 0x00, 0x3c, 0x00, 0x0c, 0xa0, 0x03, - 0xe0, 0x00, 0xd9, 0x00, 0x3e, 0x01, 0x0c, 0xf0, - 0x03, 0x7c, 0x00, 0xcb, 0x00, 0x32, 0xc0, 0x0f, - 0x80, 0x03, 0x60, 0x04, 0xf0, 0x00, 0x3e, 0x00, - 0x0d, 0xb0, 0x03, 0xc0, 0x03, 0x50, 0x00, 0x00, - 0x00, 0x00, 0xa0, 0x1d, 0xfc, 0x00, 0xfd, 0x00, - 0x3f, 0x80, 0x03, 0xc0, 0x33, 0xf0, 0x0c, 0xec, - 0x00, 0x3f, 0xc0, 0x0b, 0xc0, 0x07, 0xfc, 0x00, - 0xfc, 0x00, 0x3f, 0x80, 0x2f, 0xf0, 0x0b, 0xfc, - 0x00, 0xff, 0x00, 0x3f, 0xc0, 0x0f, 0x60, 0x03, - 0xf0, 0x00, 0xec, 0x00, 0x3f, 0x00, 0x8f, 0xf0, - 0x03, 0xfc, 0x00, 0xff, 0x00, 0x3f, 0xc0, 0x0f, - 0x40, 0x03, 0xb0, 0x00, 0xfc, 0x00, 0x3f, 0x00, - 0x0f, 0xf0, 0x03, 0xe8, 0x06, 0x70, 0x00, 0x00, - 0x00, 0x00, 0xc0, 0x05, 0xfc, 0x00, 0xff, 0x00, - 0x3f, 0xc8, 0x4f, 0xf2, 0x43, 0xfc, 0x00, 0x7f, - 0x20, 0x3f, 0xed, 0x09, 0x00, 0xa6, 0x00, 0xc8, - 0x0f, 0xc1, 0x03, 0x34, 0x40, 0xdd, 0x10, 0x3f, - 0x40, 0x0e, 0xc3, 0x07, 0xfc, 0x01, 0xff, 0x42, - 0x2f, 0x08, 0x1f, 0xc0, 0x03, 0x7c, 0x00, 0xdc, - 0x20, 0x7f, 0x0a, 0x08, 0xc0, 0x03, 0xf0, 0x80, - 0xff, 0x34, 0x33, 0x00, 0x4c, 0xd3, 0x82, 0x30, - 0x80, 0xfc, 0x06, 0x33, 0xc0, 0x0c, 0x41, 0x43, - 0x30, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x10, 0xec, 0x00, 0xbb, 0x00, 0x2f, 0xc4, 0x0b, - 0xf1, 0x02, 0xec, 0x00, 0xbf, 0x51, 0x2f, 0xd4, - 0x0b, 0xb2, 0x42, 0x2c, 0x80, 0xcb, 0x20, 0x3e, - 0x49, 0x0c, 0x82, 0x03, 0xfd, 0x04, 0xbf, 0x60, - 0x2e, 0x00, 0x4f, 0x80, 0x82, 0xbd, 0x40, 0xb8, - 0x69, 0x66, 0x08, 0x08, 0x80, 0x02, 0xe0, 0xa0, - 0x3f, 0x40, 0x2a, 0x00, 0x0d, 0x84, 0x02, 0x20, - 0xa0, 0xb8, 0x20, 0x22, 0xd4, 0x0a, 0xa2, 0x02, - 0x20, 0x04, 0x30, 0x00, 0x00, 0x00, 0x00, 0x88, - 0x05, 0xcc, 0x00, 0xb3, 0x00, 0x2c, 0xc0, 0x0b, - 0x30, 0x12, 0xcc, 0x10, 0xb3, 0x00, 0x2c, 0xc0, - 0x0b, 0xb0, 0x02, 0x2c, 0x01, 0x83, 0x00, 0x2c, - 0x4a, 0x0b, 0x04, 0x02, 0xcc, 0x40, 0xa3, 0x30, - 0x2c, 0x04, 0x0b, 0x90, 0x12, 0x0c, 0x20, 0x90, - 0x10, 0x2c, 0x0a, 0x08, 0x00, 0x02, 0xc0, 0xc0, - 0xb3, 0x10, 0x20, 0x81, 0x08, 0x10, 0x02, 0x80, - 0xd0, 0xb0, 0x08, 0x20, 0xc0, 0x08, 0x12, 0x12, - 0x22, 0x11, 0x70, 0x00, 0x00, 0x00, 0x00, 0xc0, - 0x15, 0xac, 0x00, 0xbb, 0x00, 0x2e, 0xc0, 0x0b, - 0xb0, 0x02, 0x6c, 0x00, 0xbb, 0x00, 0x2e, 0xc0, - 0x0b, 0xb0, 0x02, 0x2c, 0x00, 0x89, 0x00, 0x22, - 0xc4, 0x1a, 0x8c, 0x22, 0xac, 0x00, 0xbb, 0x02, - 0x2e, 0x62, 0x08, 0x80, 0x22, 0xec, 0x04, 0xb9, - 0x80, 0x26, 0x60, 0x08, 0x88, 0x80, 0xe3, 0x00, - 0xbb, 0x02, 0x2e, 0xc0, 0x09, 0xed, 0x09, 0x00, - 0xa7, 0x00, 0x88, 0x22, 0x22, 0x00, 0xba, 0x08, - 0x22, 0x22, 0x0a, 0xb0, 0x22, 0x30, 0x04, 0x60, - 0x00, 0x00, 0x00, 0x00, 0x40, 0x15, 0xec, 0x00, - 0xfb, 0x00, 0x3e, 0xc0, 0x0f, 0xb0, 0x03, 0xec, - 0x00, 0xfb, 0x00, 0x3e, 0xc0, 0x0f, 0xb0, 0x03, - 0x0c, 0x02, 0xcb, 0x80, 0x6e, 0x40, 0x0f, 0x88, - 0x02, 0xec, 0x00, 0xfb, 0x00, 0x1e, 0x20, 0x0b, - 0x28, 0x03, 0x6c, 0x04, 0xd8, 0xc1, 0x2e, 0x30, - 0x2c, 0x94, 0x03, 0xe2, 0x00, 0xfb, 0x00, 0x30, - 0x10, 0x0c, 0x9a, 0x0b, 0xa3, 0x00, 0xf8, 0x50, - 0x22, 0xd0, 0x0c, 0xb1, 0x83, 0x10, 0x04, 0x70, - 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0xbc, 0x00, - 0xff, 0x00, 0x3f, 0xc0, 0x0f, 0xf0, 0x03, 0xfc, - 0x00, 0xff, 0x00, 0x3f, 0xc0, 0x0f, 0xf1, 0x03, - 0xf5, 0x00, 0xef, 0x40, 0x3f, 0x60, 0x0d, 0xd0, - 0x03, 0xfc, 0x00, 0xff, 0x02, 0x3f, 0x00, 0x8f, - 0xc4, 0x03, 0xbc, 0x10, 0xfc, 0x0a, 0x35, 0x02, - 0x0f, 0xd0, 0x03, 0xf4, 0x00, 0xdb, 0x04, 0x3b, - 0x08, 0x0f, 0xf0, 0x03, 0xf0, 0x00, 0xff, 0x00, - 0xbf, 0x40, 0x0f, 0xf8, 0x03, 0xf8, 0x00, 0x60, - 0x00, 0x00, 0x00, 0x00, 0x40, 0x10, 0xac, 0x00, - 0xfb, 0x00, 0x3e, 0xc1, 0x0f, 0xb0, 0x03, 0xec, - 0x00, 0xfb, 0x10, 0x3e, 0xc0, 0x2c, 0x90, 0x43, - 0xec, 0x00, 0xdb, 0x00, 0x32, 0xc8, 0x0f, 0x94, - 0x03, 0xec, 0x98, 0xfb, 0x02, 0x3e, 0x51, 0x4f, - 0xb0, 0xa3, 0xec, 0x20, 0xf9, 0x01, 0x3e, 0x70, - 0x0f, 0x94, 0x03, 0xe4, 0x00, 0xfb, 0x00, 0xb2, - 0xc0, 0x0f, 0x94, 0x83, 0xe1, 0x80, 0xf9, 0x40, - 0x30, 0xf0, 0x0c, 0xbc, 0x03, 0x10, 0x04, 0x20, - 0x00, 0x00, 0x00, 0x00, 0xc8, 0x05, 0x2c, 0x00, - 0xbb, 0x00, 0x2f, 0xf4, 0x0b, 0xf0, 0x42, 0xec, - 0x00, 0xbf, 0x00, 0x2f, 0xe0, 0x08, 0x30, 0x42, - 0xed, 0x09, 0x00, 0xa8, 0x00, 0xec, 0x00, 0x8b, - 0x00, 0x32, 0xc0, 0x0b, 0x90, 0x03, 0xbc, 0x28, - 0xbf, 0xd8, 0x2e, 0x41, 0x43, 0x88, 0x02, 0xfc, - 0x20, 0xb9, 0x48, 0x2e, 0x50, 0x0b, 0xb1, 0x83, - 0xe4, 0x00, 0xbf, 0xc8, 0x32, 0xf4, 0x0b, 0xb0, - 0x23, 0xa6, 0x00, 0xbb, 0x05, 0x22, 0x80, 0x08, - 0xb9, 0x02, 0x32, 0x00, 0x40, 0x00, 0x00, 0x00, - 0x00, 0xe0, 0x05, 0x4c, 0x00, 0xb3, 0x00, 0x2c, - 0xc0, 0x0b, 0x30, 0x02, 0xcc, 0x00, 0xb3, 0x02, - 0x2c, 0xc0, 0x08, 0x30, 0x02, 0xcc, 0x00, 0xa3, - 0x00, 0x2e, 0x40, 0x8b, 0x00, 0x00, 0x8d, 0x00, - 0xb3, 0x40, 0x2c, 0x00, 0x03, 0x04, 0x02, 0xcf, - 0x00, 0xb0, 0x00, 0x2c, 0x00, 0x0b, 0x20, 0x02, - 0xc0, 0x80, 0x9b, 0x08, 0x20, 0x90, 0x0b, 0x8c, - 0x02, 0xc1, 0x00, 0xba, 0x00, 0x20, 0xc0, 0x08, - 0xb0, 0x02, 0x38, 0x00, 0x50, 0x00, 0x00, 0x00, - 0x00, 0x20, 0x01, 0x1e, 0x00, 0xb7, 0x84, 0x2d, - 0xe3, 0x0b, 0x78, 0x02, 0xde, 0x00, 0xb7, 0x80, - 0x2c, 0xe2, 0x08, 0x58, 0x02, 0xde, 0x00, 0x87, - 0x80, 0x25, 0xe0, 0x0b, 0x79, 0x02, 0x9e, 0x01, - 0xb7, 0x80, 0x2d, 0xe0, 0x0b, 0x78, 0x82, 0xde, - 0x01, 0xb7, 0x80, 0x2d, 0xe0, 0x1b, 0x68, 0x02, - 0xde, 0x00, 0xb7, 0x90, 0x25, 0xe2, 0x0b, 0x48, - 0x82, 0x92, 0x20, 0xbf, 0x80, 0x21, 0x20, 0x08, - 0xf8, 0x02, 0x08, 0x00, 0x40, 0x00, 0x00, 0x00, - 0x00, 0x48, 0x08, 0x0c, 0x00, 0xf3, 0x00, 0x3c, - 0xc0, 0x0f, 0x30, 0x02, 0xcc, 0x00, 0xf3, 0x00, - 0x2c, 0xc0, 0x0c, 0x30, 0x03, 0xe4, 0x02, 0xeb, - 0x00, 0xb4, 0x44, 0x0f, 0x10, 0x03, 0x8c, 0x00, - 0xf3, 0x10, 0x2c, 0x80, 0x0f, 0x15, 0x02, 0xcc, - 0x00, 0xf0, 0x40, 0x2c, 0x18, 0x0f, 0x22, 0x03, - 0xcc, 0x00, 0xd3, 0x02, 0x70, 0x84, 0x0f, 0x31, - 0x03, 0xc1, 0x00, 0xed, 0x09, 0x00, 0xa9, 0x00, - 0xf3, 0x02, 0x70, 0xc0, 0x0c, 0x31, 0x03, 0x12, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x1d, - 0xbc, 0x00, 0x7f, 0x00, 0x3f, 0xd2, 0x0f, 0xf1, - 0x03, 0xfc, 0x00, 0xff, 0x08, 0x3f, 0xc0, 0x0f, - 0xf0, 0x03, 0xfc, 0x00, 0xef, 0x00, 0x3b, 0xc0, - 0x0f, 0xf0, 0x03, 0xbc, 0x40, 0xff, 0x00, 0x3f, - 0xc0, 0x07, 0xf1, 0x03, 0xfc, 0x45, 0xff, 0x12, - 0x3f, 0xc0, 0x07, 0xd0, 0x13, 0xbc, 0x40, 0xff, - 0x01, 0x3b, 0xc0, 0x0f, 0xc0, 0x13, 0xb4, 0x00, - 0xf7, 0x10, 0x3d, 0xc4, 0x0f, 0xf0, 0x03, 0xd0, - 0x06, 0x60, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x05, - 0xec, 0x00, 0xfb, 0x00, 0x3e, 0xc8, 0x4c, 0xb0, - 0xc0, 0xec, 0x00, 0xfb, 0x20, 0x36, 0xdc, 0x0b, - 0xb0, 0x03, 0xec, 0x00, 0xf9, 0x00, 0x3e, 0xc0, - 0x0f, 0x80, 0x22, 0xed, 0x41, 0xfb, 0x18, 0x3e, - 0x60, 0x0c, 0xa0, 0x03, 0xed, 0x80, 0xdb, 0x81, - 0x36, 0xc1, 0x1d, 0xb8, 0x03, 0xe2, 0x00, 0xcb, - 0x30, 0x32, 0xc0, 0x0f, 0x80, 0x03, 0xe2, 0x00, - 0xca, 0x00, 0x32, 0xc0, 0x0c, 0xb0, 0x03, 0xea, - 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x48, 0x11, - 0x9c, 0x00, 0xb7, 0x00, 0x2d, 0xc8, 0x08, 0x70, - 0x02, 0xdc, 0x10, 0xb7, 0x30, 0x2d, 0xc2, 0x0b, - 0x70, 0x02, 0xdc, 0x00, 0xb7, 0x04, 0x2d, 0xc0, - 0x46, 0x70, 0x02, 0x1c, 0xa0, 0xb7, 0x24, 0x6d, - 0xc0, 0x05, 0x70, 0x02, 0xdd, 0xa5, 0x87, 0x00, - 0x29, 0xc0, 0x03, 0x60, 0x02, 0xdc, 0x00, 0xa3, - 0x30, 0x25, 0xc0, 0x0b, 0x70, 0x02, 0xd0, 0x00, - 0xaf, 0x00, 0x20, 0x00, 0x08, 0x70, 0x02, 0xd2, - 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, - 0x9e, 0x00, 0xb7, 0x80, 0x2d, 0xe0, 0x08, 0x79, - 0x02, 0x5e, 0x04, 0xb7, 0xa2, 0x2d, 0xe0, 0x09, - 0x78, 0x72, 0xde, 0x08, 0xb7, 0x80, 0xed, 0x09, - 0x00, 0xaa, 0x00, 0x2d, 0xf1, 0x03, 0x18, 0x02, - 0x1e, 0x18, 0x97, 0x82, 0x2d, 0xc0, 0x0a, 0x78, - 0x82, 0xce, 0x80, 0xb3, 0x82, 0x21, 0xe0, 0x19, - 0x70, 0x02, 0xce, 0x00, 0x87, 0xa2, 0xa5, 0xe0, - 0x1b, 0x78, 0x02, 0xca, 0x00, 0x87, 0x80, 0x21, - 0xe0, 0x08, 0x78, 0x02, 0xf0, 0x00, 0x20, 0x00, - 0x00, 0x00, 0x00, 0x48, 0x14, 0xcc, 0x00, 0xb3, - 0x00, 0x2c, 0xc0, 0x28, 0x30, 0x02, 0xcc, 0x00, - 0xb3, 0x00, 0x2c, 0xc0, 0x0b, 0x98, 0x02, 0xc6, - 0x40, 0xb1, 0x90, 0x2c, 0xe0, 0x0a, 0xb0, 0x02, - 0x0c, 0x00, 0xb3, 0x00, 0x2c, 0xd0, 0xcb, 0x30, - 0x02, 0xec, 0x00, 0x83, 0x00, 0x28, 0xc8, 0x0b, - 0x39, 0x02, 0xcd, 0x00, 0xa3, 0x00, 0x24, 0xd0, - 0x0b, 0x31, 0x02, 0xcc, 0x80, 0xa3, 0xc0, 0x20, - 0xc0, 0x08, 0x39, 0x02, 0xd2, 0x04, 0x30, 0x00, - 0x00, 0x00, 0x00, 0xe8, 0x15, 0xa8, 0x00, 0xfa, - 0x00, 0x3e, 0x80, 0x0c, 0xa0, 0x03, 0x68, 0x00, - 0xf2, 0x00, 0x36, 0x80, 0x4d, 0xee, 0x03, 0xe8, - 0x00, 0xba, 0x00, 0x3e, 0xa1, 0x4f, 0xe5, 0x03, - 0xa8, 0x00, 0xfa, 0x00, 0x3d, 0x80, 0x1e, 0xe8, - 0x03, 0xe8, 0x00, 0xde, 0x50, 0x37, 0x91, 0x09, - 0xe8, 0x02, 0xf9, 0x00, 0x8a, 0x00, 0x21, 0x90, - 0x0f, 0xed, 0x02, 0xf8, 0x00, 0xce, 0x00, 0xb3, - 0x80, 0x2c, 0xed, 0x03, 0xfa, 0x04, 0x60, 0x00, - 0x00, 0x00, 0x00, 0x48, 0x00, 0xe0, 0x00, 0xf8, - 0x00, 0x3c, 0x00, 0x0f, 0x80, 0x03, 0xe0, 0x00, - 0xf8, 0x00, 0x3e, 0x00, 0x0f, 0x88, 0x03, 0xe0, - 0x00, 0xf8, 0x00, 0x3e, 0x10, 0x0e, 0x80, 0x09, - 0xa0, 0x00, 0xf8, 0x04, 0x3e, 0x18, 0x1d, 0x80, - 0x22, 0xe1, 0x02, 0x78, 0x10, 0x2e, 0x00, 0x1f, - 0x8c, 0x41, 0xe1, 0x00, 0xf0, 0x00, 0x3a, 0x08, - 0x0f, 0x80, 0x01, 0xe0, 0x00, 0xf8, 0x18, 0x3e, - 0x00, 0xed, 0x09, 0x00, 0xab, 0x00, 0x0f, 0x80, - 0x03, 0xd2, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, - 0x08, 0x10, 0xe4, 0x00, 0xf9, 0x00, 0x3e, 0x40, - 0x0c, 0x90, 0x43, 0xe4, 0x00, 0xf9, 0x90, 0x32, - 0x68, 0x0b, 0x90, 0x03, 0x24, 0x00, 0xc9, 0x00, - 0x0e, 0x40, 0x0f, 0x90, 0x03, 0xa4, 0x50, 0xf1, - 0x00, 0x32, 0x70, 0x04, 0x90, 0x01, 0xe4, 0x04, - 0xc9, 0x00, 0x3e, 0x41, 0x1e, 0x10, 0x13, 0x24, - 0x30, 0xf9, 0x00, 0x12, 0x40, 0x0c, 0x98, 0x03, - 0xe6, 0x00, 0xf9, 0x00, 0x30, 0x40, 0x0c, 0x9a, - 0x03, 0xc2, 0x04, 0x30, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x04, 0x64, 0x00, 0xb9, 0x00, 0x2e, 0x70, - 0x28, 0x90, 0x02, 0xe4, 0x00, 0xb9, 0x00, 0x02, - 0x40, 0x0b, 0x90, 0x02, 0x24, 0x00, 0x89, 0x00, - 0x2e, 0x60, 0x0b, 0x90, 0x02, 0x27, 0x00, 0xb9, - 0x00, 0xa2, 0x40, 0x0a, 0x90, 0x02, 0xe5, 0x20, - 0x89, 0x00, 0x2e, 0x50, 0x0e, 0x9c, 0x82, 0x27, - 0x80, 0xb9, 0x0a, 0x02, 0x50, 0x08, 0x95, 0x02, - 0xe4, 0x00, 0xb9, 0x00, 0x22, 0x40, 0x08, 0x90, - 0x82, 0xe0, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x18, 0x05, 0x24, 0x00, 0xb9, 0x00, 0x2e, 0x44, - 0x08, 0x90, 0x02, 0xe4, 0x00, 0xb9, 0x00, 0xa2, - 0x40, 0x0b, 0xb0, 0x02, 0x04, 0x00, 0x99, 0x00, - 0x2e, 0x60, 0x4b, 0x90, 0x42, 0x65, 0x10, 0xb9, - 0x04, 0x22, 0x41, 0x0a, 0x90, 0x82, 0xe4, 0x00, - 0x89, 0x00, 0x0e, 0x50, 0x0b, 0x92, 0x02, 0xa4, - 0x84, 0xb9, 0x80, 0x2a, 0xe0, 0x08, 0x90, 0x12, - 0xe4, 0x40, 0xb1, 0x00, 0x22, 0x60, 0x08, 0x90, - 0x02, 0xc6, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, - 0x08, 0x04, 0x04, 0x00, 0xb1, 0x00, 0x2c, 0x40, - 0x08, 0x10, 0x02, 0xc4, 0x00, 0xb1, 0x28, 0x20, - 0x4a, 0x0b, 0x10, 0x42, 0x04, 0x06, 0xa1, 0x00, - 0x2c, 0xd0, 0x0b, 0x14, 0xed, 0x09, 0x00, 0xac, - 0x00, 0x02, 0x44, 0xa4, 0x31, 0xaa, 0x20, 0xca, - 0x0a, 0x10, 0x46, 0xc4, 0xa2, 0x81, 0x28, 0x2c, - 0x4a, 0x0b, 0x14, 0x02, 0x84, 0xa0, 0xb1, 0x40, - 0xaa, 0x61, 0x00, 0x14, 0x02, 0xc5, 0x00, 0xb1, - 0x40, 0xa0, 0x40, 0x28, 0x14, 0x02, 0xc2, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0x0d, 0x60, - 0x00, 0xf8, 0x00, 0x3e, 0x80, 0x0c, 0x80, 0x03, - 0xe0, 0x00, 0xf8, 0x20, 0x32, 0x08, 0x0f, 0x80, - 0x0b, 0x20, 0x00, 0xd8, 0x00, 0x1e, 0x00, 0x0f, - 0x80, 0x03, 0xe0, 0x88, 0x38, 0x20, 0x32, 0x08, - 0x0c, 0x80, 0x03, 0xe0, 0x80, 0xca, 0x22, 0x3e, - 0x08, 0x0e, 0x80, 0x03, 0xa0, 0x85, 0xf8, 0x00, - 0x3a, 0x00, 0xcc, 0xa0, 0x03, 0xe0, 0x08, 0xf8, - 0x00, 0x32, 0x00, 0x0c, 0x80, 0x03, 0xee, 0x03, - 0x50, 0x00, 0x00, 0x00, 0x00, 0x98, 0x1d, 0xe4, - 0x00, 0xf9, 0x00, 0x3c, 0x50, 0x4f, 0x94, 0x03, - 0xe4, 0x00, 0xf9, 0x00, 0x3e, 0x41, 0x0f, 0xd2, - 0xc3, 0xf4, 0xa0, 0x9d, 0x28, 0x3f, 0x40, 0x0f, - 0xf4, 0x2b, 0xa4, 0x00, 0xf9, 0x28, 0x2d, 0xc0, - 0x05, 0xd2, 0x83, 0xe4, 0xa4, 0xfd, 0x28, 0x3f, - 0x4a, 0x1e, 0xf4, 0x07, 0x74, 0xb1, 0xf9, 0x40, - 0x37, 0x40, 0x2f, 0xd4, 0x03, 0xf5, 0x00, 0xfd, - 0x00, 0x3f, 0x50, 0x0f, 0xd0, 0x03, 0xe6, 0x06, - 0x70, 0x00, 0x00, 0x00, 0x00, 0x18, 0x05, 0xe4, - 0x00, 0xf9, 0x00, 0x3f, 0x48, 0x0f, 0x92, 0x03, - 0x24, 0x00, 0xfd, 0x20, 0x3f, 0x4a, 0x0c, 0x91, - 0x13, 0xe4, 0x00, 0xf9, 0x00, 0x33, 0x44, 0x0f, - 0x92, 0x43, 0xd4, 0xa0, 0xcd, 0x34, 0x33, 0x40, - 0x1f, 0xd0, 0x07, 0x74, 0xc1, 0xfd, 0x00, 0x3f, - 0xc0, 0x8f, 0xd6, 0x22, 0x34, 0x80, 0xdd, 0x28, - 0xb3, 0x40, 0x0f, 0xd4, 0x03, 0xfc, 0x00, 0xf9, - 0x40, 0x33, 0xc8, 0x0f, 0xd1, 0x03, 0xc6, 0xed, - 0x09, 0x00, 0xad, 0x00, 0x00, 0x70, 0x00, 0x00, - 0x00, 0x00, 0x38, 0x10, 0xe0, 0x00, 0xb8, 0x00, - 0x2e, 0x14, 0x0b, 0x84, 0x02, 0x20, 0x00, 0xb8, - 0x00, 0x26, 0x00, 0x08, 0x82, 0x42, 0x60, 0x20, - 0x98, 0x08, 0x22, 0x01, 0x0b, 0x80, 0x02, 0xe0, - 0x00, 0xc8, 0x30, 0x22, 0x10, 0x0b, 0x82, 0x02, - 0xa0, 0xc0, 0xb8, 0x48, 0x2e, 0x02, 0x8b, 0x86, - 0x02, 0xa0, 0xa4, 0xb8, 0x60, 0x22, 0x00, 0x0b, - 0x82, 0x02, 0x61, 0xa8, 0xb8, 0x02, 0x2a, 0x14, - 0x0b, 0x82, 0x02, 0xce, 0x04, 0x30, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x05, 0xc4, 0x00, 0xb1, 0x00, - 0x2c, 0xc0, 0x0b, 0x14, 0x0a, 0x04, 0x00, 0xb1, - 0x14, 0x2c, 0x40, 0x0a, 0x12, 0x02, 0xc4, 0x81, - 0xb9, 0x00, 0x28, 0x40, 0x0b, 0x13, 0x82, 0xc4, - 0x00, 0x81, 0x20, 0x28, 0x44, 0x0b, 0x9a, 0x82, - 0x04, 0x80, 0xa1, 0x30, 0x2c, 0x44, 0x0a, 0x14, - 0x02, 0x84, 0xc0, 0xb1, 0x2a, 0x20, 0x40, 0x0b, - 0x14, 0x02, 0xcc, 0xc0, 0xb9, 0x20, 0x20, 0x60, - 0x0b, 0x10, 0x02, 0xc2, 0x01, 0x70, 0x00, 0x00, - 0x00, 0x00, 0x18, 0x15, 0xa4, 0x00, 0xb9, 0x00, - 0x2e, 0x40, 0x0b, 0x90, 0x02, 0x24, 0x00, 0xb9, - 0x00, 0x26, 0x40, 0x28, 0x90, 0x02, 0x64, 0x80, - 0x99, 0x00, 0x2a, 0x40, 0x0b, 0x90, 0x02, 0xe4, - 0x00, 0x99, 0x00, 0xa2, 0x40, 0x0b, 0x90, 0x02, - 0xa4, 0x00, 0xb9, 0x00, 0x6e, 0x42, 0x0b, 0x90, - 0x42, 0xa4, 0x01, 0xb9, 0x00, 0x22, 0x48, 0x0b, - 0x92, 0xc0, 0xed, 0x00, 0xb9, 0x40, 0x2a, 0x48, - 0x0b, 0x90, 0x02, 0xc6, 0x04, 0x60, 0x00, 0x00, - 0x00, 0x00, 0xa0, 0x15, 0xe4, 0x00, 0xf9, 0x00, - 0x3e, 0x41, 0x0f, 0x90, 0x03, 0x24, 0x00, 0xf9, - 0x00, 0x3e, 0x40, 0x0e, 0x9c, 0x83, 0xe4, 0x04, - 0xf1, 0x90, 0xba, 0x41, 0x0f, 0x94, 0x03, 0xe4, - 0x02, 0xc9, 0xed, 0x09, 0x00, 0xae, 0x00, 0x00, - 0x3a, 0x54, 0x0b, 0x90, 0x03, 0x64, 0x00, 0xf9, - 0x62, 0x2e, 0x41, 0x0e, 0x9c, 0x13, 0xa6, 0x80, - 0xd9, 0x03, 0x22, 0x78, 0x8f, 0x94, 0x23, 0xe6, - 0x00, 0xf1, 0x80, 0x32, 0x50, 0x9f, 0x90, 0x83, - 0xe8, 0x04, 0x70, 0x00, 0x00, 0x00, 0x00, 0x28, - 0x01, 0xa4, 0x00, 0xf9, 0x00, 0x3e, 0x42, 0x03, - 0x90, 0x03, 0xe4, 0x00, 0xf9, 0x00, 0x36, 0x41, - 0x0f, 0x92, 0x03, 0xe4, 0x00, 0xf9, 0x80, 0x36, - 0x50, 0x0f, 0x90, 0x02, 0xe4, 0x08, 0xe9, 0x00, - 0x3e, 0x60, 0x0f, 0x90, 0x23, 0xe4, 0x00, 0xf9, - 0x03, 0x3e, 0x40, 0x0f, 0x99, 0x43, 0xe4, 0x84, - 0xf9, 0x04, 0x3e, 0x60, 0x0f, 0x98, 0x03, 0x64, - 0x80, 0xf9, 0x20, 0x2e, 0x40, 0x0f, 0x90, 0x03, - 0xca, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x28, - 0x10, 0xa0, 0x08, 0xf8, 0x00, 0x36, 0x00, 0x2e, - 0x00, 0x03, 0xe0, 0x00, 0xf8, 0x00, 0x32, 0x00, - 0x0f, 0x80, 0x03, 0x60, 0x00, 0xf8, 0x00, 0x3e, - 0x03, 0x4f, 0x80, 0x03, 0xa0, 0x40, 0xc0, 0x20, - 0x32, 0x00, 0x0f, 0x81, 0x43, 0x20, 0x00, 0xe8, - 0x44, 0x3e, 0x18, 0x0c, 0x04, 0x83, 0xe0, 0xc1, - 0xe0, 0x00, 0x32, 0x31, 0x0f, 0x84, 0x03, 0xe0, - 0x00, 0xf8, 0x00, 0x3e, 0x00, 0x0c, 0x84, 0x03, - 0xca, 0x04, 0x20, 0x00, 0x00, 0x00, 0x00, 0x28, - 0x45, 0x28, 0x00, 0xba, 0x00, 0x2f, 0x90, 0x08, - 0xa0, 0x02, 0xe8, 0x08, 0xba, 0x00, 0x20, 0x82, - 0x0b, 0xa0, 0x10, 0xe8, 0x00, 0xba, 0x00, 0x27, - 0x90, 0x0b, 0xa0, 0x02, 0xdb, 0x02, 0x8e, 0x48, - 0x23, 0x90, 0x0b, 0x69, 0x0a, 0x3a, 0x00, 0x9e, - 0x80, 0x2f, 0xb0, 0x08, 0xe0, 0x62, 0xf9, 0x18, - 0xfe, 0x00, 0xa3, 0x98, 0x09, 0xe0, 0x02, 0xf8, - 0x00, 0xea, 0x00, 0x2e, 0xa0, 0x28, 0xe0, 0x02, - 0xca, 0x00, 0x40, 0x00, 0x00, 0xed, 0x09, 0x00, - 0xaf, 0x00, 0x00, 0x00, 0x28, 0x05, 0x4c, 0x00, - 0xb3, 0x00, 0x2c, 0x40, 0x08, 0x30, 0x02, 0xcc, - 0x00, 0xb1, 0x80, 0x20, 0x40, 0x0b, 0x30, 0x02, - 0xcc, 0x00, 0xa3, 0x00, 0x2c, 0xd1, 0x03, 0x30, - 0x42, 0x8f, 0x80, 0x83, 0x40, 0x20, 0xe6, 0x0b, - 0x38, 0x02, 0x4e, 0xd0, 0x23, 0xd8, 0x28, 0xd0, - 0x08, 0x31, 0x02, 0xcc, 0x00, 0xa3, 0x98, 0x20, - 0xc0, 0x4b, 0x34, 0x90, 0xcc, 0x10, 0xb3, 0x00, - 0x2c, 0xe0, 0x08, 0x38, 0x82, 0xca, 0x00, 0x50, - 0x00, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x1c, 0x00, - 0xb7, 0x00, 0x2c, 0xa0, 0x09, 0x70, 0x02, 0xdc, - 0x00, 0xb7, 0xc0, 0x21, 0xc0, 0x0b, 0x72, 0x42, - 0xdc, 0x80, 0xb7, 0x02, 0x2d, 0xc0, 0x0b, 0x70, - 0x02, 0xdc, 0x00, 0x87, 0x00, 0xa1, 0xc0, 0x8b, - 0x70, 0x12, 0x1c, 0x00, 0x97, 0x00, 0x6d, 0xf0, - 0x08, 0x70, 0x06, 0xdc, 0x00, 0xb0, 0x00, 0x21, - 0xc0, 0x09, 0x70, 0x82, 0xd8, 0x08, 0xa7, 0x24, - 0x2c, 0xe2, 0x08, 0x74, 0x02, 0xe8, 0x00, 0x40, - 0x00, 0x00, 0x00, 0x00, 0xa8, 0x08, 0x1e, 0x00, - 0xf7, 0x80, 0x3d, 0xa1, 0x0e, 0x78, 0x03, 0xde, - 0x00, 0xf3, 0x80, 0xb1, 0xe0, 0x0f, 0x7a, 0x03, - 0xdf, 0xc0, 0xf7, 0xc0, 0x3d, 0x61, 0x0f, 0x78, - 0x03, 0x9e, 0x00, 0xcf, 0x80, 0x31, 0xe0, 0x0b, - 0xf8, 0x03, 0x1e, 0x04, 0xe7, 0x81, 0x3f, 0xe0, - 0x28, 0x58, 0x03, 0xde, 0x00, 0xe4, 0x80, 0x31, - 0xa0, 0x0f, 0x68, 0x43, 0xde, 0x00, 0xf7, 0x90, - 0x3d, 0xe0, 0x0c, 0x78, 0x03, 0xea, 0x02, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x08, 0x1d, 0xac, 0x00, - 0xfb, 0x00, 0x3e, 0xc0, 0x0a, 0xb0, 0x01, 0xec, - 0x00, 0xfb, 0x04, 0x1e, 0xc0, 0x0f, 0xb2, 0x83, - 0xec, 0x00, 0xdb, 0x28, 0x36, 0x40, 0x0f, 0xb4, - 0x83, 0xe8, 0x00, 0xfa, 0x00, 0x3e, 0xc0, 0x0f, - 0xed, 0x09, 0x00, 0xb0, 0x00, 0xa0, 0x03, 0xec, - 0x00, 0xda, 0x00, 0x3e, 0xc0, 0x0f, 0xa0, 0x03, - 0xec, 0x00, 0x68, 0x00, 0x3a, 0x01, 0x0d, 0x90, - 0x03, 0xe0, 0x00, 0xfb, 0x70, 0x3e, 0xc0, 0xcf, - 0x90, 0x03, 0xc2, 0x06, 0x60, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x05, 0xfe, 0x00, 0xff, 0x80, 0x3d, - 0xa0, 0x0e, 0xf8, 0x03, 0xfe, 0x00, 0xff, 0x80, - 0x3f, 0xe0, 0x0f, 0xf8, 0x83, 0xfe, 0x00, 0xff, - 0x80, 0x3f, 0xe0, 0x0f, 0xf9, 0x83, 0xfe, 0x00, - 0xcf, 0x82, 0x1f, 0x60, 0x0d, 0xf8, 0x01, 0xfe, - 0x00, 0xdf, 0x00, 0x37, 0xe0, 0x1f, 0xf9, 0x03, - 0x3e, 0x00, 0xdc, 0x80, 0x33, 0xa0, 0x0f, 0xd9, - 0x03, 0xb6, 0x00, 0xcf, 0x80, 0x13, 0xe0, 0x0c, - 0xd9, 0x03, 0xc0, 0x00, 0x70, 0x00, 0x00, 0x00, - 0x00, 0xa8, 0x11, 0x9c, 0x00, 0xb7, 0x00, 0x2d, - 0x04, 0x08, 0x70, 0x02, 0xdc, 0x00, 0xb7, 0x00, - 0x2d, 0x40, 0x09, 0x71, 0x02, 0xdc, 0x20, 0xb7, - 0x00, 0x2d, 0xc5, 0x0b, 0x71, 0x86, 0xd4, 0x01, - 0xc5, 0x00, 0x6d, 0x44, 0x04, 0x52, 0x02, 0xd0, - 0x02, 0x8d, 0x00, 0x29, 0x00, 0x0c, 0xf1, 0x02, - 0xb8, 0x00, 0xa4, 0x04, 0x21, 0x80, 0x0b, 0x55, - 0x92, 0x30, 0x40, 0xa7, 0x08, 0x21, 0xc4, 0x0d, - 0x45, 0x82, 0xea, 0x04, 0x60, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x9c, 0x00, 0xb7, 0x00, 0x2d, - 0x80, 0x0a, 0x70, 0x02, 0xdc, 0x00, 0xb5, 0x00, - 0x2d, 0xc0, 0x0b, 0x70, 0x02, 0xdc, 0x00, 0xb7, - 0x00, 0x2d, 0x00, 0x0b, 0x70, 0x06, 0xcc, 0x00, - 0x97, 0x00, 0x2d, 0x82, 0x28, 0x70, 0x06, 0xcc, - 0x00, 0x87, 0x00, 0x21, 0xc0, 0x0b, 0x61, 0x02, - 0x54, 0x40, 0x84, 0x00, 0x21, 0x80, 0x0b, 0x60, - 0x42, 0x94, 0x00, 0x87, 0x10, 0x21, 0xc0, 0x08, - 0x70, 0x02, 0xc0, 0x00, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x20, 0x14, 0xed, 0x09, 0x00, 0xb1, 0x00, - 0xcc, 0x00, 0xb3, 0x02, 0x2c, 0x80, 0x08, 0x30, - 0x02, 0xcc, 0x00, 0xb3, 0x00, 0x2c, 0xc0, 0x09, - 0x3c, 0x02, 0xce, 0x00, 0xb3, 0x80, 0x2c, 0x00, - 0x0b, 0x32, 0x02, 0xc0, 0x00, 0x80, 0x00, 0x2c, - 0xa0, 0x00, 0x0e, 0x42, 0xc0, 0x10, 0x80, 0xe0, - 0x28, 0x20, 0x08, 0x24, 0x00, 0xc3, 0x04, 0xa0, - 0x00, 0x00, 0x00, 0x0b, 0x18, 0xe2, 0x00, 0x20, - 0xab, 0x88, 0x20, 0x44, 0x88, 0x10, 0x02, 0xc8, - 0x04, 0x30, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x15, - 0xac, 0x00, 0xfb, 0x00, 0x3e, 0x80, 0x0e, 0xb0, - 0x03, 0xec, 0x00, 0xfb, 0x00, 0x3e, 0xc0, 0x0f, - 0xfc, 0x83, 0xfc, 0x00, 0xff, 0x88, 0x3e, 0x68, - 0x0f, 0xf4, 0x02, 0xec, 0x08, 0x99, 0x00, 0x2e, - 0xb0, 0x08, 0x92, 0x02, 0xe4, 0x00, 0x89, 0x88, - 0x22, 0x66, 0x1b, 0xa4, 0x83, 0x67, 0x00, 0x08, - 0x00, 0x12, 0xc0, 0x0f, 0xb0, 0x02, 0xa0, 0x00, - 0xcf, 0x02, 0x22, 0xf0, 0x28, 0xa8, 0x03, 0xea, - 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, - 0xec, 0x00, 0xbb, 0x00, 0x3e, 0x80, 0x0f, 0xb0, - 0x03, 0xec, 0x00, 0xf9, 0x02, 0x3e, 0xc0, 0x0f, - 0xb0, 0x03, 0xec, 0x00, 0xfb, 0x00, 0x3e, 0x10, - 0x0f, 0xb0, 0x03, 0xed, 0x10, 0xf9, 0x40, 0x3e, - 0x88, 0x8f, 0x94, 0x03, 0x64, 0x00, 0xe9, 0x04, - 0x3a, 0x50, 0x0e, 0x96, 0x07, 0xa5, 0x40, 0xe8, - 0x42, 0x3e, 0x99, 0x0f, 0xa0, 0x03, 0xe1, 0x00, - 0xfb, 0x00, 0x3e, 0xc2, 0x0f, 0xb0, 0x03, 0xe0, - 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x01, 0x10, - 0xfc, 0x00, 0xff, 0x02, 0x3f, 0x00, 0x0f, 0x70, - 0x03, 0x3c, 0x00, 0xf7, 0x00, 0x71, 0x40, 0x0c, - 0xf0, 0x83, 0x3c, 0x00, 0xff, 0x00, 0x33, 0x40, - 0x0f, 0xf0, 0x03, 0x14, 0x80, 0xed, 0x00, 0x3a, - 0x40, 0x0f, 0xd0, 0x03, 0xf0, 0x00, 0xed, 0x09, - 0x00, 0xb2, 0x00, 0xfd, 0x00, 0x3b, 0x00, 0x0f, - 0xcc, 0x03, 0x30, 0x34, 0xf8, 0x04, 0x3f, 0xa0, - 0x0f, 0x80, 0x03, 0xf0, 0x00, 0xff, 0x00, 0x32, - 0xc0, 0x0b, 0xc0, 0x03, 0xc0, 0x44, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x81, 0x04, 0x6c, 0x00, 0xbb, - 0x00, 0x2e, 0x82, 0x0b, 0xb0, 0x02, 0x2c, 0x00, - 0xbb, 0x90, 0x22, 0xe4, 0x18, 0xb0, 0x22, 0x2c, - 0x00, 0xbb, 0x01, 0x22, 0x30, 0x0b, 0xb0, 0x03, - 0x20, 0x18, 0xc8, 0x80, 0x2e, 0x50, 0x0b, 0x8e, - 0x03, 0xa3, 0x80, 0x98, 0xa0, 0x3a, 0x30, 0x0e, - 0x8c, 0x02, 0xa2, 0x20, 0xb8, 0xe0, 0x2e, 0x36, - 0x0b, 0x88, 0x22, 0xe3, 0x00, 0xbb, 0x06, 0x22, - 0xc0, 0x4b, 0x98, 0x02, 0xe0, 0x40, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x05, 0x2c, 0x00, 0xbb, - 0x00, 0x2e, 0xe0, 0x0b, 0xb0, 0x02, 0x2c, 0x08, - 0xbb, 0x00, 0x2e, 0xc0, 0x08, 0x30, 0x02, 0x2c, - 0x00, 0xb3, 0x00, 0x22, 0x70, 0x0b, 0x30, 0x02, - 0x28, 0x20, 0x88, 0x8c, 0x2e, 0x18, 0x0a, 0x88, - 0x42, 0xe6, 0x00, 0xa8, 0x80, 0x2e, 0x62, 0x8b, - 0x10, 0x86, 0x26, 0x11, 0xb8, 0x80, 0x2e, 0x80, - 0x8b, 0x98, 0x12, 0xe2, 0x00, 0xbb, 0x00, 0x22, - 0xc0, 0x0b, 0x88, 0x02, 0xe0, 0x00, 0x40, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x04, 0x0c, 0x00, 0xb3, - 0x00, 0x2c, 0x80, 0x4b, 0x30, 0x02, 0x0c, 0x04, - 0xb3, 0x00, 0x2c, 0xc0, 0x08, 0x30, 0x42, 0x0c, - 0x00, 0xb3, 0x00, 0x20, 0x00, 0x0b, 0x30, 0x42, - 0x40, 0x01, 0x80, 0x00, 0x2c, 0x00, 0x0b, 0x00, - 0x02, 0xc0, 0x00, 0x90, 0x00, 0x68, 0x00, 0x08, - 0x10, 0x06, 0x80, 0x01, 0xb0, 0x00, 0x24, 0x81, - 0x0b, 0x10, 0x02, 0xc0, 0x08, 0xb3, 0x00, 0x20, - 0xc0, 0x0b, 0x00, 0x02, 0x42, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x0d, 0x6c, 0x00, 0xfb, - 0x00, 0xed, 0x09, 0x00, 0xb3, 0x00, 0x3e, 0x80, - 0x0f, 0xb0, 0x03, 0x2c, 0x00, 0xfb, 0x00, 0xae, - 0xc0, 0x28, 0xf0, 0x0b, 0x3c, 0x00, 0xff, 0x00, - 0xa2, 0x00, 0x0f, 0xf0, 0x0a, 0x20, 0x00, 0x88, - 0x04, 0x3e, 0x00, 0x0e, 0x80, 0x03, 0xe0, 0x00, - 0xe8, 0x07, 0x7e, 0x00, 0x0f, 0x80, 0x23, 0x20, - 0x11, 0xf8, 0x06, 0x3e, 0x00, 0x0f, 0x80, 0x03, - 0xe0, 0x10, 0xf7, 0x02, 0x72, 0xc0, 0x4f, 0x80, - 0x03, 0xc0, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00, - 0xa0, 0x1d, 0xfc, 0x00, 0xff, 0x00, 0x3f, 0x40, - 0x0f, 0xf0, 0x01, 0x7c, 0x00, 0xfd, 0x00, 0x33, - 0x40, 0x0f, 0xf0, 0x03, 0xfc, 0x00, 0xff, 0x00, - 0x3f, 0x00, 0x0f, 0xf0, 0x03, 0xb0, 0x00, 0xec, - 0x04, 0x3f, 0x00, 0x07, 0xc0, 0x06, 0xb0, 0x00, - 0xdc, 0x00, 0x3f, 0x00, 0x1e, 0xc0, 0x03, 0xf0, - 0x00, 0xfc, 0x00, 0x2f, 0x00, 0x4f, 0xd0, 0x07, - 0xf0, 0x00, 0xff, 0x00, 0x7f, 0x40, 0x0f, 0xd0, - 0x03, 0xe8, 0x06, 0x70, 0x00, 0x00, 0x00, 0x00, - 0xc0, 0x05, 0xfc, 0x00, 0xff, 0x00, 0x33, 0x4c, - 0x0c, 0xe1, 0x03, 0x30, 0x90, 0xf5, 0x00, 0x37, - 0x80, 0x0f, 0xd0, 0x02, 0xdc, 0x01, 0xfc, 0x05, - 0x3f, 0x4c, 0x0f, 0xf0, 0x21, 0xfc, 0x00, 0xff, - 0x22, 0x37, 0x08, 0x0b, 0xc0, 0x03, 0xb0, 0x80, - 0xac, 0x24, 0x3f, 0x00, 0x0d, 0xc0, 0x03, 0x31, - 0x80, 0xcf, 0x01, 0x3f, 0x0e, 0x0f, 0xc2, 0x01, - 0xf0, 0x80, 0xec, 0x08, 0x33, 0x0e, 0x0e, 0xf0, - 0x02, 0x70, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x10, 0xec, 0x00, 0xbb, 0x08, 0x22, 0x10, - 0x08, 0xa2, 0x02, 0x29, 0x44, 0xb8, 0x00, 0xa2, - 0x80, 0x0b, 0x90, 0x00, 0xec, 0x00, 0x98, 0x00, - 0x2e, 0x98, 0x0b, 0xb0, 0x03, 0xac, 0x00, 0xeb, - 0x14, 0x2a, 0x44, 0x08, 0x80, 0x02, 0x64, 0xe0, - 0x98, 0x40, 0x2e, 0x56, 0xed, 0x09, 0x00, 0xb4, - 0x00, 0x0b, 0x97, 0x22, 0x21, 0x08, 0xdb, 0x00, - 0x2e, 0x10, 0x0b, 0x94, 0x02, 0x41, 0x90, 0x88, - 0x40, 0x22, 0x50, 0x08, 0xb2, 0x02, 0xe0, 0x04, - 0x30, 0x00, 0x00, 0x00, 0x00, 0x88, 0x05, 0xcc, - 0x00, 0xb3, 0x10, 0x20, 0x50, 0x8a, 0xa0, 0x02, - 0x00, 0x10, 0x99, 0x00, 0x20, 0x80, 0x0b, 0x10, - 0x02, 0xc8, 0x00, 0xb2, 0x00, 0x2c, 0xcc, 0x0b, - 0x30, 0x02, 0xcc, 0x00, 0xb3, 0x00, 0x28, 0x60, - 0x0a, 0x20, 0x02, 0x80, 0x00, 0xb0, 0x38, 0x2c, - 0x08, 0x0b, 0x10, 0x86, 0x40, 0xc0, 0xa3, 0x00, - 0x2c, 0x40, 0x0b, 0x01, 0x02, 0xcc, 0x60, 0x80, - 0x28, 0x60, 0xa0, 0x08, 0x30, 0x82, 0x62, 0x01, - 0x70, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x15, 0xac, - 0x00, 0xb3, 0x00, 0xa2, 0x00, 0x0a, 0xa0, 0x02, - 0x22, 0x08, 0xb9, 0x00, 0x22, 0x86, 0x0b, 0x90, - 0x00, 0xe4, 0x00, 0x9b, 0x00, 0x26, 0xc0, 0x0b, - 0xb0, 0x02, 0x2c, 0x00, 0xab, 0x00, 0x28, 0x60, - 0x08, 0xa0, 0x02, 0x66, 0x34, 0xb8, 0x88, 0x26, - 0x60, 0x0b, 0x98, 0x02, 0x22, 0x00, 0xbb, 0x00, - 0x0e, 0x20, 0x0b, 0x80, 0x02, 0xe4, 0x00, 0x88, - 0x00, 0x22, 0x80, 0x08, 0xb0, 0x00, 0xf0, 0x04, - 0x60, 0x00, 0x00, 0x00, 0x00, 0x40, 0x11, 0xec, - 0x00, 0xf8, 0x40, 0x32, 0x48, 0x2e, 0xb2, 0x0b, - 0x23, 0x80, 0xd3, 0x90, 0x36, 0x90, 0x0f, 0x92, - 0x23, 0xed, 0x00, 0xba, 0x08, 0x3e, 0xe2, 0x0f, - 0xb0, 0x03, 0xec, 0x00, 0xfb, 0x00, 0x3a, 0x20, - 0x4e, 0x80, 0x83, 0xa7, 0x00, 0xe9, 0x80, 0x3e, - 0x28, 0x0d, 0x8a, 0x0b, 0x26, 0x00, 0xeb, 0x04, - 0x3e, 0x28, 0x0f, 0xae, 0x03, 0xe2, 0x00, 0xc9, - 0x24, 0x32, 0x20, 0x2e, 0xb0, 0x03, 0x50, 0x04, - 0x70, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0xbc, - 0x00, 0xfa, 0x00, 0xbf, 0x10, 0x0d, 0xd1, 0xed, - 0x09, 0x00, 0xb5, 0x00, 0x03, 0xf8, 0x00, 0xfd, - 0x00, 0x3f, 0x80, 0x0f, 0xdc, 0x03, 0xfd, 0x00, - 0xff, 0x40, 0x3f, 0xe4, 0x0f, 0xf0, 0x03, 0xfc, - 0x00, 0xef, 0x00, 0x3b, 0x00, 0x0e, 0xe0, 0x02, - 0xd4, 0x04, 0xcc, 0x00, 0x3f, 0x41, 0x8f, 0xd0, - 0x03, 0x94, 0x00, 0xdf, 0x00, 0x3e, 0x00, 0x0f, - 0xd2, 0x03, 0x56, 0x40, 0xfd, 0x10, 0xbf, 0x67, - 0x0f, 0xf0, 0x03, 0xf8, 0x00, 0x60, 0x00, 0x00, - 0x00, 0x00, 0x40, 0x10, 0xac, 0x00, 0xf8, 0x50, - 0xb0, 0x60, 0x0c, 0xb4, 0x03, 0x21, 0x80, 0xfb, - 0x00, 0xb2, 0x80, 0x0a, 0x90, 0x07, 0xed, 0x30, - 0xca, 0x44, 0x32, 0xd8, 0x0f, 0xb0, 0x03, 0xec, - 0x10, 0xfb, 0x10, 0x36, 0x40, 0x0e, 0xa4, 0x03, - 0xe4, 0x00, 0xf9, 0x4a, 0x32, 0x19, 0x0f, 0x96, - 0x03, 0xe4, 0x20, 0xfb, 0x10, 0x32, 0x42, 0x0c, - 0xa4, 0x03, 0x28, 0x10, 0xe2, 0x00, 0x38, 0x80, - 0x0f, 0xb0, 0x82, 0x50, 0x04, 0x20, 0x00, 0x00, - 0x00, 0x00, 0xc8, 0x05, 0x2c, 0x00, 0xba, 0x80, - 0x22, 0x00, 0x08, 0x30, 0x23, 0x60, 0x84, 0xb9, - 0x84, 0x22, 0xc0, 0x08, 0x90, 0x02, 0xec, 0x20, - 0x8b, 0x00, 0x36, 0xd2, 0x01, 0xb0, 0x02, 0xec, - 0x00, 0xb7, 0x80, 0x36, 0x00, 0x08, 0xa9, 0x03, - 0xe4, 0x00, 0xb9, 0x41, 0xaa, 0x41, 0x0b, 0x98, - 0x02, 0x65, 0x10, 0x3f, 0x80, 0x2a, 0x50, 0x0a, - 0x80, 0x02, 0x24, 0x00, 0x8a, 0x20, 0x22, 0x80, - 0x0b, 0xb0, 0x02, 0xf2, 0x00, 0x40, 0x00, 0x00, - 0x00, 0x00, 0xe0, 0x05, 0x4c, 0x00, 0xb3, 0x85, - 0x20, 0x40, 0x00, 0x32, 0x02, 0x80, 0x00, 0xb1, - 0x10, 0x20, 0x40, 0x0a, 0x10, 0x00, 0xcf, 0x00, - 0x82, 0x00, 0x20, 0xf0, 0x0b, 0x30, 0x02, 0xcc, - 0x00, 0xb3, 0x00, 0x24, 0x00, 0x0a, 0x11, 0x02, - 0xc2, 0x40, 0xb1, 0x00, 0x28, 0x50, 0x0b, 0x8d, - 0x02, 0xc4, 0xed, 0x09, 0x00, 0xb6, 0x00, 0x00, - 0xb3, 0x04, 0x28, 0x74, 0x0b, 0x08, 0x02, 0x80, - 0x20, 0xa2, 0x80, 0x2c, 0x04, 0x0b, 0x30, 0x40, - 0x78, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x20, - 0x01, 0x1e, 0x00, 0xb7, 0x80, 0x20, 0x60, 0x08, - 0xd8, 0x22, 0x5a, 0x80, 0xb4, 0xe0, 0x23, 0xe0, - 0x18, 0x58, 0x02, 0xde, 0x00, 0x8e, 0x80, 0x25, - 0xe0, 0x0b, 0x78, 0x02, 0xde, 0x00, 0xb7, 0x84, - 0x25, 0xe0, 0x08, 0x58, 0x02, 0xdf, 0x00, 0xb5, - 0x90, 0x29, 0xe0, 0x0b, 0x78, 0x02, 0x5e, 0x00, - 0xb7, 0x80, 0x29, 0xe0, 0x4b, 0x38, 0x02, 0x1a, - 0x00, 0x86, 0x80, 0x25, 0x60, 0xc3, 0x78, 0x02, - 0xc8, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x48, - 0x08, 0x0c, 0x00, 0xf3, 0x40, 0x30, 0x44, 0x2c, - 0x30, 0x22, 0x84, 0x40, 0xf1, 0x00, 0x30, 0x44, - 0x0e, 0x30, 0x02, 0xcd, 0x00, 0xc3, 0x00, 0x20, - 0xc0, 0x0f, 0x30, 0x03, 0xcc, 0x00, 0xf3, 0x00, - 0x36, 0x41, 0x0e, 0x31, 0x03, 0xc0, 0x00, 0xfb, - 0x00, 0x30, 0x40, 0x0f, 0x00, 0x03, 0xc8, 0x40, - 0xf3, 0x00, 0x38, 0x40, 0x8f, 0x10, 0x83, 0x8c, - 0x80, 0xeb, 0x00, 0x3c, 0x48, 0x8f, 0x33, 0x03, - 0x52, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, - 0x1d, 0xbc, 0x00, 0xff, 0x00, 0x3f, 0x40, 0x0f, - 0x71, 0x13, 0xf8, 0xc4, 0xfd, 0x20, 0x1d, 0xc1, - 0x0f, 0xf0, 0x03, 0xfc, 0x00, 0x77, 0x00, 0x3f, - 0xc4, 0x0d, 0xf0, 0x03, 0xfc, 0x00, 0xf7, 0x12, - 0x3f, 0xc4, 0x4f, 0xf1, 0x03, 0xbc, 0x00, 0xff, - 0x00, 0x17, 0xc0, 0x0f, 0xe0, 0x03, 0xfc, 0x10, - 0xf7, 0x08, 0x3f, 0x84, 0x0e, 0xf0, 0x0b, 0x7c, - 0x00, 0xff, 0x00, 0x23, 0x40, 0x07, 0xf1, 0x03, - 0xd0, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0xa8, - 0x05, 0xec, 0x00, 0xf9, 0x00, 0xb2, 0x40, 0x0f, - 0xb0, 0x03, 0xe0, 0x00, 0xc9, 0xed, 0x09, 0x00, - 0xb7, 0x00, 0x04, 0x32, 0x40, 0x0f, 0x80, 0x03, - 0xec, 0x00, 0xfb, 0x00, 0x2e, 0xc0, 0x0f, 0xb0, - 0x03, 0xec, 0x00, 0xbf, 0x10, 0x7a, 0x80, 0x07, - 0x80, 0x02, 0xe8, 0x00, 0xfb, 0x80, 0xb2, 0x80, - 0x0f, 0xa0, 0x03, 0xe4, 0x00, 0xfb, 0x00, 0x32, - 0xc0, 0x0f, 0x28, 0x03, 0x62, 0x00, 0xc9, 0x80, - 0x22, 0x80, 0x0f, 0xb0, 0x01, 0xea, 0x00, 0x70, - 0x00, 0x00, 0x00, 0x00, 0x48, 0x11, 0x9c, 0x01, - 0xbf, 0x00, 0x21, 0x40, 0x0b, 0x70, 0x12, 0xdc, - 0x00, 0x85, 0x00, 0x21, 0xc1, 0x0b, 0x50, 0x02, - 0xdc, 0x00, 0xb7, 0x00, 0x2d, 0xc0, 0x0b, 0x70, - 0x02, 0xdc, 0x00, 0xb7, 0x80, 0x61, 0xc0, 0x0b, - 0x70, 0x42, 0xd8, 0x00, 0xb6, 0x00, 0x21, 0x80, - 0x4b, 0x70, 0x42, 0xdc, 0x00, 0xb7, 0x20, 0x21, - 0xc0, 0x0b, 0x70, 0x08, 0x0c, 0x00, 0x8d, 0x00, - 0xa1, 0xc0, 0x0b, 0x70, 0x02, 0xd2, 0x04, 0x60, - 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x9e, 0x00, - 0xa5, 0x8d, 0x61, 0x61, 0x0b, 0x78, 0x02, 0xc6, - 0x00, 0x85, 0x82, 0x21, 0xe0, 0x0b, 0x48, 0x06, - 0xde, 0x00, 0xb7, 0x80, 0x2d, 0xf1, 0x0b, 0x78, - 0x02, 0xde, 0x00, 0xb3, 0x80, 0x29, 0xe0, 0x0b, - 0x78, 0x12, 0x5e, 0x1c, 0xb3, 0xc0, 0x21, 0xf0, - 0x0b, 0x78, 0x02, 0xda, 0x00, 0xb3, 0xa0, 0xa9, - 0xe0, 0x0b, 0x78, 0x02, 0x1a, 0x00, 0x87, 0x80, - 0x21, 0xe1, 0x0b, 0x78, 0x02, 0xf0, 0x00, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x48, 0x14, 0xcc, 0x00, - 0xb3, 0x00, 0x22, 0xe5, 0x9b, 0x34, 0x02, 0xcc, - 0x82, 0x81, 0x00, 0x20, 0xd0, 0x0b, 0x18, 0x02, - 0xcd, 0x00, 0xb3, 0x00, 0x2c, 0xd0, 0x0b, 0x30, - 0x02, 0xcc, 0x00, 0xb3, 0x00, 0x68, 0xf0, 0x0b, - 0x30, 0x02, 0xcc, 0x80, 0xb3, 0x20, 0x22, 0xf0, - 0x0b, 0xb0, 0x02, 0xec, 0x00, 0xb3, 0x00, 0x6a, - 0xed, 0x09, 0x00, 0xb8, 0x00, 0xf8, 0x1b, 0x39, - 0x02, 0x0c, 0x04, 0x83, 0x62, 0x20, 0xc4, 0x0b, - 0x30, 0x02, 0xd2, 0x04, 0x30, 0x00, 0x00, 0x00, - 0x00, 0xe8, 0x15, 0xa8, 0x00, 0xfe, 0x00, 0x23, - 0x80, 0x0f, 0xec, 0x83, 0xf8, 0x02, 0xc6, 0xe0, - 0xb3, 0xb8, 0x0f, 0x6e, 0x22, 0xd8, 0x60, 0xfe, - 0xe0, 0x3f, 0x80, 0x0f, 0xa0, 0x03, 0xe8, 0x00, - 0xfa, 0x00, 0xbb, 0x82, 0x0f, 0xe4, 0x93, 0x78, - 0x20, 0xfe, 0x80, 0x33, 0x80, 0x0f, 0xe4, 0x03, - 0xf9, 0x14, 0xfa, 0x00, 0x3b, 0x92, 0x0f, 0xe0, - 0x03, 0x39, 0x02, 0x4e, 0x04, 0x33, 0xa0, 0x0f, - 0xa0, 0x03, 0xfa, 0x04, 0x60, 0x00, 0x00, 0x00, - 0x00, 0x48, 0x00, 0xe0, 0x00, 0xf0, 0x40, 0x3e, - 0x00, 0x0b, 0x80, 0x53, 0xe1, 0x00, 0xf8, 0xc0, - 0x3e, 0x00, 0x0f, 0x88, 0x03, 0xe0, 0x00, 0xf8, - 0x80, 0x3e, 0x00, 0x0f, 0x80, 0x03, 0xe0, 0x00, - 0xf8, 0x00, 0x26, 0x01, 0x0f, 0x88, 0x03, 0xe1, - 0x00, 0x78, 0x00, 0x3e, 0x18, 0x0f, 0x81, 0x83, - 0xe0, 0x20, 0xf8, 0x00, 0x06, 0x00, 0x0f, 0x84, - 0x03, 0xe0, 0x80, 0xf8, 0x10, 0x3e, 0x00, 0x0f, - 0x80, 0x03, 0xd2, 0x00, 0x30, 0x00, 0x00, 0x00, - 0x00, 0x08, 0x10, 0xe4, 0x00, 0xf9, 0xc8, 0x32, - 0x40, 0x0c, 0x98, 0x83, 0xc4, 0x00, 0xd9, 0x00, - 0x32, 0x42, 0x0f, 0x90, 0x03, 0x24, 0x00, 0xe9, - 0x00, 0x3e, 0x62, 0x0f, 0x90, 0x03, 0xe4, 0x00, - 0xf1, 0x20, 0xb0, 0x42, 0x4c, 0x99, 0x03, 0xc4, - 0x00, 0xc9, 0xc0, 0x3e, 0x68, 0x00, 0x90, 0x03, - 0x26, 0x40, 0xc9, 0x00, 0x3a, 0x69, 0x8c, 0x91, - 0x03, 0xe4, 0x00, 0xf9, 0xc0, 0x3e, 0x60, 0xcf, - 0x9c, 0x63, 0xc2, 0x04, 0x10, 0x00, 0x00, 0x00, - 0x00, 0x80, 0x04, 0x64, 0x00, 0xb9, 0x00, 0x26, - 0x50, 0x48, 0x94, 0x12, 0xe5, 0x00, 0x89, 0x60, - 0x22, 0x40, 0x0b, 0xed, 0x09, 0x00, 0xb9, 0x00, - 0x90, 0x4a, 0x64, 0x20, 0x89, 0x00, 0x2e, 0x68, - 0x0b, 0x90, 0x02, 0xe4, 0x00, 0xb9, 0x00, 0x22, - 0x40, 0x0a, 0x9c, 0x02, 0xe5, 0x20, 0x89, 0xa0, - 0x2e, 0x48, 0x08, 0x90, 0x02, 0xa7, 0x00, 0x81, - 0x80, 0x22, 0x42, 0x0a, 0x9e, 0x02, 0xe4, 0x00, - 0xb9, 0x48, 0x2e, 0x64, 0x0b, 0x98, 0x02, 0xe0, - 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x05, - 0x24, 0x00, 0xb9, 0x00, 0xa6, 0x60, 0x08, 0x92, - 0x02, 0xe4, 0x40, 0x89, 0x80, 0x02, 0x40, 0x0b, - 0x90, 0x06, 0x64, 0x00, 0xa9, 0x00, 0x2e, 0x44, - 0x0b, 0x90, 0x02, 0xe4, 0x00, 0xb9, 0x00, 0x26, - 0x40, 0x08, 0x90, 0x02, 0xe4, 0x00, 0x99, 0x01, - 0x2e, 0x40, 0x0a, 0x90, 0x22, 0x6c, 0x00, 0x89, - 0x11, 0x2a, 0x40, 0x08, 0x90, 0x02, 0xe6, 0x10, - 0xb9, 0x00, 0x2e, 0x42, 0x0b, 0x90, 0x02, 0xc6, - 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, - 0x04, 0x00, 0xb3, 0x40, 0x24, 0x50, 0x28, 0x1c, - 0x02, 0xc4, 0x02, 0x91, 0x02, 0xa0, 0x41, 0x0b, - 0x90, 0x22, 0x64, 0x10, 0x81, 0x02, 0x2c, 0x50, - 0x1b, 0x10, 0x02, 0xc4, 0x00, 0xb1, 0x00, 0x24, - 0x50, 0x0a, 0x18, 0x02, 0xc5, 0x00, 0x91, 0x40, - 0x2c, 0x50, 0x0a, 0x1c, 0x02, 0xc5, 0x00, 0x81, - 0x28, 0x20, 0x50, 0x0a, 0x10, 0x02, 0xc5, 0x00, - 0xb1, 0x40, 0x2c, 0x50, 0x0b, 0x14, 0x02, 0xc2, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0x0d, - 0x60, 0x00, 0xf8, 0x00, 0x32, 0x80, 0x0c, 0x80, - 0x23, 0xe8, 0x04, 0xc8, 0x00, 0x32, 0x00, 0x0f, - 0x80, 0x47, 0x60, 0x00, 0xe8, 0x00, 0x3e, 0x00, - 0x0f, 0x80, 0x03, 0xe0, 0x00, 0xf8, 0x00, 0x36, - 0x00, 0x0c, 0x80, 0x03, 0xe0, 0x00, 0xd8, 0x00, - 0x3e, 0x00, 0x0e, 0x80, 0x03, 0x68, 0x00, 0xc8, - 0x20, 0x3a, 0x00, 0x2c, 0x80, 0x07, 0xed, 0x09, - 0x00, 0xba, 0x00, 0xe0, 0x00, 0xf8, 0x00, 0x3e, - 0x00, 0x0f, 0x80, 0x03, 0xee, 0x03, 0x50, 0x00, - 0x00, 0x00, 0x00, 0x98, 0x1d, 0xe4, 0x00, 0xfd, - 0x40, 0x3b, 0x50, 0x4f, 0xd0, 0x13, 0xfd, 0x10, - 0xe5, 0x00, 0x3f, 0x40, 0x0f, 0xd0, 0x03, 0xb4, - 0x00, 0xfd, 0x01, 0x3f, 0xd0, 0x0f, 0x90, 0x03, - 0xe4, 0x08, 0xf9, 0x40, 0x3b, 0xd0, 0x4f, 0xd0, - 0x03, 0xf5, 0x02, 0xed, 0x40, 0x3f, 0x50, 0x2d, - 0xd4, 0x03, 0xb5, 0x02, 0xf9, 0x00, 0x3f, 0x50, - 0x0d, 0xf4, 0x43, 0xf5, 0x00, 0xfd, 0x45, 0x3f, - 0x50, 0x0f, 0x90, 0x03, 0xe6, 0x06, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x18, 0x15, 0xe4, 0x00, 0xfd, - 0x00, 0x33, 0x40, 0x0c, 0xd1, 0x03, 0x34, 0x90, - 0xcd, 0x01, 0x22, 0x40, 0x0f, 0x90, 0x03, 0xf4, - 0x00, 0xf9, 0x04, 0x3d, 0x48, 0x0e, 0x90, 0x03, - 0xe4, 0x00, 0xfd, 0x00, 0x7e, 0x40, 0x0e, 0x50, - 0x03, 0xf4, 0x80, 0xfd, 0x2a, 0x3f, 0x4c, 0x0c, - 0xd0, 0x03, 0x34, 0x00, 0xed, 0x28, 0x3f, 0x48, - 0x0c, 0xd2, 0x83, 0xf4, 0xc0, 0xfd, 0x04, 0x33, - 0x40, 0x0e, 0xd1, 0x03, 0xc6, 0x00, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x38, 0x10, 0xe0, 0x00, 0xb8, - 0x48, 0x22, 0x03, 0x08, 0x80, 0x0a, 0x20, 0x08, - 0xaa, 0x00, 0x22, 0x01, 0x0b, 0x80, 0x02, 0xe0, - 0x00, 0xba, 0x01, 0x2e, 0x0a, 0x08, 0x80, 0x03, - 0xa0, 0x00, 0xb8, 0x40, 0x2e, 0x02, 0x08, 0x80, - 0x02, 0xe0, 0xa0, 0xb8, 0x20, 0x2e, 0x0c, 0x88, - 0x84, 0x82, 0x20, 0x20, 0x88, 0x01, 0x2e, 0x0a, - 0x0d, 0x80, 0x02, 0xe0, 0xc0, 0xba, 0x48, 0x32, - 0x02, 0x0d, 0x80, 0x02, 0xce, 0x04, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x05, 0xc4, 0x00, 0xb1, - 0x30, 0x20, 0x44, 0x08, 0x30, 0x02, 0x84, 0x40, - 0x81, 0x00, 0xe4, 0x40, 0x0b, 0x10, 0x02, 0xc4, - 0x00, 0xed, 0x09, 0x00, 0xbb, 0x00, 0xb1, 0x00, - 0x2c, 0x4c, 0x1a, 0x10, 0x02, 0xc4, 0x00, 0xb1, - 0x10, 0x2c, 0x44, 0x0b, 0x10, 0x02, 0xc4, 0xc0, - 0x91, 0x28, 0x2c, 0x48, 0x0b, 0x13, 0x02, 0x44, - 0x42, 0x83, 0x00, 0x6c, 0x4c, 0x08, 0x10, 0x42, - 0xc4, 0x80, 0xb1, 0x30, 0x20, 0x44, 0x48, 0x10, - 0x42, 0xc2, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x18, 0x11, 0xa4, 0x00, 0xb9, 0x02, 0xa2, 0x48, - 0x08, 0x90, 0x06, 0x24, 0x10, 0xa9, 0x01, 0x26, - 0x40, 0x03, 0x90, 0x16, 0xe4, 0x00, 0xb9, 0x00, - 0x2e, 0x40, 0x08, 0x90, 0x02, 0xa4, 0x00, 0xb9, - 0x00, 0x2c, 0x40, 0x09, 0x94, 0x02, 0xe4, 0x00, - 0xb9, 0x00, 0x2e, 0xd0, 0x0b, 0xb0, 0x0a, 0x64, - 0x01, 0x89, 0x00, 0x2e, 0x50, 0x19, 0x90, 0x00, - 0xe4, 0x10, 0xb1, 0x00, 0x62, 0x50, 0x09, 0x90, - 0x02, 0xc6, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, - 0xa0, 0x05, 0xe4, 0x00, 0xf9, 0x00, 0x32, 0x40, - 0x2c, 0x98, 0x03, 0xa7, 0x48, 0xc1, 0x40, 0xb6, - 0x58, 0x0f, 0x99, 0x03, 0xe4, 0xd0, 0xb9, 0x00, - 0x3e, 0x70, 0x0e, 0x90, 0x03, 0xe4, 0x00, 0xf9, - 0x00, 0x2e, 0x40, 0x0f, 0x98, 0x02, 0xe4, 0x90, - 0xf9, 0x70, 0x1e, 0x40, 0x0f, 0x92, 0x43, 0x67, - 0x80, 0xe9, 0x01, 0x3e, 0x50, 0x0c, 0x90, 0x43, - 0xe5, 0x20, 0xf9, 0x80, 0xb2, 0x75, 0x5c, 0x90, - 0x43, 0xe8, 0x04, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x28, 0x01, 0xa4, 0x00, 0xf9, 0x00, 0x3e, 0x40, - 0x0f, 0x9a, 0x23, 0x46, 0x00, 0xf9, 0x02, 0x3a, - 0x50, 0x0f, 0x98, 0x23, 0xe4, 0x00, 0xf9, 0x24, - 0x3e, 0x70, 0x0f, 0x90, 0x03, 0xe4, 0x00, 0xf9, - 0x00, 0x3e, 0x40, 0x0e, 0x92, 0x83, 0xe4, 0x00, - 0xf9, 0x80, 0x34, 0x40, 0x2c, 0x10, 0x03, 0xa4, - 0x80, 0xf9, 0x00, 0x3e, 0x42, 0x0f, 0x90, 0x23, - 0xe4, 0x98, 0xf9, 0x21, 0xed, 0x09, 0x00, 0xbc, - 0x00, 0x32, 0x61, 0x1d, 0x90, 0x03, 0xca, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0xa0, - 0x00, 0xf8, 0x00, 0x32, 0x00, 0x0f, 0x80, 0x03, - 0x20, 0x00, 0xc8, 0x0a, 0x32, 0x10, 0x4f, 0x80, - 0x01, 0xe0, 0xc2, 0xd8, 0x40, 0x3c, 0x10, 0x2e, - 0x80, 0x03, 0x60, 0x00, 0xf8, 0x00, 0x3e, 0x00, - 0x4f, 0x81, 0x03, 0x21, 0x00, 0xc8, 0x40, 0x3a, - 0x06, 0x0f, 0x81, 0x03, 0xe0, 0x80, 0xe8, 0x80, - 0x3e, 0x00, 0x0f, 0x84, 0x03, 0x20, 0x80, 0xf8, - 0x51, 0x3e, 0x00, 0x2c, 0x81, 0x83, 0xca, 0x04, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x28, 0x05, 0x28, - 0x00, 0xbe, 0x00, 0xa3, 0xa0, 0x0b, 0xe4, 0x02, - 0x38, 0x60, 0xde, 0x20, 0x22, 0x80, 0x0b, 0xa0, - 0x13, 0xba, 0x00, 0x8a, 0x00, 0x2f, 0x88, 0x08, - 0xa0, 0x42, 0xe8, 0x00, 0xbe, 0xc0, 0x2e, 0x81, - 0x0b, 0xe0, 0x02, 0x39, 0x20, 0x8e, 0x08, 0x23, - 0x81, 0x03, 0xe8, 0x43, 0xb8, 0x04, 0xbe, 0x40, - 0x2f, 0x80, 0x0b, 0xe8, 0x82, 0x3b, 0x00, 0xbe, - 0x04, 0x2f, 0x80, 0x00, 0xec, 0x02, 0xca, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x04, 0x0c, - 0x00, 0xbb, 0x00, 0x62, 0xc0, 0x0b, 0xb2, 0x02, - 0x4f, 0x00, 0x82, 0x40, 0x24, 0xc0, 0x0b, 0x30, - 0x02, 0x8d, 0x00, 0x83, 0x00, 0x2c, 0xc0, 0x2b, - 0x30, 0x42, 0xcc, 0x00, 0xb3, 0x48, 0x2c, 0xc0, - 0x0b, 0x38, 0x02, 0x0f, 0x28, 0x83, 0x08, 0x28, - 0xd0, 0x0b, 0x3a, 0x02, 0xac, 0x00, 0xa2, 0x00, - 0x2e, 0xd0, 0x08, 0x30, 0x02, 0x8e, 0x00, 0xb3, - 0xcb, 0x2e, 0xc0, 0x08, 0x30, 0x02, 0xcb, 0x00, - 0x50, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x01, 0x1c, - 0x00, 0xb5, 0x00, 0x21, 0xc2, 0x4b, 0xf0, 0x02, - 0x4c, 0x00, 0x9e, 0x00, 0x25, 0xc0, 0x0b, 0x70, - 0x02, 0x92, 0x00, 0x87, 0x00, 0x2d, 0xc0, 0xed, - 0x09, 0x00, 0xbd, 0x00, 0x09, 0x70, 0x02, 0xdc, - 0x00, 0xb7, 0x40, 0x2d, 0xc8, 0x0b, 0x68, 0x4a, - 0x1a, 0x00, 0x87, 0x80, 0x2d, 0xc0, 0x0b, 0x70, - 0x02, 0x9d, 0x00, 0xb6, 0x00, 0x2d, 0xc0, 0x0b, - 0x18, 0x02, 0x9d, 0x00, 0xb5, 0x00, 0x2c, 0x80, - 0x08, 0x70, 0x02, 0xe8, 0x00, 0x40, 0x00, 0x00, - 0x00, 0x00, 0xa8, 0x08, 0x1e, 0x00, 0xf3, 0x80, - 0x21, 0x60, 0x4f, 0x68, 0x0b, 0x5e, 0x04, 0xc6, - 0x80, 0xb5, 0xe0, 0x0f, 0x78, 0x03, 0x9a, 0x00, - 0xc7, 0x80, 0x3d, 0xa0, 0x0f, 0x78, 0x03, 0xde, - 0x00, 0xf5, 0x80, 0x2d, 0xe0, 0x0f, 0x58, 0x03, - 0x3e, 0x02, 0xcf, 0x80, 0x39, 0xe0, 0x0f, 0x68, - 0x03, 0x9e, 0x00, 0xe6, 0x80, 0x3d, 0xe0, 0x0c, - 0x68, 0x03, 0x96, 0x00, 0xf7, 0x80, 0x2d, 0xe0, - 0x0c, 0x78, 0x23, 0xea, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x1d, 0xac, 0x00, 0xfb, 0x00, - 0x2e, 0x40, 0x0f, 0x20, 0x43, 0xac, 0x00, 0xf3, - 0x00, 0x3a, 0xc0, 0x0f, 0xb0, 0x03, 0x80, 0x00, - 0xeb, 0x00, 0x3e, 0xc0, 0x0e, 0xb0, 0x03, 0xec, - 0x00, 0xf9, 0x04, 0x3e, 0xda, 0x0d, 0x80, 0x03, - 0xec, 0x00, 0xfa, 0x00, 0x32, 0xc0, 0x0f, 0xb0, - 0x23, 0xa8, 0x00, 0xfa, 0x00, 0x3e, 0x40, 0x8f, - 0x80, 0x0b, 0x64, 0x00, 0xf9, 0x00, 0x3e, 0x40, - 0x0f, 0xb0, 0x03, 0xc2, 0x06, 0x60, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x05, 0xfe, 0x00, 0xff, 0x20, - 0x33, 0xe4, 0x0f, 0xd8, 0x03, 0xfe, 0x00, 0xc7, - 0x80, 0x33, 0xe0, 0x0f, 0xf1, 0x03, 0x72, 0x00, - 0x5f, 0x80, 0x3f, 0xc8, 0x0c, 0xf8, 0x03, 0xfe, - 0x01, 0xff, 0x90, 0x37, 0xe2, 0x0e, 0x78, 0x02, - 0x3e, 0x44, 0xff, 0x81, 0x37, 0xe0, 0x0c, 0xf8, - 0x02, 0xbe, 0x40, 0xdc, 0x80, 0x3f, 0xa0, 0x0f, - 0xf8, 0x03, 0x7e, 0x00, 0xdf, 0x80, 0x33, 0xe0, - 0x89, 0xe9, 0xed, 0x09, 0x00, 0xbe, 0x00, 0x01, - 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0xa8, - 0x11, 0x9c, 0x00, 0xb5, 0x10, 0x01, 0x40, 0x0b, - 0x40, 0x22, 0xdc, 0x00, 0x87, 0x00, 0x21, 0xc4, - 0x0b, 0x70, 0x22, 0x9c, 0x00, 0x97, 0x10, 0x2f, - 0xc0, 0x08, 0x70, 0x02, 0xdc, 0x00, 0xb7, 0x00, - 0x2d, 0xc0, 0x08, 0x61, 0x82, 0x14, 0xc0, 0xb7, - 0x20, 0x2f, 0x84, 0x08, 0x50, 0x03, 0x5c, 0x00, - 0xa4, 0x10, 0x2d, 0x80, 0x0f, 0x52, 0x02, 0xd8, - 0x00, 0xb7, 0x44, 0x21, 0x98, 0x0a, 0xf1, 0x02, - 0x2a, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x9c, 0x00, 0xb7, 0x00, 0x21, 0xc2, 0x8b, - 0x60, 0x82, 0xd0, 0x00, 0x8e, 0x08, 0x21, 0xc0, - 0x0b, 0xf1, 0x06, 0xd4, 0x00, 0xb7, 0x00, 0x2d, - 0x82, 0x09, 0x70, 0x02, 0xdc, 0x00, 0xb5, 0x02, - 0x25, 0xc0, 0x0b, 0x50, 0x02, 0x1c, 0x04, 0xb5, - 0x04, 0x2d, 0x40, 0x08, 0x70, 0x02, 0x94, 0x00, - 0xa4, 0x00, 0x2d, 0xc2, 0x0b, 0x40, 0xc2, 0xdc, - 0x00, 0xb4, 0x00, 0x29, 0xc0, 0x4b, 0x41, 0x02, - 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x20, - 0x14, 0xcc, 0x00, 0xb3, 0x02, 0x20, 0x70, 0x0b, - 0xa0, 0x12, 0xc1, 0x00, 0x83, 0xc8, 0x20, 0xe4, - 0x0b, 0x34, 0x9a, 0x8d, 0x00, 0xb3, 0x60, 0x2c, - 0xe0, 0x09, 0x30, 0x02, 0xcc, 0x00, 0xb3, 0x02, - 0x2c, 0xe0, 0x09, 0x04, 0x02, 0x26, 0x65, 0x30, - 0x00, 0x2c, 0x10, 0x08, 0x1a, 0x16, 0xc1, 0x00, - 0xa0, 0x00, 0x2c, 0x50, 0x4b, 0x0c, 0x82, 0xe8, - 0x00, 0xb0, 0x00, 0x68, 0x40, 0x0a, 0x10, 0x42, - 0x08, 0x04, 0x30, 0x00, 0x00, 0x00, 0x00, 0xa8, - 0x15, 0xac, 0x00, 0xfa, 0x00, 0x22, 0x70, 0x0f, - 0xa8, 0x03, 0xce, 0x00, 0xca, 0xc0, 0xb2, 0xe4, - 0x0f, 0x34, 0x03, 0xe6, 0x20, 0xdb, 0x40, 0x3e, - 0xf4, 0x0d, 0xb0, 0x03, 0xec, 0xed, 0x09, 0x00, - 0xbf, 0x00, 0x00, 0xfb, 0x01, 0x37, 0xe5, 0x0b, - 0x30, 0x03, 0x26, 0x00, 0xb8, 0x50, 0x36, 0x22, - 0x0c, 0x9c, 0x03, 0xa3, 0x22, 0xc3, 0x00, 0x3e, - 0x74, 0x0f, 0xa8, 0x03, 0xe9, 0x80, 0xfa, 0x04, - 0x3a, 0x50, 0x0d, 0x90, 0x07, 0x2a, 0x04, 0x60, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0xec, 0x00, - 0xf8, 0x80, 0xbe, 0x52, 0x0f, 0xa0, 0x03, 0xef, - 0x02, 0xf8, 0x00, 0x3e, 0xc0, 0x0f, 0xb0, 0x0b, - 0xe5, 0x00, 0xdb, 0x00, 0x3e, 0xc0, 0x0e, 0xb0, - 0x03, 0xec, 0x01, 0xfb, 0x00, 0x0e, 0xc4, 0x0e, - 0xa0, 0x8b, 0xe0, 0x04, 0xf8, 0x00, 0x3e, 0x58, - 0x2f, 0x91, 0x43, 0x20, 0x00, 0xc9, 0x00, 0x3e, - 0x00, 0x0e, 0x80, 0x03, 0xed, 0x28, 0xf8, 0x40, - 0x16, 0x80, 0x05, 0x84, 0x03, 0xe0, 0x00, 0x30, - 0x00, 0x00, 0x00, 0x00, 0x01, 0x10, 0xfc, 0x00, - 0xf7, 0x00, 0x37, 0x00, 0x0c, 0xc0, 0x03, 0x2e, - 0xa4, 0xcd, 0x80, 0x3f, 0xc0, 0x0d, 0xf0, 0x03, - 0x34, 0x22, 0xcf, 0x00, 0x3d, 0x80, 0x01, 0xf0, - 0x03, 0xfc, 0x00, 0xfd, 0x02, 0x36, 0xc1, 0x0e, - 0xc4, 0x03, 0x34, 0x00, 0xd5, 0x00, 0x29, 0x40, - 0x0c, 0x80, 0x03, 0xe4, 0x20, 0xdf, 0x00, 0xb5, - 0x40, 0x0c, 0xe0, 0x03, 0x30, 0x00, 0xca, 0x00, - 0x3f, 0x02, 0x0d, 0xf0, 0x11, 0x00, 0x44, 0x30, - 0x00, 0x00, 0x00, 0x00, 0x81, 0x04, 0x6c, 0x00, - 0xbb, 0x40, 0x20, 0x20, 0x48, 0x8c, 0x8a, 0x2e, - 0x00, 0x8a, 0x48, 0x3c, 0xc0, 0x08, 0xb0, 0x12, - 0x44, 0x00, 0x8b, 0x00, 0x2e, 0x60, 0x08, 0xb0, - 0x03, 0xec, 0x00, 0xb1, 0x50, 0x22, 0xc0, 0x0b, - 0x80, 0x82, 0x26, 0x80, 0xa8, 0xc0, 0xb6, 0x70, - 0x28, 0x9c, 0x02, 0xe3, 0x20, 0xbb, 0x88, 0x22, - 0x30, 0x08, 0x0c, 0x03, 0xe7, 0x80, 0x88, 0x00, - 0x3a, 0x11, 0x01, 0xa9, 0x02, 0x20, 0x40, 0x10, - 0xed, 0x09, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x80, 0x05, 0x2c, 0x00, 0xba, 0x40, 0x22, - 0x62, 0x08, 0x98, 0x02, 0x2c, 0x20, 0x89, 0x10, - 0x2e, 0xc0, 0x09, 0xb0, 0x02, 0x69, 0x40, 0x8b, - 0x00, 0x2e, 0xe0, 0x1b, 0xb0, 0x22, 0xec, 0x00, - 0xba, 0x08, 0x26, 0xc0, 0x0b, 0xb0, 0x22, 0x22, - 0x00, 0xa9, 0xc0, 0x62, 0x20, 0x08, 0x88, 0x02, - 0xe6, 0x00, 0xb8, 0x20, 0x22, 0x62, 0x1b, 0xa6, - 0x02, 0xa0, 0x45, 0x8b, 0x00, 0x2e, 0x60, 0x09, - 0x04, 0x02, 0xa0, 0x00, 0x40, 0x00, 0x00, 0x00, - 0x00, 0x08, 0x04, 0x0c, 0x00, 0xb0, 0x00, 0x22, - 0x40, 0x08, 0x00, 0x02, 0x00, 0x00, 0x83, 0x00, - 0x2a, 0xc0, 0x08, 0xb0, 0x02, 0x68, 0x00, 0x83, - 0x00, 0x2c, 0xc0, 0x09, 0x30, 0x02, 0x8c, 0x00, - 0xb2, 0x00, 0x24, 0xc0, 0x0b, 0x80, 0x12, 0x00, - 0x00, 0xa1, 0x05, 0x28, 0x00, 0x48, 0x00, 0x10, - 0xc4, 0x00, 0xb0, 0x00, 0x20, 0x00, 0x49, 0x00, - 0x02, 0xc0, 0x00, 0x83, 0x00, 0x28, 0x80, 0x01, - 0x00, 0x02, 0x82, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x0d, 0x6c, 0x00, 0xf3, 0x00, 0x32, - 0x01, 0x0c, 0x80, 0x03, 0x2c, 0x00, 0xcb, 0x00, - 0x2e, 0xc0, 0x0d, 0xb0, 0x03, 0x68, 0x04, 0xcb, - 0x04, 0x3e, 0x80, 0x0f, 0xb0, 0x02, 0xec, 0x00, - 0xf8, 0x00, 0x37, 0xc0, 0x0f, 0x90, 0x2b, 0x20, - 0x08, 0xf9, 0x00, 0x2a, 0x40, 0x0c, 0x80, 0x10, - 0xe4, 0x00, 0xd8, 0x00, 0x32, 0x40, 0x8f, 0xa0, - 0x01, 0x20, 0x00, 0xc8, 0x00, 0x3c, 0x00, 0x0d, - 0x80, 0x0b, 0x80, 0x03, 0x50, 0x00, 0x00, 0x00, - 0x00, 0xa0, 0x19, 0xfc, 0x00, 0xff, 0x00, 0x3b, - 0x01, 0x0f, 0xc0, 0x03, 0xf0, 0x00, 0x3c, 0x00, - 0x2f, 0xc0, 0x0f, 0x70, 0x03, 0xb8, 0x00, 0xff, - 0x00, 0x3f, 0xc1, 0x0e, 0xf0, 0x03, 0xfc, 0x00, - 0xfc, 0x00, 0x3b, 0xed, 0x09, 0x00, 0xc1, 0x00, - 0xc0, 0x0f, 0xc0, 0x03, 0xf0, 0x00, 0xfc, 0x00, - 0x27, 0x00, 0x0f, 0xc0, 0x13, 0xf0, 0x00, 0xfc, - 0x00, 0x3f, 0x00, 0x8e, 0xc0, 0x01, 0x70, 0x00, - 0xfc, 0x00, 0x3f, 0x00, 0x09, 0xc0, 0x13, 0x68, - 0x02, 0x50, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x15, - 0xfc, 0x44, 0xfc, 0x01, 0x3b, 0xc6, 0x8c, 0xe0, - 0x03, 0xfc, 0x22, 0xcf, 0x23, 0x33, 0xc8, 0x0f, - 0xf0, 0x03, 0x7c, 0x20, 0xff, 0x10, 0x3b, 0xd0, - 0x0f, 0xf6, 0x03, 0x30, 0x00, 0xfc, 0x08, 0x3f, - 0x00, 0x0f, 0xf1, 0x03, 0xb0, 0x80, 0xff, 0x00, - 0x3f, 0xc0, 0x09, 0xf3, 0x03, 0x30, 0x40, 0xdc, - 0x10, 0x37, 0x00, 0x8d, 0xc3, 0x03, 0x30, 0x20, - 0x4c, 0x00, 0x1f, 0xc2, 0x0f, 0xf0, 0x03, 0xf0, - 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0xc2, 0x90, - 0x8c, 0x80, 0xb3, 0x08, 0x23, 0xc8, 0x08, 0x90, - 0x82, 0xfd, 0x00, 0x8f, 0x50, 0x23, 0xc4, 0x8b, - 0x32, 0x02, 0xfc, 0x00, 0xbb, 0x20, 0xa3, 0xd4, - 0x0b, 0xf6, 0x02, 0x20, 0x20, 0xb8, 0x00, 0x2e, - 0x4a, 0x0e, 0xf0, 0x02, 0x20, 0xa0, 0xbf, 0x00, - 0x0f, 0xc0, 0x0b, 0xf2, 0x02, 0xa0, 0x80, 0xc8, - 0x01, 0x2e, 0x14, 0x08, 0x81, 0x02, 0xa0, 0x00, - 0x88, 0x00, 0x2e, 0xd8, 0x0b, 0xb0, 0x02, 0xe0, - 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0xca, 0x04, - 0x8c, 0x80, 0xbb, 0x20, 0x28, 0xc0, 0x08, 0x12, - 0x02, 0xcc, 0x00, 0x83, 0x00, 0x20, 0xc0, 0x0b, - 0x30, 0x82, 0xcc, 0x00, 0xb3, 0x00, 0x20, 0xc8, - 0x0b, 0x31, 0x02, 0x00, 0x40, 0xb0, 0x08, 0x0c, - 0x40, 0x8b, 0x33, 0x02, 0x00, 0x40, 0xb3, 0x00, - 0x2c, 0xc1, 0x49, 0x36, 0x02, 0x80, 0x00, 0xa0, - 0xa5, 0x2c, 0x00, 0x0b, 0x02, 0x02, 0x00, 0x01, - 0x82, 0x82, 0x64, 0xc2, 0x0b, 0x30, 0x02, 0xe2, - 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0xed, 0x09, - 0x00, 0xc2, 0x00, 0xc0, 0x14, 0xac, 0x00, 0xb9, - 0x50, 0x62, 0xc0, 0x88, 0xb0, 0x02, 0xec, 0x00, - 0x8b, 0x02, 0x22, 0xc0, 0x0b, 0xb0, 0x22, 0xec, - 0x00, 0xbb, 0x00, 0x22, 0xc0, 0x0b, 0xb0, 0x02, - 0x26, 0x20, 0xb9, 0x80, 0x2e, 0xc1, 0x0a, 0xb0, - 0x42, 0x22, 0x00, 0xbb, 0x00, 0x2e, 0xc1, 0x0b, - 0xb0, 0x02, 0xa8, 0x20, 0xab, 0x00, 0x2e, 0x20, - 0x2a, 0x8c, 0x02, 0xa3, 0x00, 0x2a, 0x80, 0x2e, - 0xc0, 0x0b, 0xb0, 0x02, 0xf0, 0x04, 0x60, 0x00, - 0x00, 0x00, 0x00, 0x41, 0x44, 0xac, 0x08, 0xf3, - 0x80, 0x3a, 0xc0, 0x0c, 0x95, 0x03, 0xec, 0x00, - 0x4b, 0x00, 0x32, 0xc0, 0x0f, 0xb0, 0x43, 0xec, - 0x00, 0xfb, 0x00, 0x32, 0xc0, 0x0f, 0xb0, 0x03, - 0x22, 0x00, 0xf8, 0xc0, 0x3e, 0x74, 0x0f, 0xb0, - 0x03, 0x23, 0x80, 0xbb, 0x00, 0x3e, 0xc0, 0x0d, - 0xb0, 0x13, 0xa1, 0x03, 0xe8, 0x80, 0x34, 0x30, - 0x4f, 0x88, 0x03, 0x03, 0x00, 0xc8, 0x00, 0x36, - 0xc0, 0x0f, 0xb0, 0x03, 0xd0, 0x04, 0x70, 0x00, - 0x00, 0x00, 0x00, 0xe0, 0x11, 0xbc, 0x00, 0xfe, - 0x80, 0x3d, 0xc0, 0x0f, 0xd8, 0x13, 0xdc, 0x00, - 0xf7, 0x00, 0xbf, 0xc0, 0x0f, 0xf0, 0x03, 0xfc, - 0x00, 0xff, 0x01, 0x37, 0xc0, 0x0f, 0xf0, 0x0b, - 0xf4, 0x00, 0x9d, 0x00, 0x3f, 0xc0, 0x1f, 0xb0, - 0x03, 0x64, 0x00, 0xff, 0x00, 0x3f, 0xc1, 0x0f, - 0xf0, 0x43, 0xf2, 0x40, 0xdf, 0x24, 0x3e, 0x01, - 0x09, 0x40, 0x03, 0xf0, 0x20, 0xde, 0x08, 0x1f, - 0xc0, 0x0f, 0xf0, 0x03, 0xf8, 0x00, 0x60, 0x00, - 0x00, 0x00, 0x00, 0x44, 0x10, 0xac, 0x00, 0xcb, - 0x40, 0xb2, 0xc1, 0x0c, 0x84, 0x03, 0xec, 0x00, - 0xfb, 0x00, 0x3a, 0xc0, 0x0f, 0xb0, 0x03, 0x2c, - 0x20, 0xcb, 0x00, 0x3e, 0xc0, 0x0d, 0xb0, 0x03, - 0x62, 0x00, 0xf8, 0x60, 0x3e, 0x50, 0x0f, 0xb0, - 0x83, 0xed, 0x09, 0x00, 0xc3, 0x00, 0x24, 0x02, - 0xcb, 0x00, 0x3e, 0xc4, 0x0f, 0xb2, 0x03, 0xe9, - 0x00, 0xf8, 0x80, 0x3e, 0x00, 0x84, 0x84, 0x03, - 0x60, 0x40, 0xda, 0x12, 0x7e, 0xc0, 0x4c, 0xb0, - 0x43, 0xd0, 0x04, 0x20, 0x00, 0x00, 0x00, 0x00, - 0xd8, 0x05, 0x2c, 0x00, 0x8b, 0x00, 0x23, 0xc0, - 0x08, 0x90, 0x02, 0xfc, 0x00, 0xbf, 0x88, 0x2b, - 0xc0, 0x0b, 0xb0, 0x02, 0x3c, 0x00, 0x8b, 0x02, - 0x3b, 0xd0, 0x08, 0xf0, 0x02, 0xe5, 0x08, 0xb9, - 0x48, 0x2e, 0xc4, 0x0e, 0xf0, 0x02, 0x24, 0x00, - 0x8f, 0x0f, 0x33, 0xf4, 0x0b, 0xfc, 0x83, 0xa8, - 0x00, 0xfb, 0x80, 0x2e, 0x60, 0x0d, 0x80, 0x02, - 0xe0, 0x00, 0x9b, 0x00, 0x2f, 0xc0, 0x08, 0xb0, - 0x02, 0xf2, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, - 0xe0, 0x04, 0x4c, 0x08, 0x83, 0x00, 0x24, 0xc0, - 0x08, 0x10, 0x02, 0xce, 0xc0, 0x93, 0x48, 0x28, - 0xc0, 0x0b, 0x30, 0x40, 0x0c, 0x40, 0x8b, 0x00, - 0x2c, 0xc2, 0x0b, 0xb0, 0x02, 0xc1, 0x80, 0x90, - 0xc4, 0x6c, 0x40, 0x0b, 0xb0, 0x0a, 0x00, 0x00, - 0x83, 0x20, 0x28, 0xe0, 0x09, 0xbc, 0x02, 0x20, - 0x08, 0xb0, 0x00, 0x24, 0x20, 0x08, 0x00, 0x02, - 0x82, 0x00, 0xb0, 0xc0, 0x20, 0xc0, 0x08, 0x30, - 0x02, 0xf8, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, - 0xb0, 0x50, 0x5e, 0x02, 0x87, 0x80, 0x24, 0xe4, - 0x08, 0x49, 0x02, 0xde, 0x00, 0xb3, 0x90, 0x29, - 0xe0, 0x0b, 0x78, 0x02, 0x0e, 0x00, 0x87, 0x82, - 0x29, 0xe0, 0x0a, 0x78, 0x02, 0xd2, 0x10, 0xb4, - 0x80, 0x0d, 0x60, 0x1a, 0x78, 0x02, 0x16, 0x00, - 0x83, 0x80, 0x21, 0xe4, 0x0b, 0x78, 0x06, 0x9a, - 0x00, 0xb4, 0x80, 0x2d, 0x24, 0x09, 0x48, 0x42, - 0xd6, 0x00, 0xb6, 0x80, 0x2d, 0xe0, 0x08, 0x78, - 0x02, 0xc8, 0x04, 0x40, 0x00, 0x00, 0x00, 0x00, - 0x68, 0x08, 0x4c, 0x00, 0xed, 0x09, 0x00, 0xc4, - 0x00, 0xc2, 0x00, 0x34, 0xc0, 0x0c, 0x14, 0x02, - 0xcc, 0x40, 0xf3, 0x10, 0x38, 0xc0, 0x0f, 0x31, - 0x03, 0x0c, 0x02, 0x83, 0x00, 0x3e, 0xc2, 0x0f, - 0x30, 0x02, 0x4c, 0x80, 0xf3, 0x00, 0x2c, 0xc4, - 0x0b, 0x31, 0x03, 0x0c, 0x00, 0x83, 0x00, 0x3c, - 0xc0, 0x8f, 0x30, 0x03, 0x80, 0x80, 0xf3, 0x00, - 0x3c, 0x12, 0x5c, 0x01, 0x13, 0x00, 0x00, 0x52, - 0x10, 0x3a, 0xc0, 0x2c, 0x30, 0x43, 0xd2, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0xbc, - 0x40, 0xff, 0x00, 0x3b, 0xd0, 0x0f, 0xd0, 0x03, - 0xfc, 0x20, 0xff, 0x10, 0x37, 0xc0, 0x0f, 0xf0, - 0x0b, 0xfc, 0x40, 0xff, 0x00, 0x2b, 0xc0, 0x4d, - 0xf1, 0x13, 0xfc, 0x00, 0xff, 0x10, 0x3f, 0xc0, - 0x8f, 0xf5, 0x83, 0xfc, 0x00, 0xff, 0x18, 0x3f, - 0xc2, 0x0f, 0xf0, 0x83, 0xb8, 0x00, 0xef, 0x00, - 0x17, 0x80, 0x5f, 0xc0, 0x43, 0xfc, 0x40, 0xde, - 0x00, 0x3f, 0xc0, 0x0f, 0xf1, 0x01, 0xd0, 0x04, - 0x60, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0xac, - 0x00, 0xf9, 0x00, 0x3e, 0xd0, 0x08, 0xb8, 0x03, - 0x2d, 0x00, 0xfb, 0x70, 0x3e, 0xcc, 0x0f, 0xb0, - 0x03, 0xed, 0x80, 0xfb, 0x00, 0x3e, 0xc2, 0x07, - 0xbb, 0x23, 0xec, 0x04, 0xfb, 0x86, 0x32, 0xc0, - 0x0f, 0xb2, 0x41, 0x60, 0x00, 0xfb, 0xca, 0x3a, - 0xf0, 0x0e, 0xbc, 0x03, 0x0a, 0x00, 0xeb, 0x00, - 0x7c, 0x00, 0x4d, 0x80, 0x23, 0xa2, 0x04, 0xc8, - 0x00, 0x3e, 0xc4, 0x0f, 0xb0, 0x03, 0xea, 0x04, - 0x70, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x98, 0x9c, - 0x00, 0xb7, 0x00, 0x2d, 0xd8, 0x08, 0x50, 0x02, - 0x1c, 0x48, 0xb3, 0x10, 0x21, 0xcc, 0x0b, 0x70, - 0x02, 0xdc, 0xc0, 0xb7, 0x04, 0x2d, 0xd8, 0x49, - 0x70, 0x92, 0x1c, 0x10, 0xbf, 0x00, 0x21, 0xc0, - 0x0e, 0x72, 0x02, 0xd4, 0x00, 0xb7, 0x00, 0xed, - 0x09, 0x00, 0xc5, 0x00, 0x28, 0xca, 0x08, 0x31, - 0x02, 0x9c, 0x00, 0x87, 0x00, 0x2d, 0x41, 0x08, - 0x40, 0x02, 0xd4, 0x00, 0xa7, 0x00, 0x2d, 0xc8, - 0x0b, 0x70, 0x02, 0xd2, 0x04, 0x60, 0x00, 0x00, - 0x00, 0x00, 0x20, 0x00, 0x1e, 0x00, 0xb7, 0xc0, - 0x29, 0xe0, 0x08, 0xd8, 0x22, 0x1e, 0x80, 0xb7, - 0x80, 0x25, 0xe0, 0x0b, 0x78, 0x02, 0x1e, 0x40, - 0xb7, 0x80, 0x2d, 0xe0, 0x0b, 0x78, 0x06, 0x9e, - 0x00, 0xb7, 0x80, 0x21, 0xe0, 0x0b, 0x78, 0x02, - 0x5e, 0x00, 0xb3, 0xa2, 0x29, 0xe8, 0x0a, 0x7a, - 0x02, 0x3e, 0x00, 0xa7, 0x80, 0x2d, 0x21, 0x09, - 0x48, 0x12, 0xca, 0x00, 0xa6, 0x80, 0x6d, 0xe0, - 0x0b, 0x78, 0x02, 0xf0, 0x00, 0x20, 0x00, 0x00, - 0x00, 0x00, 0x48, 0x04, 0xcc, 0x00, 0xb0, 0x80, - 0x2e, 0xc0, 0x28, 0x24, 0x02, 0x0c, 0x00, 0xbb, - 0x00, 0x20, 0xc0, 0x0b, 0x30, 0x02, 0xcc, 0x00, - 0xb3, 0x00, 0x2c, 0xc0, 0x09, 0x30, 0x02, 0x0c, - 0x84, 0xb3, 0xc8, 0x22, 0xe0, 0x0a, 0x30, 0x02, - 0xec, 0x20, 0xb3, 0x02, 0x28, 0xc0, 0x08, 0x30, - 0x02, 0x8c, 0x00, 0xa3, 0x80, 0x2c, 0xd0, 0x08, - 0x39, 0x02, 0xcc, 0x05, 0xa3, 0x01, 0x2c, 0xc0, - 0x1b, 0x30, 0x02, 0xd2, 0x00, 0x30, 0x00, 0x00, - 0x00, 0x00, 0xe0, 0x15, 0xe8, 0x00, 0xfe, 0x40, - 0x3e, 0x80, 0x0c, 0xe4, 0x03, 0x28, 0x00, 0xfa, - 0x00, 0x3e, 0x80, 0x0f, 0xa0, 0x13, 0x28, 0x08, - 0xfa, 0x00, 0x3e, 0x80, 0x0f, 0xa0, 0x03, 0xf8, - 0x00, 0xfe, 0x84, 0x33, 0xb6, 0x0f, 0xa0, 0x02, - 0x79, 0x00, 0xfa, 0x00, 0x3a, 0x80, 0x06, 0xa0, - 0x03, 0x3b, 0x00, 0x6e, 0x0b, 0x3d, 0x80, 0x0d, - 0xec, 0x03, 0xfa, 0x20, 0xc6, 0xc8, 0x3e, 0x80, - 0x0f, 0xa0, 0x03, 0xfa, 0x00, 0x60, 0x00, 0x00, - 0x00, 0x00, 0x48, 0x01, 0xa0, 0x00, 0xf8, 0x00, - 0x3e, 0x00, 0xed, 0x09, 0x00, 0xc6, 0x00, 0x0f, - 0x82, 0x0b, 0xe1, 0x00, 0xf8, 0x00, 0x3e, 0x00, - 0x0f, 0x80, 0x01, 0xe0, 0x00, 0xf8, 0x02, 0x3e, - 0x00, 0x09, 0x80, 0x13, 0xe0, 0x00, 0xb8, 0x10, - 0xbe, 0x00, 0x0f, 0x84, 0x13, 0xe0, 0x00, 0xf8, - 0x40, 0x36, 0x00, 0x0f, 0x80, 0x03, 0xe2, 0x40, - 0xd8, 0x00, 0x3e, 0x08, 0x4f, 0x80, 0x82, 0xe0, - 0x00, 0xf8, 0xc0, 0x3e, 0x00, 0x0f, 0x80, 0x03, - 0xd2, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x10, 0xa4, 0x08, 0xf9, 0x08, 0x3e, 0x40, 0x0c, - 0x90, 0x03, 0xe5, 0x00, 0xf9, 0x02, 0x32, 0x40, - 0x0f, 0x90, 0x03, 0xe4, 0x40, 0x79, 0x00, 0x32, - 0x40, 0x0f, 0x90, 0x43, 0xa4, 0x04, 0xf9, 0x00, - 0x3e, 0x40, 0x04, 0x90, 0x03, 0xe4, 0x00, 0xc9, - 0x22, 0x3e, 0x64, 0x0f, 0x90, 0x03, 0xe4, 0x08, - 0xf9, 0x08, 0x3e, 0x40, 0x0e, 0x90, 0x01, 0xa4, - 0x80, 0xf9, 0x00, 0x30, 0x40, 0x0e, 0x90, 0x03, - 0xc2, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x04, 0x64, 0x00, 0xb9, 0x00, 0x2e, 0x40, 0x28, - 0x90, 0x02, 0xe5, 0x80, 0xb9, 0x80, 0xaa, 0x40, - 0x0b, 0x90, 0x02, 0xe4, 0x04, 0xb9, 0x00, 0xa2, - 0x50, 0x0b, 0x90, 0x02, 0xe5, 0x00, 0x99, 0x00, - 0x2e, 0x40, 0x08, 0x9c, 0x02, 0xe4, 0x02, 0x89, - 0x00, 0x2e, 0x40, 0x0b, 0x90, 0x02, 0xe4, 0x00, - 0xb9, 0x80, 0x2e, 0x40, 0x08, 0x90, 0x02, 0xe4, - 0x08, 0xb9, 0x00, 0x22, 0x40, 0x08, 0x90, 0x02, - 0x60, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x38, - 0x05, 0x24, 0x00, 0xb9, 0x00, 0x2e, 0x40, 0x0a, - 0x90, 0x02, 0xe4, 0x00, 0xb9, 0x20, 0x2a, 0x40, - 0x4b, 0x90, 0x42, 0x64, 0x00, 0xb1, 0x00, 0x26, - 0x40, 0x8b, 0x90, 0x02, 0x24, 0x40, 0xbb, 0x19, - 0x2e, 0xc0, 0x1a, 0x91, 0x02, 0xe4, 0x00, 0x89, - 0x40, 0x2e, 0x50, 0x0b, 0x90, 0xed, 0x09, 0x00, - 0xc7, 0x00, 0x82, 0xe4, 0x00, 0x39, 0x28, 0x26, - 0x40, 0x0a, 0x90, 0x02, 0xa4, 0x20, 0xb9, 0x80, - 0x26, 0x40, 0x0a, 0x90, 0x02, 0xc6, 0x04, 0x40, - 0x00, 0x00, 0x00, 0x00, 0x28, 0x14, 0x05, 0x00, - 0xb1, 0x40, 0x2c, 0x50, 0x0a, 0x14, 0x02, 0xc4, - 0x00, 0xb1, 0x68, 0x28, 0x40, 0x0b, 0x14, 0x02, - 0xc4, 0x00, 0xb1, 0x40, 0x24, 0xd0, 0x0b, 0x14, - 0x02, 0xc4, 0xa0, 0xb1, 0x28, 0x0c, 0xd0, 0x28, - 0x12, 0x82, 0xc5, 0x10, 0x81, 0x40, 0x2c, 0x51, - 0x0b, 0x12, 0x82, 0xc5, 0x00, 0xb1, 0x40, 0x0c, - 0x40, 0x08, 0x14, 0x02, 0xc4, 0x00, 0xbb, 0x00, - 0x24, 0x50, 0x08, 0x10, 0x02, 0x42, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xf8, 0x0d, 0x60, 0x00, - 0xf8, 0x00, 0x3c, 0x00, 0x0e, 0x80, 0x03, 0xe0, - 0x00, 0xf8, 0x20, 0x12, 0x00, 0x4f, 0x80, 0x07, - 0xe8, 0x00, 0xf8, 0x00, 0x36, 0x00, 0x0f, 0x00, - 0x03, 0xa8, 0x80, 0xf8, 0x20, 0x3e, 0x00, 0x4e, - 0xa2, 0x23, 0xe0, 0x00, 0xc8, 0x00, 0x3e, 0x00, - 0x0f, 0x82, 0x03, 0xe0, 0x00, 0xf8, 0x00, 0x3e, - 0x00, 0x0e, 0x80, 0x03, 0xa0, 0x00, 0xf8, 0x00, - 0xb6, 0x00, 0x2e, 0x80, 0x03, 0xee, 0x03, 0x50, - 0x00, 0x00, 0x00, 0x00, 0x98, 0x95, 0xe4, 0x00, - 0xfd, 0x00, 0x3e, 0x50, 0x0d, 0x50, 0x03, 0xe5, - 0x04, 0xf9, 0x00, 0x3e, 0x50, 0x0f, 0x90, 0x21, - 0xe5, 0x00, 0xf9, 0x00, 0x3a, 0x50, 0x0f, 0x94, - 0x13, 0xf4, 0xa0, 0xdd, 0x28, 0x3f, 0x40, 0x4d, - 0x92, 0x83, 0xf5, 0x00, 0x79, 0x40, 0x3e, 0x50, - 0x0f, 0x92, 0xc3, 0xf4, 0x10, 0xfd, 0x00, 0x2f, - 0x50, 0x0f, 0xf4, 0x13, 0xf5, 0x10, 0xff, 0x00, - 0x3a, 0x50, 0x8f, 0x90, 0x03, 0xe6, 0x06, 0x70, - 0x00, 0x00, 0x00, 0x00, 0x18, 0x05, 0xe4, 0x40, - 0xf9, 0x00, 0x32, 0x40, 0x0f, 0xb1, 0x03, 0xf4, - 0xed, 0x09, 0x00, 0xc8, 0x00, 0x80, 0xfd, 0x20, - 0x3e, 0x48, 0x0c, 0x90, 0x02, 0x34, 0x00, 0xc9, - 0x10, 0x3f, 0x4c, 0x0c, 0x92, 0x83, 0x3c, 0x00, - 0xfd, 0x12, 0x3d, 0x41, 0x0f, 0xd2, 0x83, 0xe4, - 0x80, 0xfd, 0x28, 0x3f, 0x4c, 0x0c, 0xd1, 0x03, - 0xe4, 0x00, 0xfd, 0x00, 0x3f, 0x48, 0x0d, 0x90, - 0x07, 0xb4, 0x00, 0xdd, 0x00, 0x32, 0x40, 0x0f, - 0x90, 0x03, 0xc6, 0x01, 0x70, 0x00, 0x00, 0x00, - 0x00, 0x38, 0x18, 0xe0, 0x80, 0xb8, 0x08, 0x22, - 0x03, 0x0b, 0x20, 0x02, 0xe0, 0x00, 0xb8, 0x20, - 0x2e, 0x04, 0x08, 0x80, 0x82, 0x20, 0x00, 0x88, - 0x02, 0x2e, 0x08, 0x08, 0x82, 0x02, 0x28, 0x20, - 0x3a, 0x10, 0x26, 0x0b, 0x0f, 0x82, 0x02, 0xc8, - 0xe0, 0xb8, 0x20, 0x2e, 0x0c, 0x0a, 0x81, 0x02, - 0xe8, 0x21, 0xb8, 0x20, 0x2e, 0x04, 0x08, 0x86, - 0x22, 0xe0, 0x40, 0xb8, 0x00, 0x22, 0x02, 0x0b, - 0x80, 0x02, 0xce, 0x04, 0x30, 0x00, 0x00, 0x00, - 0x00, 0x48, 0x00, 0x84, 0x80, 0xb1, 0x20, 0x20, - 0x44, 0x0b, 0x10, 0x02, 0xc4, 0x40, 0xb1, 0x38, - 0x2c, 0x40, 0x28, 0x12, 0x02, 0x04, 0x40, 0x81, - 0x00, 0x2c, 0x4c, 0x28, 0x12, 0xca, 0x04, 0x51, - 0xb1, 0x00, 0x2c, 0x48, 0x0b, 0x12, 0x82, 0xc4, - 0x80, 0xb1, 0x28, 0x28, 0x48, 0x09, 0x10, 0x02, - 0xc4, 0x00, 0xb1, 0x28, 0x2c, 0x41, 0x19, 0x13, - 0x92, 0xc4, 0x00, 0xb1, 0x00, 0x20, 0x44, 0x0b, - 0x10, 0x02, 0xc2, 0x00, 0x30, 0x00, 0x00, 0x00, - 0x00, 0x98, 0x04, 0xa4, 0x00, 0xb9, 0x00, 0x22, - 0x40, 0x0b, 0x91, 0x02, 0xe4, 0x00, 0xb9, 0x00, - 0x2e, 0x40, 0x08, 0x90, 0x0a, 0x24, 0x00, 0x89, - 0x00, 0x2e, 0x40, 0x08, 0x90, 0x02, 0x24, 0x04, - 0xb9, 0x00, 0x2e, 0x41, 0x8b, 0x90, 0x02, 0xe4, - 0x00, 0xb9, 0x00, 0x2e, 0x40, 0x0b, 0x90, 0x22, - 0xe4, 0x00, 0xb9, 0xed, 0x09, 0x00, 0xc9, 0x00, - 0x40, 0x2e, 0x40, 0x88, 0x90, 0x02, 0xee, 0x00, - 0xb9, 0x00, 0x22, 0x40, 0x0b, 0x90, 0x00, 0xc6, - 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x15, - 0xe4, 0x00, 0xf9, 0x70, 0x32, 0x40, 0x07, 0x94, - 0x13, 0xe4, 0x00, 0xf9, 0x00, 0x3e, 0x40, 0x0c, - 0x90, 0x03, 0x24, 0x00, 0xc9, 0x00, 0x3e, 0x40, - 0x4c, 0x90, 0x03, 0x26, 0x00, 0xf9, 0xc0, 0x3e, - 0x78, 0x0b, 0x90, 0x03, 0xe7, 0x00, 0xf9, 0x01, - 0x3a, 0x41, 0x4d, 0x90, 0x03, 0xe7, 0x10, 0xb9, - 0xc0, 0x2c, 0x4c, 0x0d, 0x9d, 0x03, 0xe6, 0x04, - 0xf9, 0x40, 0xb2, 0x40, 0x0f, 0x90, 0x03, 0xe8, - 0x04, 0x70, 0x00, 0x00, 0x00, 0x00, 0x48, 0x01, - 0xa4, 0x00, 0xf9, 0x80, 0xbe, 0x40, 0x0f, 0x98, - 0x03, 0xe4, 0x00, 0xf9, 0x00, 0x2c, 0x41, 0x0f, - 0x90, 0x03, 0xc4, 0x12, 0xf9, 0x00, 0x3c, 0x40, - 0x0f, 0x10, 0x03, 0xe4, 0xa0, 0xf9, 0x28, 0x36, - 0x48, 0x0e, 0x90, 0x03, 0xe4, 0x40, 0xf9, 0x00, - 0x3e, 0x40, 0x04, 0x90, 0x03, 0xe6, 0x40, 0xf9, - 0x92, 0x3e, 0x42, 0x0f, 0x90, 0x03, 0xe4, 0x00, - 0xf9, 0x90, 0x3e, 0x40, 0x0f, 0x90, 0x03, 0xca, - 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, - 0x20, 0x00, 0xc8, 0x40, 0x3e, 0x00, 0x0e, 0x84, - 0x0b, 0x22, 0x00, 0xf8, 0x00, 0x32, 0x00, 0x0f, - 0x80, 0x03, 0xe0, 0x80, 0xd8, 0x00, 0x3e, 0x00, - 0x0f, 0x80, 0x03, 0xe1, 0x04, 0xd8, 0x45, 0x3e, - 0x11, 0x0d, 0x80, 0x47, 0xe1, 0x02, 0xc8, 0x00, - 0x34, 0x00, 0x0e, 0x80, 0x0b, 0x61, 0x00, 0xb8, - 0x00, 0x32, 0x00, 0x0f, 0x84, 0x01, 0xe0, 0x20, - 0xf8, 0x40, 0x3e, 0x00, 0x0f, 0x80, 0x41, 0xca, - 0x04, 0x20, 0x00, 0x00, 0x00, 0x00, 0x28, 0x05, - 0x28, 0x00, 0x8a, 0x00, 0x2e, 0x80, 0x0b, 0xa0, - 0x02, 0x3b, 0x80, 0xbe, 0x90, 0x2a, 0xed, 0x09, - 0x00, 0xca, 0x00, 0x80, 0x0b, 0xa0, 0x03, 0xb8, - 0x00, 0x8a, 0x00, 0x0f, 0x80, 0x0b, 0xa0, 0x02, - 0xf9, 0x00, 0x3e, 0x40, 0x2f, 0x90, 0x08, 0xe9, - 0x02, 0xe8, 0x00, 0x8e, 0xcc, 0x2b, 0xa9, 0x08, - 0xe8, 0x03, 0x28, 0x00, 0xbe, 0x00, 0x37, 0x80, - 0x8b, 0xa0, 0x02, 0xfb, 0x00, 0xb6, 0xa0, 0x2e, - 0x80, 0x0b, 0xa0, 0x02, 0xca, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x28, 0x04, 0x0c, 0x00, 0x9b, - 0x00, 0x2c, 0xc0, 0x0a, 0x30, 0x02, 0x0e, 0x00, - 0xb3, 0xd0, 0x20, 0xc0, 0x0b, 0xb0, 0x02, 0x87, - 0x40, 0x93, 0x00, 0x24, 0xe8, 0x0b, 0x30, 0x02, - 0x8c, 0x00, 0xb3, 0x00, 0x2c, 0xdc, 0x09, 0x30, - 0x02, 0x4c, 0x00, 0x83, 0x48, 0x20, 0xc2, 0x0a, - 0x30, 0x82, 0x8c, 0x00, 0xb3, 0x80, 0x28, 0xc0, - 0x0b, 0x30, 0x02, 0xcc, 0x40, 0x33, 0x00, 0x2c, - 0xc0, 0x0b, 0x30, 0x02, 0xca, 0x00, 0x50, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x10, 0x5e, 0xc2, 0x97, - 0x20, 0x2d, 0xcc, 0x0b, 0x78, 0x02, 0x10, 0x08, - 0xb3, 0x00, 0x2d, 0xc0, 0x0b, 0x72, 0x02, 0x98, - 0x00, 0x87, 0x01, 0x2d, 0xc2, 0x8b, 0x72, 0x12, - 0xdc, 0x00, 0xb7, 0x00, 0x2f, 0xe0, 0x08, 0x74, - 0x12, 0xde, 0x40, 0x87, 0x80, 0x28, 0xe0, 0x08, - 0x38, 0x82, 0x1c, 0x80, 0xb5, 0xc2, 0x2d, 0xc0, - 0x1b, 0x72, 0x02, 0xdc, 0x00, 0x37, 0x02, 0x2d, - 0xc0, 0x0b, 0x70, 0x02, 0xe8, 0x00, 0x40, 0x00, - 0x00, 0x00, 0x00, 0x88, 0x88, 0x3e, 0xc0, 0xd7, - 0x81, 0x2d, 0xe8, 0x0e, 0x78, 0x03, 0x12, 0x00, - 0xf7, 0x00, 0x31, 0xe0, 0x0f, 0x7d, 0x03, 0x9a, - 0x00, 0xd7, 0x90, 0x3d, 0xe0, 0x8f, 0x7a, 0x13, - 0xde, 0x10, 0xf7, 0x80, 0x2d, 0xe0, 0x0d, 0x78, - 0x02, 0x5e, 0x80, 0xce, 0x80, 0x35, 0xc0, 0x0e, - 0x78, 0x03, 0x1e, 0xc9, 0xfc, 0x80, 0x79, 0xe0, - 0x0b, 0xed, 0x09, 0x00, 0xcb, 0x00, 0x78, 0x03, - 0xde, 0x00, 0xf7, 0x80, 0x2d, 0xf8, 0x0f, 0x78, - 0x03, 0xe2, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0a, 0x15, 0xac, 0x80, 0xeb, 0x78, 0x3e, 0xda, - 0x0f, 0xb7, 0x83, 0xe8, 0x00, 0xfb, 0x00, 0x3a, - 0xc0, 0x0f, 0xb0, 0x03, 0x84, 0x00, 0xfb, 0x20, - 0x3e, 0xc0, 0x0b, 0xb6, 0x03, 0x60, 0x04, 0xf9, - 0x00, 0x3e, 0xc0, 0x0f, 0xb0, 0x02, 0xec, 0x90, - 0xf9, 0x04, 0x3e, 0x00, 0x0f, 0xb0, 0x03, 0xad, - 0x80, 0xf8, 0x00, 0x36, 0xc0, 0x0f, 0xb0, 0x03, - 0xe4, 0x00, 0xf8, 0x00, 0x36, 0xc0, 0x0f, 0xb0, - 0x03, 0xc2, 0x02, 0x60, 0x00, 0x00, 0x00, 0x00, - 0x02, 0x04, 0xbe, 0x00, 0xff, 0x80, 0x3f, 0xe0, - 0x0f, 0x72, 0x03, 0x32, 0x00, 0xef, 0x00, 0x3f, - 0xe1, 0x8c, 0xf2, 0x03, 0xfa, 0x00, 0xff, 0x88, - 0x3f, 0xe0, 0x0f, 0xfc, 0x83, 0xfe, 0x00, 0xef, - 0x10, 0x35, 0x60, 0x0c, 0xf8, 0x03, 0x3f, 0x00, - 0xff, 0x80, 0x37, 0xa0, 0x0c, 0xf8, 0x02, 0xfe, - 0x60, 0xfd, 0x80, 0x3f, 0xe4, 0x0e, 0xf8, 0x83, - 0x3e, 0x00, 0xff, 0x80, 0x1f, 0xe5, 0x0f, 0xf8, - 0x01, 0xc0, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, - 0xaa, 0x18, 0x9c, 0x00, 0xb7, 0x18, 0x2d, 0xc0, - 0x0b, 0x71, 0x02, 0x10, 0x00, 0x87, 0x50, 0x21, - 0xc0, 0x0d, 0x70, 0x03, 0xd8, 0x40, 0xb7, 0x00, - 0x2d, 0x00, 0x0b, 0x70, 0x03, 0xdd, 0x00, 0x86, - 0x10, 0x2d, 0x48, 0x0d, 0x64, 0x02, 0x9c, 0x00, - 0xb5, 0x00, 0x2f, 0x44, 0x0d, 0x51, 0x02, 0xdc, - 0x60, 0xb5, 0x29, 0x2d, 0xc0, 0x88, 0xf0, 0x0a, - 0x18, 0x40, 0xb7, 0x10, 0x2d, 0xc0, 0x0d, 0x70, - 0x02, 0x6a, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x9c, 0x00, 0xb7, 0x00, 0x2d, 0xc0, - 0x0b, 0xf0, 0x02, 0x10, 0x00, 0xb1, 0x10, 0x28, - 0xc0, 0x08, 0x71, 0x02, 0xed, 0x09, 0x00, 0xcc, - 0x00, 0xd8, 0x00, 0xb7, 0x00, 0x2d, 0xc0, 0x0b, - 0x70, 0x02, 0xdc, 0x40, 0x87, 0x01, 0x27, 0x00, - 0x08, 0x10, 0x02, 0x9c, 0x00, 0xb7, 0x00, 0x2d, - 0x80, 0x08, 0x60, 0x02, 0x5c, 0x04, 0x94, 0x02, - 0x2d, 0xc0, 0x8a, 0x70, 0x0a, 0x1c, 0x20, 0xb7, - 0x40, 0x2d, 0xc1, 0x0b, 0x70, 0x02, 0xc0, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x20, 0x04, 0xcc, - 0x01, 0xb3, 0x40, 0x2c, 0xc0, 0x8b, 0xb4, 0x02, - 0x00, 0x10, 0x93, 0x00, 0x20, 0xc0, 0x08, 0x30, - 0x22, 0xc8, 0x00, 0xb3, 0x00, 0x2c, 0x00, 0x0b, - 0x30, 0x02, 0xa1, 0x80, 0x80, 0x20, 0x2c, 0x00, - 0x09, 0x00, 0x0a, 0x8d, 0x00, 0x31, 0x02, 0x2c, - 0x00, 0x01, 0x00, 0x02, 0xce, 0x20, 0xb0, 0xc0, - 0x2c, 0xc2, 0x08, 0x3c, 0x02, 0x03, 0x00, 0xb0, - 0x80, 0x2e, 0xc0, 0x08, 0x30, 0x02, 0x40, 0x04, - 0x30, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x15, 0xfc, - 0x00, 0xf7, 0x80, 0x3f, 0xc0, 0x0f, 0xf5, 0x23, - 0x20, 0x00, 0xfb, 0x00, 0x3a, 0xc0, 0x08, 0xf0, - 0x03, 0xe8, 0x00, 0xff, 0x00, 0x0e, 0x40, 0x07, - 0xf0, 0x02, 0xe5, 0x00, 0xc9, 0x00, 0x36, 0x64, - 0x0c, 0x90, 0x43, 0x3d, 0x40, 0xb9, 0x00, 0x1e, - 0x40, 0x48, 0x90, 0x42, 0xfe, 0x00, 0x98, 0xc0, - 0x2e, 0xc0, 0x0e, 0xf0, 0x82, 0x2e, 0x00, 0xfb, - 0xc0, 0x3f, 0xc0, 0x0b, 0xb0, 0x02, 0xe2, 0x04, - 0x60, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0xac, - 0x00, 0xfb, 0x00, 0x3e, 0xc0, 0x0f, 0xb1, 0x0b, - 0xc0, 0x00, 0xe3, 0x00, 0x3e, 0xc0, 0x0f, 0xb0, - 0x03, 0xa9, 0x00, 0xfb, 0x00, 0x3c, 0x50, 0x0f, - 0x30, 0x03, 0xe4, 0x00, 0x99, 0x00, 0x3e, 0x14, - 0x0e, 0x94, 0x02, 0x6c, 0x00, 0xf8, 0x40, 0x3e, - 0x40, 0x0f, 0x80, 0x03, 0xec, 0x04, 0xf8, 0x09, - 0x2e, 0x71, 0x0f, 0xb0, 0x03, 0xed, 0x00, 0xed, - 0x09, 0x00, 0xcd, 0x00, 0xfb, 0x12, 0x3e, 0xc0, - 0x0d, 0xb0, 0x03, 0x60, 0x00, 0x30, 0x00, 0x00, - 0x00, 0x00, 0x21, 0x10, 0xbc, 0x00, 0xff, 0x08, - 0x37, 0xc0, 0x0f, 0xf0, 0x03, 0x30, 0x40, 0xcf, - 0x00, 0x33, 0xc0, 0x0f, 0xf0, 0x03, 0xfb, 0x00, - 0xdf, 0x00, 0x3f, 0x00, 0x0c, 0xf0, 0x03, 0x24, - 0x00, 0xc4, 0x00, 0x33, 0x41, 0x0f, 0xc0, 0x03, - 0xfc, 0x10, 0xfe, 0x00, 0x33, 0xa0, 0x0e, 0xd0, - 0x03, 0xfc, 0x00, 0xec, 0x00, 0x33, 0xe0, 0x8d, - 0xf0, 0x81, 0xfa, 0x28, 0xff, 0xc0, 0x1f, 0xc0, - 0x0c, 0xf0, 0x03, 0x40, 0x44, 0x30, 0x00, 0x00, - 0x00, 0x00, 0xa1, 0x04, 0x6c, 0x00, 0xbb, 0x00, - 0x22, 0xc0, 0x0b, 0xb0, 0x02, 0x21, 0x80, 0x8b, - 0x82, 0x2e, 0xc1, 0x0b, 0xb0, 0x02, 0xca, 0x00, - 0x8b, 0x00, 0x2e, 0x31, 0x08, 0xb0, 0x02, 0x22, - 0x00, 0x88, 0xc0, 0x22, 0x32, 0x0b, 0x88, 0x02, - 0xec, 0x00, 0x98, 0x58, 0x2a, 0x18, 0x0a, 0x8e, - 0x22, 0xec, 0x00, 0x80, 0xc8, 0xa2, 0x50, 0x0b, - 0xb0, 0x02, 0xe1, 0x40, 0xb8, 0x80, 0x2e, 0xc0, - 0x08, 0xb0, 0x02, 0xe8, 0x40, 0x10, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x05, 0x2c, 0x00, 0xbb, 0x00, - 0x26, 0xc0, 0x0b, 0xb0, 0x02, 0x68, 0x00, 0x89, - 0x80, 0x26, 0xc0, 0x0b, 0xb0, 0x02, 0xe5, 0x00, - 0xbb, 0x00, 0x2e, 0x62, 0x08, 0xb0, 0x02, 0x22, - 0x10, 0x89, 0x88, 0x26, 0x60, 0x4b, 0x98, 0x22, - 0xec, 0x00, 0xb2, 0x00, 0x24, 0xc4, 0x00, 0x98, - 0x12, 0xcc, 0x00, 0x88, 0x80, 0x22, 0x98, 0x09, - 0xb0, 0x12, 0xe4, 0x00, 0x99, 0x00, 0x2e, 0xc0, - 0x88, 0xb0, 0x02, 0xe0, 0x00, 0x40, 0x00, 0x00, - 0x00, 0x00, 0x0a, 0x14, 0x0c, 0x00, 0xbb, 0x00, - 0x24, 0xc0, 0x8b, 0x30, 0x02, 0x40, 0x02, 0x82, - 0x00, 0x2c, 0xc0, 0x0b, 0x30, 0x02, 0xc8, 0x00, - 0x83, 0x00, 0xed, 0x09, 0x00, 0xce, 0x00, 0x2c, - 0x00, 0x00, 0x30, 0x02, 0x00, 0x04, 0x80, 0x00, - 0x24, 0x00, 0x0b, 0x00, 0x02, 0xcc, 0x00, 0x90, - 0x02, 0x2c, 0x40, 0x0a, 0x00, 0x02, 0xcc, 0x02, - 0x88, 0x00, 0x20, 0x00, 0x0b, 0x30, 0x02, 0xc0, - 0x00, 0xb1, 0x00, 0x2c, 0xc0, 0x08, 0x30, 0x02, - 0xca, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x0d, 0x7c, 0x00, 0xff, 0x00, 0x37, 0xc0, 0x0f, - 0xf0, 0x0b, 0x60, 0x08, 0xc9, 0x00, 0x32, 0xc0, - 0x1f, 0xf0, 0x03, 0xe8, 0x00, 0xff, 0x00, 0x3e, - 0x00, 0x0c, 0xf0, 0x01, 0x20, 0x00, 0xc8, 0x00, - 0x36, 0x00, 0x0f, 0x80, 0x03, 0xfc, 0x08, 0xfa, - 0x00, 0x36, 0x80, 0x9e, 0x80, 0x03, 0xfc, 0x04, - 0xc8, 0x00, 0x32, 0x80, 0x0d, 0xb0, 0x01, 0xe0, - 0x00, 0xf9, 0x00, 0x3e, 0xc0, 0x2c, 0xb0, 0x03, - 0x40, 0x03, 0x50, 0x00, 0x00, 0x00, 0x00, 0xa2, - 0x15, 0xfc, 0x00, 0xff, 0x00, 0x3b, 0xc0, 0x0f, - 0xf0, 0x03, 0x98, 0x00, 0xfe, 0x00, 0x3b, 0xc0, - 0x8f, 0xf0, 0x03, 0xf4, 0x00, 0xff, 0x00, 0x3f, - 0x00, 0x0f, 0xf0, 0x03, 0xf0, 0x04, 0xfc, 0x00, - 0xbb, 0x00, 0x0f, 0xc0, 0x03, 0xfc, 0x01, 0xfc, - 0x00, 0x3b, 0x00, 0x0f, 0xc0, 0x03, 0xfc, 0x01, - 0xdc, 0x00, 0x3d, 0x00, 0x0f, 0xf0, 0x26, 0xf0, - 0x00, 0x7c, 0x00, 0x3f, 0xc0, 0x0f, 0xf0, 0x07, - 0xe8, 0x06, 0x70, 0x00, 0x00, 0x00, 0x00, 0xc0, - 0x05, 0xfc, 0x00, 0xfe, 0x00, 0x33, 0x44, 0x0d, - 0xf0, 0x03, 0x3c, 0x00, 0xc5, 0x00, 0x37, 0x02, - 0x0f, 0xc0, 0x03, 0xf4, 0x00, 0xce, 0x00, 0x37, - 0xc0, 0x0c, 0xf0, 0x03, 0xf8, 0x00, 0xc4, 0x08, - 0x3b, 0x0a, 0x0f, 0xc0, 0x23, 0xd8, 0x00, 0xfc, - 0x00, 0x3b, 0x05, 0x4c, 0xc1, 0x03, 0xb8, 0x08, - 0xce, 0x08, 0xb3, 0x40, 0x0f, 0xf0, 0x03, 0xf0, - 0x80, 0xfc, 0x30, 0x33, 0x00, 0xed, 0x09, 0x00, - 0xcf, 0x00, 0x0c, 0xc2, 0xa7, 0xb0, 0x00, 0x70, - 0x00, 0x00, 0x00, 0x00, 0x80, 0x10, 0xec, 0x00, - 0xba, 0x52, 0x22, 0x08, 0x08, 0xa0, 0x02, 0x2c, - 0x08, 0x89, 0x00, 0x2a, 0x10, 0x0b, 0xb0, 0x26, - 0xec, 0x10, 0x88, 0x00, 0x22, 0x80, 0x08, 0xb0, - 0x00, 0x6c, 0x00, 0x88, 0x40, 0x22, 0x12, 0x0b, - 0x80, 0x02, 0xe8, 0xa0, 0xb9, 0x04, 0x36, 0x5d, - 0x08, 0x87, 0x02, 0xa8, 0x00, 0x8a, 0x44, 0x22, - 0x00, 0x0b, 0x92, 0x82, 0xe1, 0xa0, 0xb2, 0x40, - 0x20, 0x8c, 0x08, 0xa6, 0x16, 0x20, 0x04, 0x30, - 0x00, 0x00, 0x00, 0x00, 0x88, 0x05, 0xcc, 0x00, - 0xb0, 0x04, 0x20, 0x80, 0x09, 0x30, 0x02, 0x0c, - 0x00, 0x81, 0x01, 0x88, 0x80, 0x0b, 0x00, 0x02, - 0xc4, 0x00, 0xba, 0x00, 0x26, 0x80, 0x19, 0x30, - 0x40, 0xc0, 0x10, 0x80, 0x00, 0x28, 0x09, 0x4b, - 0x00, 0x22, 0xc8, 0x00, 0xb0, 0x81, 0x20, 0x00, - 0x28, 0x12, 0x06, 0x28, 0x02, 0x92, 0x00, 0x20, - 0x40, 0x0a, 0x30, 0x02, 0xc8, 0x40, 0xb0, 0x30, - 0x20, 0x02, 0x8a, 0x00, 0xc2, 0x22, 0x01, 0x70, - 0x00, 0x00, 0x00, 0x00, 0xc0, 0x15, 0xac, 0x00, - 0xb8, 0x80, 0x22, 0xd0, 0x08, 0xa2, 0x02, 0x2c, - 0x00, 0x89, 0x00, 0x2a, 0xa0, 0x0b, 0xb5, 0x02, - 0xec, 0x02, 0x3a, 0x40, 0x22, 0x00, 0x19, 0xb0, - 0x02, 0xe0, 0x80, 0x8a, 0xc0, 0x2a, 0x44, 0x8b, - 0x80, 0x02, 0xe8, 0x20, 0xb9, 0x00, 0x2e, 0x61, - 0x08, 0x98, 0x02, 0xa8, 0x00, 0x9a, 0x20, 0x22, - 0x30, 0x0b, 0x90, 0x06, 0xe8, 0x01, 0xbb, 0x00, - 0x22, 0x82, 0x08, 0x20, 0x92, 0x30, 0x04, 0x60, - 0x00, 0x00, 0x00, 0x00, 0x40, 0x15, 0xec, 0x00, - 0xfa, 0xc0, 0x30, 0xe0, 0x0d, 0x1e, 0x03, 0x0c, - 0x02, 0xc1, 0x40, 0xba, 0x30, 0x0b, 0xa4, 0x02, - 0xc4, 0x10, 0xf3, 0x42, 0x36, 0xd0, 0x0d, 0xb0, - 0xed, 0x09, 0x00, 0xd0, 0x00, 0x13, 0xcf, 0x20, - 0xc8, 0x80, 0x3a, 0x12, 0x0f, 0x85, 0x93, 0xe9, - 0x08, 0xf2, 0x80, 0x32, 0x23, 0x0c, 0x98, 0x03, - 0xa8, 0x00, 0xda, 0x80, 0x22, 0xe0, 0x0e, 0x90, - 0x03, 0xe7, 0x90, 0xf9, 0x00, 0x32, 0x70, 0x0e, - 0x9c, 0x02, 0x00, 0x04, 0x70, 0x00, 0x00, 0x00, - 0x00, 0xe0, 0x01, 0xbc, 0x00, 0xf2, 0x00, 0xbf, - 0xa8, 0x0f, 0xf8, 0x0b, 0xfc, 0x00, 0xfd, 0x10, - 0x3f, 0x00, 0x0f, 0xe8, 0x23, 0xee, 0x40, 0x4f, - 0xa0, 0x3f, 0xc0, 0x0e, 0xf0, 0x03, 0x7e, 0x00, - 0xf4, 0x00, 0x37, 0x41, 0x0f, 0xd8, 0x13, 0xf8, - 0x00, 0xfe, 0x18, 0x34, 0x42, 0x0f, 0xc0, 0xd3, - 0xf2, 0x40, 0xed, 0x80, 0x3f, 0x80, 0x0f, 0xf0, - 0x03, 0xfc, 0x50, 0xfd, 0x90, 0xbf, 0xe5, 0x4f, - 0xb9, 0x03, 0x78, 0x40, 0x60, 0x00, 0x00, 0x00, - 0x00, 0x40, 0x10, 0xac, 0x00, 0xfa, 0x40, 0x32, - 0x00, 0x0c, 0x97, 0x03, 0x2c, 0x04, 0xe9, 0x80, - 0xb6, 0xb0, 0x0f, 0xb4, 0x03, 0xe4, 0x20, 0xcb, - 0x00, 0x3e, 0xc0, 0x0f, 0xb0, 0x43, 0x64, 0x00, - 0xc8, 0x40, 0xb2, 0x08, 0x0f, 0x82, 0x03, 0x21, - 0x00, 0xc8, 0x00, 0x3e, 0x00, 0x4c, 0x90, 0x63, - 0xec, 0x00, 0xca, 0x00, 0x3e, 0x40, 0x0d, 0x90, - 0x03, 0xe5, 0x00, 0xf8, 0x00, 0x30, 0x52, 0x0e, - 0x96, 0x03, 0x10, 0x04, 0x20, 0x00, 0x00, 0x00, - 0x00, 0xc8, 0x01, 0x2c, 0x00, 0xba, 0x00, 0x22, - 0x60, 0x0e, 0xb8, 0x0a, 0x2c, 0x12, 0xa9, 0x80, - 0x22, 0x80, 0x0b, 0xb7, 0x06, 0xee, 0x00, 0xdb, - 0xd0, 0x2c, 0x54, 0x0b, 0xb0, 0x02, 0xe7, 0x00, - 0x8e, 0x19, 0x36, 0x62, 0x0b, 0x90, 0x02, 0x20, - 0x64, 0x8b, 0xc4, 0x2e, 0x70, 0x08, 0x8c, 0x02, - 0xce, 0x00, 0xa2, 0x00, 0x2e, 0x80, 0x0b, 0xbe, - 0x02, 0xef, 0x89, 0xb9, 0x01, 0x36, 0xc0, 0x08, - 0xb4, 0x02, 0x32, 0xed, 0x09, 0x00, 0xd1, 0x00, - 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x05, - 0x4c, 0x00, 0xb2, 0x04, 0x20, 0xe0, 0x08, 0x2c, - 0x02, 0x0e, 0xc0, 0xa3, 0x00, 0x60, 0x00, 0x0b, - 0x08, 0x12, 0xc6, 0x00, 0xb2, 0x50, 0x2c, 0x90, - 0x0b, 0x30, 0x12, 0xce, 0x80, 0xa0, 0xc0, 0x04, - 0x30, 0x09, 0x24, 0x02, 0x48, 0x00, 0xb0, 0xc2, - 0x2c, 0x40, 0x08, 0x80, 0x02, 0xca, 0x80, 0x82, - 0x24, 0x2c, 0x00, 0x09, 0x3e, 0x02, 0xc3, 0x20, - 0xa8, 0x00, 0x20, 0x04, 0x02, 0x01, 0x00, 0x38, - 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, - 0x1c, 0x40, 0xb7, 0x80, 0x21, 0x60, 0x0a, 0xf9, - 0x02, 0x1e, 0x00, 0xa7, 0x80, 0x21, 0xa4, 0x0b, - 0x78, 0x12, 0xd6, 0x30, 0xb6, 0x82, 0x2d, 0xa0, - 0x0b, 0x78, 0x02, 0xfe, 0x20, 0x8e, 0x00, 0x25, - 0x24, 0x4b, 0x68, 0x02, 0x7e, 0x00, 0xb5, 0x80, - 0x2d, 0xe2, 0x08, 0x68, 0x82, 0xda, 0x12, 0xa6, - 0x80, 0x2d, 0x20, 0x0b, 0x58, 0x02, 0xd2, 0x14, - 0xb6, 0x80, 0x25, 0x20, 0x48, 0x58, 0x02, 0x18, - 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x48, 0x08, - 0x0c, 0x00, 0xf2, 0x00, 0x32, 0xc3, 0x08, 0x20, - 0x03, 0x0c, 0x40, 0xe1, 0x50, 0x30, 0x80, 0x0f, - 0x20, 0x02, 0xcc, 0x44, 0xf2, 0x01, 0x3c, 0x80, - 0x0f, 0x30, 0x03, 0xc4, 0x00, 0xc1, 0x10, 0x34, - 0xc0, 0x0d, 0x21, 0x43, 0x4c, 0x00, 0xf0, 0x18, - 0x3c, 0x80, 0x8c, 0x10, 0x02, 0xc8, 0x60, 0xc2, - 0x00, 0x3c, 0x00, 0x0d, 0x30, 0x03, 0xcc, 0x01, - 0xe0, 0x00, 0x30, 0xc4, 0x4e, 0x20, 0x03, 0x12, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x1d, - 0xbc, 0x80, 0xfd, 0x00, 0x3f, 0x40, 0x0a, 0x70, - 0x13, 0xdc, 0x00, 0xfd, 0x00, 0x3b, 0x80, 0x0f, - 0xf0, 0x03, 0xfc, 0x40, 0xde, 0x00, 0x3f, 0x00, - 0x0f, 0xf0, 0x03, 0xd4, 0x00, 0xff, 0xed, 0x09, - 0x00, 0xd2, 0x00, 0x20, 0x3f, 0xc0, 0x47, 0x60, - 0x0b, 0xbc, 0x40, 0x8d, 0x00, 0x3f, 0x80, 0xaf, - 0xf0, 0x03, 0xd8, 0x00, 0xfe, 0x10, 0x3f, 0x00, - 0x0f, 0xd0, 0x11, 0xfc, 0x00, 0xff, 0x10, 0x3f, - 0xc4, 0x0f, 0xf1, 0x03, 0xd0, 0x06, 0x60, 0x00, - 0x00, 0x00, 0x00, 0xa8, 0x05, 0xec, 0x00, 0xfa, - 0x80, 0x32, 0xc0, 0x0c, 0x30, 0x0b, 0x2c, 0x00, - 0xfb, 0x00, 0x3c, 0xa0, 0x0f, 0xa0, 0x03, 0xe4, - 0x00, 0xf2, 0x00, 0x32, 0xc0, 0x4e, 0xb0, 0x01, - 0xe6, 0x00, 0xc9, 0x00, 0x2e, 0xc0, 0x0c, 0x90, - 0x03, 0xec, 0x04, 0xfa, 0x00, 0x3e, 0x40, 0x0f, - 0xb0, 0x03, 0xe8, 0x00, 0xfa, 0x02, 0x3e, 0x80, - 0x0e, 0x90, 0x03, 0x68, 0x00, 0xfb, 0x02, 0x32, - 0x00, 0x0f, 0x80, 0x03, 0x6a, 0x00, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x48, 0x11, 0x9c, 0x09, 0xb7, - 0x00, 0x35, 0x40, 0x08, 0x70, 0x02, 0x1c, 0x00, - 0xb7, 0x00, 0x2d, 0xc0, 0x08, 0x70, 0x02, 0xd4, - 0x00, 0x37, 0x00, 0x29, 0xc0, 0x08, 0x70, 0x42, - 0xd4, 0x00, 0x87, 0xa0, 0x2c, 0xc0, 0x08, 0x70, - 0x02, 0xdc, 0x18, 0xb7, 0x00, 0x2d, 0xc0, 0x0b, - 0x70, 0x02, 0xd8, 0x00, 0xb7, 0x00, 0x2d, 0x80, - 0x0b, 0x70, 0x12, 0xd8, 0x00, 0xb7, 0x00, 0x35, - 0x00, 0x0b, 0x10, 0x02, 0x12, 0x04, 0x60, 0x00, - 0x00, 0x00, 0x00, 0xc0, 0x00, 0x9e, 0x00, 0xb2, - 0x80, 0x23, 0xe0, 0x0a, 0xf8, 0x82, 0x1e, 0x08, - 0xb4, 0x80, 0x2d, 0xe0, 0x0b, 0x68, 0x02, 0xde, - 0x00, 0xbf, 0x80, 0x21, 0xe0, 0x0a, 0x78, 0x42, - 0xde, 0x02, 0x85, 0x90, 0x2d, 0xe1, 0x0a, 0x78, - 0x22, 0xd6, 0x10, 0xb6, 0x80, 0x2d, 0xe0, 0x0b, - 0x78, 0x12, 0xde, 0x00, 0xb6, 0x80, 0x2d, 0xa0, - 0x0a, 0x58, 0x02, 0x1f, 0x04, 0xb6, 0x80, 0x25, - 0xe0, 0x0b, 0x68, 0x02, 0xf0, 0x40, 0x20, 0x00, - 0x00, 0xed, 0x09, 0x00, 0xd3, 0x00, 0x00, 0x00, - 0x48, 0x14, 0xcc, 0x00, 0xb3, 0x80, 0x64, 0x44, - 0x2a, 0x38, 0x0a, 0x0c, 0x00, 0xb1, 0x01, 0x2c, - 0xf0, 0x09, 0x30, 0x02, 0xcc, 0x00, 0xb3, 0x01, - 0x28, 0x40, 0x4a, 0x30, 0x02, 0xce, 0x00, 0x83, - 0x00, 0x2c, 0xc0, 0x28, 0x34, 0x82, 0xc4, 0x00, - 0xb3, 0xf0, 0x2e, 0xc0, 0x9b, 0x33, 0x02, 0xce, - 0x00, 0xb2, 0x80, 0x2c, 0x84, 0x8b, 0x31, 0x02, - 0xed, 0x00, 0xb3, 0x04, 0x24, 0xc0, 0x0b, 0x30, - 0x82, 0x92, 0x04, 0x30, 0x00, 0x00, 0x00, 0x00, - 0xe8, 0x15, 0xa8, 0x00, 0xfe, 0x00, 0x31, 0xa0, - 0x0e, 0xe4, 0x43, 0x28, 0x00, 0xfe, 0x40, 0x3f, - 0x98, 0x0f, 0xec, 0x01, 0xe8, 0x00, 0xfe, 0xe0, - 0x31, 0x90, 0x06, 0xa0, 0x03, 0xfb, 0x20, 0xce, - 0x50, 0x3f, 0x94, 0x0e, 0x60, 0x23, 0xfb, 0x84, - 0xbe, 0xc0, 0x3f, 0x81, 0x0f, 0xe8, 0x03, 0xf9, - 0x30, 0xfe, 0x40, 0x3f, 0xa0, 0x06, 0xa0, 0x03, - 0x3b, 0x40, 0xfe, 0x00, 0xf3, 0x80, 0x07, 0xe4, - 0x03, 0xfa, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, - 0x48, 0x00, 0xe0, 0x00, 0xf8, 0x10, 0x3e, 0x00, - 0x05, 0x8c, 0x03, 0xe0, 0x00, 0xf8, 0xc0, 0x3e, - 0x18, 0x4e, 0x8d, 0x01, 0xe0, 0x00, 0xf8, 0x80, - 0x3e, 0x30, 0x05, 0x80, 0x03, 0xe2, 0x00, 0xf8, - 0x40, 0x3c, 0x00, 0x0f, 0x80, 0x03, 0xe2, 0x00, - 0xf8, 0x00, 0x3e, 0x20, 0x0f, 0x80, 0x03, 0xe2, - 0x00, 0xf8, 0xd0, 0x3e, 0x00, 0x0f, 0x80, 0x23, - 0xe1, 0x10, 0xf0, 0x18, 0x7a, 0x02, 0x07, 0x00, - 0x01, 0x52, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, - 0x08, 0x10, 0xe4, 0x00, 0xf9, 0x00, 0x3e, 0x60, - 0x0c, 0x90, 0x03, 0x26, 0x80, 0xf9, 0xc0, 0x32, - 0x40, 0x0f, 0x90, 0x03, 0x25, 0x00, 0xf9, 0x40, - 0x22, 0x64, 0x0e, 0x90, 0x03, 0xe6, 0x00, 0xf9, - 0x00, 0x1e, 0x40, 0x0c, 0xed, 0x09, 0x00, 0xd4, - 0x00, 0x92, 0x03, 0x24, 0x10, 0xf9, 0x80, 0x32, - 0x40, 0x0c, 0x98, 0x03, 0xe6, 0x40, 0xf9, 0x00, - 0x3e, 0x40, 0x0f, 0x90, 0x03, 0xa5, 0x00, 0xc9, - 0x84, 0x72, 0x68, 0x47, 0x90, 0x03, 0x02, 0x04, - 0x30, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x64, - 0x00, 0xb9, 0x00, 0x2e, 0x64, 0x28, 0x10, 0x0a, - 0x25, 0x08, 0x31, 0x01, 0x22, 0x58, 0x0b, 0x10, - 0x02, 0xa4, 0x04, 0xb1, 0x80, 0x36, 0x62, 0x08, - 0x90, 0x02, 0xe7, 0x00, 0xb9, 0x40, 0x2e, 0x74, - 0x0a, 0x90, 0x02, 0x25, 0x00, 0xb1, 0x80, 0x2a, - 0x41, 0x08, 0x98, 0x02, 0xe5, 0x00, 0xb9, 0x00, - 0x2e, 0x40, 0x0b, 0x99, 0x22, 0xa7, 0x02, 0x09, - 0xb0, 0x7a, 0x40, 0x8b, 0x94, 0x02, 0x20, 0x00, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x05, 0x24, - 0x00, 0xbb, 0x00, 0x2e, 0x40, 0x09, 0x90, 0x02, - 0x24, 0x04, 0xb9, 0x00, 0x22, 0xe0, 0x0b, 0x98, - 0x02, 0x24, 0x00, 0xb9, 0x00, 0x2a, 0xc0, 0x0a, - 0x90, 0x02, 0xe4, 0x80, 0xb9, 0x00, 0x0e, 0x42, - 0x09, 0x90, 0x8a, 0x24, 0x00, 0xb9, 0x10, 0x22, - 0x42, 0x28, 0xb2, 0x02, 0xe4, 0x00, 0xb9, 0x20, - 0x2e, 0x40, 0x1b, 0x10, 0x02, 0xa4, 0x04, 0x99, - 0x04, 0x22, 0x40, 0x0b, 0x94, 0x02, 0x06, 0x00, - 0x40, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x04, - 0x00, 0xb1, 0x00, 0x2e, 0x50, 0x09, 0xb0, 0x0a, - 0x04, 0x04, 0xb1, 0x00, 0xa0, 0x40, 0x0b, 0xb0, - 0x02, 0x84, 0x00, 0xb1, 0x05, 0x2c, 0x40, 0x08, - 0x10, 0x02, 0xcc, 0x00, 0xb1, 0x00, 0x2c, 0x51, - 0x0b, 0x10, 0x02, 0x0d, 0x00, 0xb9, 0x02, 0x28, - 0x50, 0x08, 0x14, 0x02, 0xc4, 0x00, 0xb3, 0x28, - 0x2c, 0x4a, 0x09, 0x14, 0x0a, 0x8d, 0x00, 0x91, - 0x44, 0x28, 0x50, 0x0b, 0x14, 0x0a, 0x02, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0x0d, 0xed, - 0x09, 0x00, 0xd5, 0x00, 0x60, 0x00, 0xf8, 0x00, - 0x3e, 0x00, 0x0d, 0x80, 0x0a, 0x28, 0x00, 0xfa, - 0x00, 0xb2, 0x00, 0x0f, 0x80, 0x03, 0x20, 0x00, - 0xfa, 0x02, 0x3a, 0x00, 0x0e, 0x80, 0x03, 0xe0, - 0x00, 0xfa, 0x00, 0x3e, 0x00, 0x0d, 0x80, 0x03, - 0x20, 0x00, 0xfa, 0x04, 0x32, 0x00, 0x0c, 0xa0, - 0x02, 0xe8, 0x00, 0xf8, 0x20, 0x3e, 0x1c, 0x0f, - 0x80, 0x07, 0xa0, 0x00, 0xd0, 0x00, 0x32, 0x00, - 0x0f, 0x80, 0x03, 0x2e, 0x03, 0x50, 0x00, 0x00, - 0x00, 0x00, 0x98, 0x1d, 0xe4, 0x00, 0xfd, 0x40, - 0x3d, 0x40, 0x0e, 0xd0, 0x03, 0xe4, 0x00, 0xfd, - 0x00, 0x3f, 0x50, 0x0b, 0xd0, 0x13, 0xf5, 0x00, - 0xfd, 0x00, 0x35, 0x40, 0x0f, 0x90, 0x03, 0xd4, - 0x00, 0xfd, 0x40, 0x3f, 0x50, 0x0e, 0xd0, 0x13, - 0xf4, 0x01, 0xfd, 0x00, 0x3f, 0x50, 0x0f, 0xd4, - 0x03, 0xf4, 0xa8, 0xfd, 0x00, 0x3f, 0x41, 0x0f, - 0xd0, 0x43, 0x75, 0x00, 0xef, 0x42, 0x3f, 0x50, - 0x0f, 0xd4, 0x03, 0xe6, 0x06, 0x70, 0x00, 0x00, - 0x00, 0x00, 0x18, 0x11, 0xe4, 0x00, 0xf9, 0x00, - 0x3f, 0x50, 0x0f, 0xd0, 0x03, 0xb4, 0x00, 0xf5, - 0x00, 0xb7, 0x40, 0x07, 0x50, 0x03, 0x34, 0xa0, - 0xfd, 0x00, 0x3f, 0x40, 0x0d, 0x90, 0x03, 0xf4, - 0x00, 0xf5, 0x08, 0x3f, 0xc2, 0x0c, 0x70, 0x03, - 0x34, 0x01, 0xbd, 0x00, 0x3b, 0x52, 0x0c, 0xd0, - 0x83, 0x14, 0x00, 0xfd, 0x04, 0x32, 0x44, 0x0d, - 0x50, 0x02, 0x74, 0x00, 0xfd, 0x08, 0x2f, 0x4a, - 0x0f, 0xd0, 0x03, 0x26, 0x00, 0x70, 0x00, 0x00, - 0x00, 0x00, 0x38, 0x18, 0xe0, 0x00, 0xb8, 0x40, - 0x2e, 0x00, 0x0b, 0x80, 0x02, 0xe0, 0x00, 0xb8, - 0x00, 0x3e, 0x90, 0x5b, 0x80, 0x02, 0x21, 0x00, - 0xb8, 0x04, 0x2e, 0x00, 0x0b, 0x80, 0x02, 0xe0, - 0x00, 0xb8, 0x00, 0x2e, 0x9a, 0x08, 0x80, 0x0a, - 0x20, 0x05, 0xed, 0x09, 0x00, 0xd6, 0x00, 0xb8, - 0x00, 0x22, 0x08, 0x08, 0x84, 0x02, 0x20, 0x20, - 0xba, 0x00, 0xa2, 0x04, 0x0b, 0x82, 0x00, 0x00, - 0x80, 0xb8, 0x00, 0x2e, 0x18, 0x0b, 0x82, 0x0a, - 0x0e, 0x44, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x05, 0xc4, 0x00, 0xb1, 0x40, 0x2c, 0x48, 0x0b, - 0x10, 0x02, 0xc4, 0x00, 0xb9, 0x04, 0x24, 0x50, - 0x0b, 0x90, 0x1a, 0x04, 0x01, 0xb1, 0x00, 0x2c, - 0x40, 0x4b, 0x10, 0x42, 0xc4, 0x00, 0xb1, 0x00, - 0x6c, 0x40, 0x28, 0x90, 0x02, 0x04, 0xa0, 0xb9, - 0x00, 0x68, 0x40, 0x28, 0x12, 0x8a, 0x44, 0x80, - 0x91, 0x10, 0x20, 0x40, 0x0b, 0x10, 0x82, 0x47, - 0x20, 0xb1, 0x09, 0x2c, 0x42, 0x0b, 0x14, 0x82, - 0x02, 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x18, - 0x05, 0xa4, 0x00, 0xb9, 0x00, 0x2e, 0x4a, 0x0b, - 0x90, 0x02, 0xe4, 0x00, 0xb9, 0x40, 0x2e, 0x40, - 0x0b, 0x94, 0x02, 0x26, 0x00, 0xb9, 0x00, 0x2e, - 0x40, 0x8b, 0x90, 0x02, 0xe4, 0x40, 0xb9, 0x88, - 0x2e, 0x40, 0x48, 0x90, 0x02, 0x24, 0x00, 0xb9, - 0x41, 0x2a, 0x40, 0x1a, 0x90, 0x02, 0x24, 0x00, - 0xbb, 0x00, 0x22, 0x40, 0x0b, 0xb0, 0x00, 0x24, - 0x40, 0xb9, 0x00, 0x0e, 0x46, 0x0b, 0x92, 0x02, - 0x06, 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0xa0, - 0x05, 0xe4, 0x00, 0xf9, 0x80, 0x3e, 0x60, 0x4f, - 0x90, 0x13, 0xe4, 0x04, 0xf1, 0x40, 0xb6, 0x40, - 0x0b, 0x1c, 0x03, 0x26, 0x00, 0xf9, 0x08, 0x3e, - 0x72, 0x8f, 0x90, 0x03, 0xe7, 0x20, 0xb9, 0xc0, - 0x3e, 0x64, 0x0c, 0x99, 0x03, 0x27, 0x20, 0xb9, - 0x80, 0x3a, 0x46, 0x0c, 0x92, 0x03, 0x66, 0x94, - 0xd9, 0x40, 0x32, 0x60, 0x0b, 0x90, 0x03, 0x64, - 0x00, 0xf9, 0x40, 0x3e, 0x60, 0x0f, 0x90, 0x03, - 0x28, 0x04, 0x70, 0x00, 0x00, 0x00, 0x00, 0x28, - 0x01, 0xa4, 0x00, 0xf9, 0x20, 0xed, 0x09, 0x00, - 0xd7, 0x00, 0x3e, 0x60, 0x0f, 0x90, 0x03, 0xe4, - 0x00, 0xf9, 0x90, 0xbe, 0x50, 0x0f, 0x9a, 0x13, - 0xe4, 0x10, 0xf9, 0x20, 0x3e, 0x70, 0x0f, 0x90, - 0x03, 0xe4, 0x00, 0xf9, 0x00, 0x3e, 0x40, 0x0f, - 0x98, 0x23, 0xe7, 0x00, 0xf9, 0xa0, 0x36, 0x60, - 0x0d, 0x90, 0x43, 0xe6, 0x40, 0xf1, 0x90, 0x3e, - 0x64, 0x0f, 0x90, 0x0b, 0xe6, 0x00, 0xf9, 0x00, - 0x7e, 0x60, 0x0f, 0x10, 0x03, 0xca, 0x00, 0x60, - 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0xa0, 0x00, - 0xf8, 0x00, 0x32, 0x08, 0x2c, 0x88, 0x03, 0x22, - 0x40, 0xf8, 0x80, 0x32, 0x30, 0x0f, 0x89, 0x37, - 0x22, 0x08, 0xf8, 0x80, 0x3e, 0x01, 0x02, 0x80, - 0x43, 0xe3, 0x00, 0xf8, 0x20, 0x32, 0x10, 0x8e, - 0x82, 0x01, 0x21, 0x08, 0xd8, 0x54, 0x22, 0x15, - 0x0f, 0x80, 0x23, 0xa0, 0x00, 0xd8, 0x80, 0x32, - 0x00, 0x0e, 0x80, 0x03, 0xe0, 0x20, 0xc8, 0x00, - 0x32, 0x18, 0x2c, 0x80, 0x03, 0xca, 0x04, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x28, 0x05, 0x28, 0x00, - 0xba, 0x00, 0x23, 0xb2, 0x08, 0xe4, 0x8a, 0x39, - 0x04, 0xbe, 0xc8, 0x37, 0x90, 0x0b, 0xe4, 0x06, - 0x39, 0x00, 0xbe, 0x40, 0x2f, 0xa4, 0x08, 0xa0, - 0x02, 0xf9, 0x00, 0xbe, 0xc0, 0x37, 0x84, 0x0b, - 0x60, 0x42, 0x3b, 0x00, 0xa6, 0x40, 0x03, 0x80, - 0x03, 0xe4, 0x02, 0xfa, 0x00, 0x8e, 0x60, 0x22, - 0x80, 0x0b, 0xe0, 0x02, 0x38, 0x00, 0x8e, 0x81, - 0x23, 0xb2, 0x08, 0xe8, 0x02, 0xca, 0x00, 0x40, - 0x00, 0x00, 0x00, 0x00, 0x28, 0x05, 0x4c, 0x00, - 0xb3, 0x00, 0xa0, 0xd1, 0x18, 0x30, 0x02, 0x0c, - 0x00, 0xb3, 0x80, 0x20, 0xc0, 0x0b, 0x10, 0x02, - 0x0c, 0x04, 0xb3, 0x90, 0x2c, 0xa4, 0x8a, 0x30, - 0x02, 0xcc, 0x40, 0xb0, 0x80, 0x2e, 0xc0, 0x8a, - 0x34, 0x02, 0x0f, 0x28, 0x83, 0x60, 0x26, 0xc8, - 0xed, 0x09, 0x00, 0xd8, 0x00, 0x0b, 0xb2, 0x22, - 0x8f, 0xc0, 0xa3, 0x00, 0x28, 0xc0, 0x0b, 0xba, - 0x02, 0x4f, 0x00, 0x83, 0xb0, 0x68, 0xf0, 0x08, - 0x38, 0x02, 0xca, 0x00, 0x50, 0x00, 0x00, 0x00, - 0x00, 0xa0, 0x01, 0x1c, 0x00, 0xbf, 0x80, 0xa1, - 0x60, 0x08, 0xf8, 0x02, 0x1c, 0x00, 0xb7, 0x00, - 0x25, 0xc0, 0x09, 0xf0, 0x0a, 0x1c, 0x04, 0xb6, - 0x00, 0x2d, 0xa0, 0x08, 0x70, 0x02, 0xd4, 0x00, - 0xb4, 0xc0, 0x2d, 0xc0, 0x0b, 0xf4, 0x0a, 0x1e, - 0x20, 0x27, 0x02, 0x25, 0xc0, 0x0b, 0x70, 0x02, - 0xde, 0x08, 0xaf, 0x01, 0x29, 0xc0, 0x0b, 0xf0, - 0x92, 0x1f, 0x04, 0x07, 0x81, 0x21, 0xe0, 0x08, - 0x70, 0x82, 0xe8, 0x00, 0x40, 0x00, 0x00, 0x00, - 0x00, 0xa8, 0x08, 0x1e, 0x00, 0xf7, 0x80, 0x33, - 0x60, 0x0c, 0x78, 0x03, 0x12, 0x00, 0xf7, 0x80, - 0x31, 0x60, 0x0f, 0x58, 0x02, 0x16, 0x10, 0xf4, - 0x80, 0x3d, 0xe0, 0x0e, 0x78, 0x13, 0xde, 0x00, - 0xf4, 0x80, 0x3d, 0xa0, 0x0e, 0x68, 0x63, 0x3e, - 0x08, 0xc7, 0x80, 0x35, 0xe0, 0x0f, 0x68, 0x03, - 0x9e, 0x00, 0xf7, 0x80, 0x39, 0xe0, 0x0f, 0x78, - 0x03, 0x5e, 0x02, 0xcf, 0x80, 0x38, 0x60, 0x0c, - 0x68, 0x23, 0xea, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x08, 0x1d, 0xac, 0x00, 0xf3, 0x00, 0xbe, - 0x40, 0x07, 0x30, 0x03, 0xec, 0x00, 0xf9, 0x00, - 0x3e, 0xc0, 0x0f, 0x90, 0x03, 0xec, 0x10, 0xfb, - 0x00, 0x3c, 0xc1, 0x8f, 0xb0, 0x03, 0xec, 0x00, - 0xf8, 0x00, 0x36, 0x00, 0x0f, 0xb0, 0x03, 0xec, - 0x00, 0xe3, 0x04, 0xba, 0xc0, 0x0d, 0x90, 0x03, - 0xec, 0x00, 0xd3, 0x01, 0xb6, 0xc4, 0x4f, 0x90, - 0x43, 0x60, 0x00, 0xfb, 0x02, 0xbe, 0xc0, 0x0f, - 0xa0, 0x03, 0xc2, 0x06, 0x60, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x05, 0xfe, 0x00, 0xff, 0x80, 0x33, - 0xe0, 0x0c, 0x48, 0xed, 0x09, 0x00, 0xd9, 0x00, - 0x03, 0x3e, 0x40, 0xce, 0x80, 0x33, 0xa4, 0x0e, - 0x48, 0x13, 0xba, 0x40, 0x3e, 0x90, 0x3f, 0x20, - 0x87, 0xf9, 0x03, 0xfe, 0x40, 0xfc, 0x80, 0x3f, - 0xe0, 0x4d, 0xd8, 0x43, 0xfe, 0x00, 0xcf, 0x80, - 0x3f, 0xe0, 0x0f, 0xf8, 0x03, 0x7c, 0x00, 0xdc, - 0x80, 0x1f, 0xe4, 0x0d, 0xc9, 0x03, 0xf2, 0x02, - 0xcc, 0x80, 0x33, 0xec, 0x0c, 0xd9, 0x03, 0x10, - 0x04, 0x70, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x11, - 0x9c, 0x00, 0xb7, 0x08, 0x35, 0x40, 0x88, 0x64, - 0x03, 0x5c, 0x00, 0x84, 0x10, 0x21, 0x84, 0x08, - 0x42, 0x02, 0x98, 0x44, 0xb7, 0x14, 0x3d, 0x00, - 0x0b, 0x70, 0x02, 0xdc, 0x00, 0xb4, 0x00, 0x2f, - 0x90, 0x08, 0x50, 0x03, 0xf5, 0x00, 0x86, 0x00, - 0x0d, 0x40, 0x0b, 0x70, 0x03, 0x7c, 0xc0, 0xa5, - 0x00, 0x3f, 0xc0, 0x08, 0x73, 0x02, 0xd8, 0x00, - 0x84, 0x44, 0x2b, 0x04, 0x08, 0x74, 0x02, 0x2a, - 0x02, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x9c, 0x00, 0xb7, 0x00, 0xa3, 0xc0, 0x08, 0xc0, - 0x02, 0x18, 0x08, 0x97, 0x00, 0x21, 0x50, 0x4b, - 0x40, 0x26, 0x90, 0x41, 0xb6, 0x06, 0x2d, 0xc0, - 0x0b, 0x70, 0x12, 0xdc, 0x00, 0x95, 0x00, 0x2d, - 0xc0, 0x08, 0x75, 0x02, 0xd8, 0x40, 0x87, 0x00, - 0x2d, 0x80, 0x0b, 0x60, 0x02, 0x1c, 0x50, 0x87, - 0x50, 0x2d, 0xc0, 0x08, 0x40, 0x06, 0xd4, 0x00, - 0x84, 0x08, 0x2d, 0x48, 0x48, 0x40, 0x42, 0x44, - 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x20, 0x14, - 0xcc, 0x00, 0xb3, 0x60, 0x24, 0x66, 0x08, 0x28, - 0x82, 0x4c, 0x00, 0x93, 0x00, 0x20, 0xe0, 0x09, - 0x10, 0x82, 0x88, 0x00, 0xb3, 0x00, 0x28, 0x80, - 0x0b, 0x30, 0x12, 0xcc, 0x00, 0xb0, 0x80, 0x2c, - 0x00, 0x08, 0x30, 0x12, 0x81, 0x00, 0x81, 0x61, - 0x2c, 0x20, 0x0b, 0x10, 0x02, 0x4c, 0xed, 0x09, - 0x00, 0xda, 0x00, 0x00, 0xa3, 0x80, 0x2c, 0xf1, - 0x08, 0x18, 0x02, 0x42, 0x00, 0xa0, 0x48, 0x2c, - 0x20, 0x0a, 0xac, 0x02, 0x59, 0x00, 0x30, 0x00, - 0x00, 0x00, 0x00, 0xa8, 0x15, 0xac, 0x00, 0xfb, - 0x40, 0x30, 0xa0, 0x0c, 0xb4, 0x03, 0x2c, 0x02, - 0xd9, 0x00, 0x32, 0xd2, 0x0f, 0x2c, 0x03, 0xa4, - 0x00, 0xb3, 0xc0, 0x2e, 0x82, 0x0f, 0xb0, 0x01, - 0xed, 0x00, 0xf8, 0x0c, 0x7e, 0x50, 0x00, 0xb4, - 0xc6, 0xc0, 0x04, 0x88, 0xc2, 0x0e, 0x20, 0x0f, - 0x9d, 0xa3, 0x2e, 0x20, 0xcb, 0x24, 0x6f, 0xd2, - 0x1c, 0xb8, 0x83, 0xee, 0x00, 0xcb, 0x00, 0x3e, - 0xa0, 0x4c, 0xb0, 0x0b, 0x68, 0x00, 0x60, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x00, 0xec, 0x00, 0xfb, - 0x00, 0x3e, 0x00, 0x0f, 0x85, 0x03, 0xed, 0x08, - 0xe9, 0x02, 0x3e, 0xc0, 0x0e, 0xa8, 0x13, 0xe2, - 0x08, 0xfa, 0x34, 0x3e, 0xd0, 0x0f, 0xb0, 0x03, - 0xec, 0x00, 0xf8, 0x04, 0x7e, 0x40, 0x4e, 0xb0, - 0x07, 0xe4, 0x80, 0xf8, 0x50, 0x3e, 0x4c, 0x0f, - 0x94, 0x03, 0xe0, 0x00, 0xeb, 0x40, 0x7a, 0xc2, - 0x2e, 0xa4, 0x03, 0xcc, 0x40, 0x5b, 0x00, 0x3a, - 0xd4, 0x4d, 0x87, 0x03, 0xa1, 0x00, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x10, 0xfc, 0x00, 0xfb, - 0x00, 0x3f, 0xa0, 0x0c, 0xf0, 0x03, 0x74, 0x00, - 0xcc, 0x98, 0x32, 0x40, 0x0f, 0xc0, 0x03, 0x7e, - 0x80, 0xfd, 0x04, 0x37, 0x82, 0x0f, 0xf0, 0x03, - 0xfc, 0x60, 0xfc, 0x01, 0x3f, 0x42, 0x0c, 0xe0, - 0x13, 0x70, 0x08, 0xdc, 0xa0, 0x3f, 0x40, 0x0f, - 0x10, 0x03, 0x3e, 0x40, 0xff, 0x00, 0x31, 0xc0, - 0xfc, 0xf0, 0x03, 0xec, 0x00, 0xc0, 0x00, 0x31, - 0x00, 0x2e, 0xf0, 0x0a, 0x20, 0x00, 0x30, 0x00, - 0x00, 0x00, 0x00, 0x81, 0x04, 0x6c, 0x00, 0xbb, - 0x00, 0x2e, 0x38, 0x28, 0x14, 0x22, 0x0c, 0x00, - 0x82, 0xed, 0x09, 0x00, 0xdb, 0x00, 0x40, 0x22, - 0xc0, 0x0b, 0x98, 0x23, 0x21, 0x38, 0xba, 0x00, - 0x2a, 0x80, 0x4b, 0xb0, 0x03, 0xec, 0x20, 0xb8, - 0x10, 0x2c, 0x60, 0x28, 0x30, 0x12, 0x27, 0x00, - 0x88, 0xe0, 0x36, 0x70, 0x0b, 0x98, 0x82, 0x2f, - 0x24, 0xb3, 0x40, 0x2a, 0xc0, 0x08, 0x80, 0x03, - 0xe0, 0x00, 0x88, 0xc0, 0xa2, 0xd0, 0x08, 0x84, - 0x02, 0x20, 0x50, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x05, 0x2c, 0x00, 0xbb, 0x00, 0x2e, 0xc8, - 0x08, 0x92, 0x02, 0x6c, 0x21, 0x88, 0x08, 0x22, - 0x80, 0x4b, 0x86, 0x1a, 0x24, 0x04, 0xbb, 0x40, - 0x2a, 0xc6, 0x9b, 0xb0, 0x02, 0xec, 0x08, 0xba, - 0x00, 0x2e, 0x60, 0x48, 0x90, 0x02, 0xa6, 0x00, - 0x98, 0x00, 0x2e, 0x30, 0x1b, 0x88, 0x22, 0x2c, - 0x00, 0xb9, 0x00, 0x22, 0xc0, 0x18, 0x80, 0x42, - 0x60, 0x00, 0x9b, 0x10, 0x2a, 0x91, 0x88, 0x91, - 0x66, 0xa0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, - 0x08, 0x04, 0x0c, 0x00, 0xb3, 0x00, 0x2e, 0x40, - 0x08, 0x00, 0x02, 0x0c, 0x03, 0x82, 0x00, 0xa0, - 0x80, 0x0b, 0x80, 0x02, 0x00, 0x01, 0xb2, 0x01, - 0xa8, 0xc0, 0x0b, 0x30, 0x02, 0x8c, 0x00, 0xb0, - 0x00, 0x0e, 0x00, 0x08, 0x10, 0x0a, 0xa4, 0x00, - 0x80, 0x00, 0x20, 0x40, 0x9b, 0x00, 0x02, 0x4c, - 0x08, 0xb1, 0x01, 0x28, 0xc0, 0x38, 0x20, 0x02, - 0xc8, 0x08, 0x83, 0x04, 0x20, 0x00, 0x08, 0x00, - 0x02, 0x82, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x0d, 0x6c, 0x00, 0xfb, 0x00, 0x2e, 0xc0, - 0x0c, 0x80, 0x03, 0x68, 0x04, 0xc8, 0x00, 0xa2, - 0x41, 0x0f, 0x80, 0x03, 0x2c, 0x00, 0xfb, 0x00, - 0xbe, 0x80, 0x0f, 0xb0, 0x02, 0xe8, 0x00, 0xfb, - 0x00, 0x3e, 0x40, 0x0c, 0xb0, 0x03, 0xe0, 0x01, - 0xd8, 0x04, 0x6e, 0x00, 0x0f, 0x80, 0x03, 0x2c, - 0x04, 0xfb, 0x05, 0x32, 0xed, 0x09, 0x00, 0xdc, - 0x00, 0xc0, 0x28, 0x80, 0x03, 0xe4, 0x00, 0xc8, - 0x00, 0x32, 0x00, 0x2c, 0x10, 0x0b, 0xa0, 0x01, - 0x10, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x1d, 0xfc, - 0x00, 0xff, 0x00, 0x3d, 0x40, 0x0f, 0xc0, 0x03, - 0xdc, 0x00, 0xb4, 0x00, 0x3f, 0xc0, 0x0f, 0xd0, - 0x03, 0xb0, 0x08, 0xfe, 0x00, 0x3f, 0x80, 0x0f, - 0xf0, 0x03, 0xfc, 0x00, 0xfc, 0x00, 0x3f, 0x00, - 0x8f, 0xf0, 0x03, 0x70, 0x1c, 0xfc, 0x00, 0x37, - 0x00, 0x0f, 0xc0, 0x43, 0xbc, 0x00, 0xff, 0x02, - 0x3f, 0xc0, 0xab, 0xc0, 0x03, 0xb0, 0x00, 0xfc, - 0x00, 0x3f, 0x00, 0x0f, 0xc0, 0x03, 0x68, 0x05, - 0x50, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x09, 0xfc, - 0x80, 0xcf, 0x28, 0x3f, 0xc4, 0x0c, 0xf2, 0x03, - 0x30, 0x40, 0xdf, 0x00, 0x3d, 0x00, 0x0c, 0xf0, - 0x03, 0xf0, 0x48, 0xdf, 0x04, 0x37, 0x00, 0x8f, - 0xe0, 0x07, 0xb0, 0x00, 0xff, 0x18, 0x3f, 0xc1, - 0x0f, 0xc0, 0x03, 0xfc, 0x00, 0xfc, 0x40, 0x3f, - 0xc0, 0x1f, 0xf2, 0x13, 0x7c, 0xe4, 0xee, 0x00, - 0xb1, 0xc0, 0x0f, 0xf0, 0x03, 0xf0, 0xa0, 0xcc, - 0x00, 0x3f, 0x00, 0x0f, 0xf0, 0x03, 0xf0, 0x00, - 0x70, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0xfd, - 0x02, 0x8f, 0x40, 0x2d, 0xdc, 0x08, 0xf5, 0x02, - 0x2c, 0x80, 0xbf, 0x50, 0x3a, 0xca, 0x08, 0xf1, - 0x02, 0xec, 0x84, 0xbf, 0x00, 0xa2, 0x10, 0x0b, - 0x82, 0xa2, 0xe0, 0x00, 0xbf, 0x40, 0x2e, 0xc0, - 0x0b, 0x80, 0x02, 0xec, 0x00, 0xb8, 0x20, 0x2a, - 0xc0, 0x0b, 0xf5, 0x02, 0x2d, 0x00, 0xb8, 0x40, - 0x23, 0xd0, 0x0b, 0xf4, 0x02, 0xe1, 0x00, 0xe9, - 0x00, 0x2e, 0x08, 0x0b, 0xb0, 0x03, 0xa0, 0x04, - 0x30, 0x00, 0x00, 0x00, 0x00, 0x88, 0x45, 0xcd, - 0x08, 0xa3, 0x00, 0x2c, 0xc0, 0x08, 0x30, 0x02, - 0x0c, 0x00, 0xb3, 0x00, 0x2c, 0xc8, 0x0a, 0xed, - 0x09, 0x00, 0xdd, 0x00, 0x30, 0x02, 0xcc, 0x80, - 0x93, 0x41, 0x28, 0x1a, 0x1b, 0x00, 0x10, 0xc0, - 0x00, 0xb3, 0x20, 0x2c, 0xc0, 0x0a, 0x00, 0x02, - 0xcc, 0x04, 0xb0, 0x42, 0x20, 0xc0, 0x0b, 0x30, - 0x02, 0x4c, 0x84, 0xa8, 0x14, 0x2c, 0xc4, 0x0b, - 0x34, 0x02, 0x40, 0x00, 0x80, 0x00, 0x2c, 0x02, - 0x0b, 0x30, 0x02, 0xe3, 0x01, 0x70, 0x00, 0x00, - 0x00, 0x00, 0xc0, 0x15, 0xac, 0x00, 0x8b, 0x00, - 0x2e, 0xc0, 0x28, 0xb0, 0x38, 0xac, 0x00, 0xbb, - 0x04, 0x2c, 0x20, 0x08, 0xb0, 0x02, 0xe4, 0x20, - 0xbb, 0x04, 0x2a, 0x62, 0x0b, 0xb2, 0x82, 0xe2, - 0x00, 0xbb, 0x02, 0x2e, 0xd1, 0x0b, 0xb0, 0x02, - 0xe8, 0x21, 0xb8, 0x80, 0x6a, 0x82, 0x09, 0xb0, - 0x46, 0x6c, 0x00, 0xb9, 0x00, 0x2e, 0xc0, 0x0b, - 0xb0, 0x06, 0xe2, 0x28, 0xb9, 0x10, 0x2e, 0x00, - 0x0b, 0xb0, 0x42, 0xb0, 0x04, 0x60, 0x00, 0x00, - 0x00, 0x00, 0x40, 0x15, 0xec, 0x00, 0xcb, 0x01, - 0x3e, 0xc0, 0x0c, 0x30, 0x03, 0x2d, 0x60, 0xdb, - 0x00, 0x3e, 0xd0, 0x2c, 0xb0, 0x03, 0xed, 0x00, - 0xdb, 0x00, 0x3e, 0x30, 0x0f, 0x84, 0x03, 0xa5, - 0x20, 0xfb, 0x00, 0x3e, 0xe0, 0x0f, 0x81, 0x83, - 0xec, 0x00, 0xf8, 0xc0, 0x32, 0xe0, 0x0b, 0x30, - 0x03, 0x6c, 0x00, 0xea, 0x40, 0x3e, 0xc0, 0x0b, - 0xb0, 0x02, 0xe2, 0x08, 0xc8, 0x60, 0x3e, 0x00, - 0x07, 0xb0, 0x03, 0xd0, 0x05, 0x20, 0x00, 0x00, - 0x00, 0x00, 0xe0, 0x01, 0x9c, 0x00, 0xff, 0x00, - 0x3f, 0xc1, 0x03, 0xf0, 0xa3, 0x7c, 0x04, 0xff, - 0x00, 0x1b, 0xc0, 0x07, 0xf0, 0x03, 0xf9, 0x08, - 0x77, 0x00, 0x36, 0x40, 0x0f, 0xd8, 0x03, 0xfc, - 0x00, 0xff, 0x00, 0x3f, 0xd0, 0x0f, 0xf0, 0x03, - 0xfc, 0x20, 0xfd, 0x00, 0x3b, 0xe4, 0x0f, 0xf0, - 0x03, 0xbc, 0x00, 0xfb, 0x00, 0x13, 0xc0, 0x07, - 0xf0, 0x03, 0xed, 0x09, 0x00, 0xde, 0x00, 0xd0, - 0x00, 0xef, 0x80, 0x3f, 0xc0, 0x0f, 0xf0, 0x03, - 0xb8, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x40, - 0x10, 0xac, 0x00, 0xfb, 0x00, 0xb2, 0xc0, 0x0c, - 0xb0, 0x43, 0x24, 0x00, 0xfb, 0x10, 0xb2, 0xc0, - 0x0c, 0xb0, 0x03, 0x6d, 0x00, 0xfb, 0x08, 0x3e, - 0x00, 0x0f, 0x80, 0x03, 0xe0, 0x00, 0xdb, 0x20, - 0x3e, 0x40, 0x05, 0x80, 0x83, 0xe4, 0x00, 0xf9, - 0x64, 0x3a, 0xc1, 0x07, 0xb1, 0x43, 0xec, 0x00, - 0xba, 0x20, 0x3a, 0xc8, 0x0c, 0xb2, 0x03, 0x21, - 0x00, 0xfa, 0xc8, 0xb2, 0xc0, 0x0f, 0xb0, 0x03, - 0xd0, 0x04, 0x20, 0x00, 0x00, 0x00, 0x00, 0xc8, - 0x05, 0x3c, 0x00, 0xbf, 0x82, 0x23, 0xc0, 0x08, - 0xfc, 0x80, 0x2c, 0x18, 0xbf, 0x00, 0x32, 0xc0, - 0x02, 0xf0, 0x02, 0xec, 0x08, 0xbf, 0x80, 0x1a, - 0x40, 0x08, 0x90, 0x02, 0xea, 0x14, 0xbf, 0x40, - 0x2e, 0x40, 0x0b, 0xb0, 0x02, 0xe8, 0x04, 0xb9, - 0x40, 0x3a, 0x80, 0x03, 0xfc, 0x02, 0xfc, 0x40, - 0xb3, 0x00, 0x0b, 0xe0, 0x08, 0xf4, 0x00, 0xe1, - 0x40, 0xbb, 0xc0, 0x22, 0xc0, 0x0b, 0xb0, 0x02, - 0xf2, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0xe0, - 0x05, 0x4c, 0x00, 0x93, 0x00, 0x22, 0xc0, 0x18, - 0x3c, 0x00, 0xcc, 0x08, 0xb3, 0x80, 0x20, 0xc0, - 0x0b, 0x30, 0x02, 0x4c, 0x00, 0xb3, 0xc0, 0x0c, - 0x00, 0x09, 0x00, 0x00, 0xc8, 0x00, 0x33, 0x00, - 0x0c, 0xc1, 0x0b, 0x0d, 0x02, 0xcc, 0x00, 0xb8, - 0x00, 0x2c, 0xc4, 0x09, 0x3c, 0x82, 0xce, 0x49, - 0x92, 0x00, 0x28, 0xe4, 0x88, 0x39, 0x42, 0x00, - 0x00, 0xb1, 0x00, 0x24, 0x00, 0x0b, 0x30, 0x02, - 0x78, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x20, - 0x01, 0x1e, 0x00, 0xb3, 0x88, 0x21, 0xe0, 0x08, - 0x78, 0x0a, 0xd6, 0x00, 0xb7, 0x80, 0x23, 0xe0, - 0x03, 0x78, 0x02, 0xde, 0x00, 0xed, 0x09, 0x00, - 0xdf, 0x00, 0xb7, 0x88, 0x2d, 0xa0, 0x09, 0x48, - 0x02, 0xd2, 0x20, 0xb7, 0x90, 0x6d, 0xf0, 0x03, - 0x49, 0x02, 0xde, 0x00, 0xb5, 0x80, 0x29, 0x60, - 0x0b, 0x78, 0x12, 0xde, 0x00, 0x94, 0x80, 0x29, - 0xe4, 0x08, 0x38, 0x22, 0x92, 0x20, 0xb7, 0x80, - 0x25, 0x20, 0x4b, 0x78, 0x02, 0xc8, 0x00, 0x40, - 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x0c, 0x40, - 0xf3, 0x00, 0x30, 0xc0, 0x0c, 0x31, 0x02, 0xcc, - 0x00, 0xf3, 0x00, 0x30, 0xc0, 0x87, 0x31, 0x03, - 0x48, 0x00, 0xf3, 0x00, 0x1c, 0x44, 0x0f, 0x10, - 0x02, 0xcc, 0x00, 0xf3, 0x18, 0x3c, 0xcf, 0x0d, - 0x30, 0x03, 0xcc, 0x00, 0xf3, 0x70, 0x38, 0xc8, - 0x8f, 0x30, 0x03, 0xcc, 0xc0, 0xf1, 0x48, 0x38, - 0xc0, 0x0c, 0x30, 0x37, 0x00, 0x50, 0xb3, 0x24, - 0x34, 0x00, 0x0f, 0x30, 0x03, 0xd2, 0x02, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x40, 0x15, 0xbc, 0x00, - 0xff, 0x00, 0x3f, 0xc0, 0x6f, 0x71, 0x00, 0x3c, - 0x44, 0xf7, 0x00, 0x7f, 0xc4, 0x0e, 0xf0, 0x43, - 0xfc, 0x40, 0xff, 0x00, 0x3b, 0xc4, 0x0e, 0xd0, - 0x03, 0x74, 0x40, 0xff, 0x50, 0x3f, 0xc4, 0x1d, - 0xf0, 0x07, 0xfc, 0x00, 0xff, 0x10, 0x3f, 0x40, - 0x5f, 0xf1, 0x03, 0xfc, 0x48, 0xfd, 0x00, 0x3f, - 0xc3, 0x1f, 0xf0, 0x07, 0xf8, 0x00, 0xf7, 0x00, - 0x3b, 0x04, 0x0f, 0xf1, 0x03, 0xd0, 0x06, 0x60, - 0x00, 0x00, 0x00, 0x00, 0xa8, 0x05, 0xed, 0x40, - 0xfb, 0x00, 0x3e, 0xca, 0x0f, 0xb4, 0x03, 0xec, - 0x00, 0xfb, 0x48, 0x3e, 0x00, 0x0f, 0xb2, 0x43, - 0x64, 0x00, 0xcb, 0x08, 0x3e, 0xc0, 0x0d, 0xb0, - 0x07, 0xec, 0x00, 0xfb, 0x60, 0x32, 0x81, 0x0f, - 0xb0, 0x43, 0x2c, 0x00, 0xda, 0x00, 0x3e, 0xc0, - 0x0c, 0xb0, 0x87, 0x2c, 0x00, 0xdb, 0x00, 0x3e, - 0xf0, 0x4c, 0xbf, 0x43, 0x20, 0x00, 0xf9, 0x00, - 0xed, 0x09, 0x00, 0xe0, 0x00, 0x02, 0x00, 0x0c, - 0xb0, 0x03, 0xea, 0x00, 0x70, 0x00, 0x00, 0x00, - 0x00, 0x48, 0x11, 0x9c, 0xa0, 0xb7, 0x70, 0x2d, - 0xd8, 0x0b, 0x72, 0x82, 0xdc, 0x04, 0xb7, 0x02, - 0x0d, 0xc0, 0x0b, 0x76, 0x82, 0xdc, 0x00, 0x87, - 0x24, 0x2d, 0xc0, 0x0b, 0x50, 0x26, 0xdc, 0x00, - 0xb3, 0x01, 0x21, 0x80, 0x0b, 0x70, 0x03, 0x5c, - 0x00, 0xd7, 0x00, 0x6f, 0xc0, 0x0d, 0x70, 0x03, - 0x5d, 0x80, 0x97, 0x00, 0x2c, 0xca, 0x08, 0x70, - 0x8a, 0x14, 0x00, 0xb7, 0x00, 0x23, 0xc0, 0x08, - 0x70, 0x02, 0xd2, 0x04, 0x60, 0x00, 0x00, 0x00, - 0x00, 0xc0, 0x00, 0x9e, 0x80, 0xb7, 0x80, 0x2d, - 0xe8, 0x0b, 0x79, 0x46, 0xdf, 0x00, 0xb7, 0xb0, - 0x65, 0xe2, 0x0b, 0x78, 0x02, 0x5e, 0x00, 0xa7, - 0xb0, 0x2d, 0xe0, 0x09, 0x58, 0x12, 0x1e, 0x08, - 0xb7, 0xb0, 0x29, 0xe0, 0x01, 0x7c, 0x02, 0x16, - 0x20, 0xa7, 0x86, 0x29, 0xe2, 0x08, 0x39, 0x2a, - 0x9e, 0x88, 0xb7, 0x80, 0x29, 0xe0, 0x0b, 0x32, - 0x02, 0x56, 0x00, 0xb7, 0x80, 0x25, 0xe2, 0x08, - 0x78, 0x02, 0xf0, 0x00, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x48, 0x14, 0xcc, 0x00, 0xb3, 0x00, 0x2c, - 0xc0, 0x0b, 0x30, 0x46, 0xe4, 0x00, 0xb3, 0x00, - 0x6e, 0x20, 0x0b, 0x30, 0x02, 0xc0, 0x40, 0xa3, - 0x00, 0x2e, 0xe0, 0x0b, 0xb0, 0x82, 0xcc, 0x00, - 0xb3, 0x00, 0x6a, 0xe8, 0x4b, 0x3c, 0x00, 0x4c, - 0x01, 0x93, 0x00, 0x4c, 0xc0, 0x09, 0x30, 0x02, - 0xcc, 0x10, 0xb3, 0x60, 0x2c, 0xc0, 0x2b, 0x30, - 0x00, 0x4d, 0x01, 0xb3, 0x81, 0x22, 0xc2, 0x08, - 0x30, 0x02, 0xd2, 0x04, 0x30, 0x00, 0x00, 0x00, - 0x00, 0xe8, 0x15, 0xa8, 0x00, 0xfa, 0x00, 0x3e, - 0x80, 0x0f, 0xa0, 0x03, 0xf9, 0x00, 0xfa, 0x02, - 0x37, 0xb0, 0x0f, 0xa0, 0x02, 0x78, 0x02, 0xca, - 0x00, 0x3f, 0xa0, 0xed, 0x09, 0x00, 0xe1, 0x00, - 0x0d, 0xe4, 0x23, 0xf8, 0x00, 0xfa, 0x00, 0xbb, - 0x81, 0x0f, 0x68, 0x03, 0x3a, 0x00, 0xee, 0x40, - 0x3b, 0xa0, 0x0c, 0xa0, 0x03, 0xa8, 0x00, 0xbe, - 0x20, 0x3a, 0x80, 0x0b, 0xa0, 0x02, 0x79, 0x00, - 0xbe, 0x80, 0xb3, 0x80, 0x3c, 0xa0, 0x03, 0xfa, - 0x04, 0x60, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, - 0xc0, 0x00, 0xf8, 0x00, 0x3c, 0x00, 0x4f, 0x80, - 0x03, 0xe2, 0x00, 0xf8, 0x00, 0x76, 0x02, 0x0f, - 0x80, 0x03, 0xe0, 0x20, 0xd0, 0x40, 0x3e, 0x24, - 0x0f, 0x80, 0x13, 0x63, 0x40, 0xf8, 0x00, 0x26, - 0x04, 0x0f, 0x80, 0x83, 0xe0, 0x10, 0xf8, 0x18, - 0x36, 0x10, 0x0d, 0x04, 0x07, 0x21, 0x10, 0xd8, - 0x40, 0x3e, 0x00, 0x0c, 0x84, 0x03, 0xa0, 0x20, - 0xf8, 0x10, 0x3e, 0x01, 0x9f, 0x80, 0x03, 0xd2, - 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, - 0xe4, 0x00, 0xc9, 0xc0, 0x3e, 0x40, 0x0e, 0x90, - 0x13, 0xe4, 0x08, 0xc9, 0xc0, 0x36, 0x40, 0x0d, - 0x10, 0x03, 0x64, 0x00, 0x29, 0x00, 0x3a, 0x40, - 0x8e, 0x90, 0x03, 0x66, 0x44, 0xf1, 0x00, 0x36, - 0x41, 0x0f, 0x90, 0x03, 0x85, 0x00, 0xc9, 0x82, - 0x3c, 0x40, 0xcc, 0x90, 0x03, 0x64, 0x00, 0xf9, - 0x90, 0x2e, 0x60, 0x0f, 0x99, 0x00, 0x64, 0x00, - 0xf9, 0x10, 0x36, 0x40, 0x0c, 0x90, 0x03, 0xc2, - 0x04, 0x30, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, - 0x64, 0x02, 0x89, 0x00, 0x2e, 0x41, 0x08, 0x92, - 0x02, 0xe4, 0x02, 0x89, 0x00, 0x2e, 0x40, 0x08, - 0x90, 0x02, 0x04, 0x04, 0xa9, 0x10, 0x22, 0x40, - 0x28, 0x90, 0x02, 0x27, 0x00, 0xb9, 0x40, 0x22, - 0x60, 0x08, 0x90, 0x02, 0x26, 0x10, 0xa9, 0x90, - 0x2e, 0x52, 0x0a, 0x9c, 0x02, 0x24, 0x20, 0x39, - 0xa0, 0x2e, 0x54, 0x0b, 0x96, 0x02, 0x25, 0x28, - 0xb1, 0x48, 0x22, 0x40, 0x08, 0x90, 0xed, 0x09, - 0x00, 0xe2, 0x00, 0x02, 0xe0, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x18, 0x05, 0x24, 0x00, 0x89, - 0x00, 0x2e, 0x40, 0x08, 0x91, 0x02, 0xe4, 0x00, - 0x89, 0x00, 0x2e, 0xc0, 0x08, 0x90, 0x0a, 0x24, - 0x00, 0x89, 0x40, 0x62, 0x40, 0x08, 0x90, 0x02, - 0x25, 0x00, 0xb9, 0x08, 0xaa, 0x49, 0x09, 0x90, - 0x02, 0xa4, 0x00, 0x89, 0x08, 0x2e, 0x40, 0x09, - 0x91, 0x8a, 0xa4, 0x80, 0xa9, 0x00, 0x0e, 0x42, - 0x0b, 0x10, 0x42, 0xa4, 0x40, 0xb9, 0x00, 0x22, - 0x40, 0x08, 0x90, 0x02, 0xc6, 0x00, 0x40, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x81, - 0x00, 0x2c, 0x50, 0x48, 0x10, 0x02, 0xc5, 0x00, - 0x81, 0x00, 0x2c, 0x50, 0x29, 0x10, 0x02, 0x25, - 0x00, 0xa1, 0x00, 0xa0, 0x50, 0x08, 0x14, 0x08, - 0x04, 0x00, 0x91, 0x40, 0x0c, 0xd0, 0x08, 0x90, - 0x02, 0x05, 0x00, 0xa1, 0x28, 0x2c, 0x50, 0x0b, - 0x10, 0x02, 0x05, 0x00, 0x91, 0x02, 0x2c, 0x40, - 0x83, 0x14, 0x02, 0x84, 0x00, 0xb9, 0x00, 0x20, - 0x50, 0x20, 0x10, 0x02, 0xc2, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xb8, 0x0c, 0x60, 0x00, 0xc8, - 0x00, 0x3e, 0x00, 0x0c, 0x80, 0x03, 0xe0, 0x00, - 0xc8, 0x00, 0x3e, 0x00, 0x0c, 0x80, 0x03, 0x00, - 0x00, 0xc8, 0x01, 0x3a, 0x00, 0x0e, 0x80, 0x03, - 0x20, 0x00, 0xf8, 0x00, 0x1e, 0x00, 0x0f, 0x80, - 0x23, 0x80, 0x00, 0x48, 0x20, 0x3e, 0x00, 0x0d, - 0x80, 0x03, 0xe0, 0x00, 0x78, 0x00, 0x3e, 0x00, - 0x0f, 0x80, 0x13, 0xa0, 0x01, 0xf8, 0x00, 0xb2, - 0x00, 0x04, 0x80, 0x03, 0xee, 0x03, 0x50, 0x00, - 0x00, 0x00, 0x00, 0x98, 0x1d, 0xe5, 0x00, 0xf9, - 0x40, 0x3e, 0x50, 0x6f, 0x94, 0x03, 0xf4, 0x00, - 0xf9, 0x41, 0x3f, 0x40, 0x0e, 0x94, 0x03, 0xfc, - 0x00, 0x79, 0x41, 0x3f, 0xd0, 0x0d, 0xf0, 0x03, - 0x34, 0xed, 0x09, 0x00, 0xe3, 0x00, 0x00, 0xf9, - 0x40, 0x13, 0x50, 0x0b, 0x50, 0x03, 0xf5, 0x08, - 0xfd, 0x2d, 0x0f, 0xd0, 0x0e, 0x94, 0x13, 0xe5, - 0x00, 0xff, 0x40, 0x3e, 0x50, 0x0f, 0x94, 0x03, - 0x35, 0x04, 0xf5, 0x00, 0x3b, 0x40, 0x8f, 0x90, - 0x03, 0xe6, 0x02, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x18, 0x05, 0xe4, 0x90, 0xbd, 0x00, 0x3e, 0x40, - 0x4c, 0xd0, 0x03, 0xe4, 0x00, 0xfd, 0x28, 0x3e, - 0x44, 0x0f, 0x90, 0x03, 0x24, 0x00, 0xcd, 0x00, - 0x32, 0x48, 0x0f, 0xb0, 0x03, 0x14, 0x00, 0xdd, - 0x10, 0x3b, 0x40, 0x0c, 0x50, 0x03, 0xb4, 0x80, - 0xfd, 0x01, 0x3b, 0x4c, 0x8d, 0xd0, 0x03, 0xf4, - 0x00, 0x95, 0x02, 0x3f, 0x49, 0x0f, 0xd2, 0x83, - 0x34, 0x00, 0xfd, 0x00, 0x1e, 0x40, 0x0f, 0x90, - 0x03, 0xc6, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, - 0x38, 0x10, 0xe0, 0x40, 0x38, 0x40, 0x2e, 0x02, - 0x08, 0x81, 0x02, 0x40, 0xa0, 0xb8, 0x00, 0x0e, - 0x08, 0x09, 0x84, 0x07, 0x20, 0x30, 0x88, 0x10, - 0x36, 0x0e, 0x4b, 0x82, 0x0a, 0xa0, 0x00, 0xa8, - 0x40, 0x2e, 0x82, 0x0d, 0x80, 0x03, 0x68, 0xb0, - 0xba, 0x48, 0x2e, 0x0c, 0x1b, 0x84, 0x02, 0x60, - 0xa8, 0x88, 0x10, 0x2e, 0x00, 0x0b, 0x82, 0x13, - 0xa8, 0x00, 0xb8, 0x00, 0x2e, 0x82, 0x09, 0x80, - 0x02, 0xce, 0x04, 0x30, 0x00, 0x00, 0x00, 0x00, - 0x08, 0x05, 0xc4, 0x00, 0xb1, 0x10, 0x2c, 0x44, - 0x0a, 0x10, 0x02, 0xc4, 0x80, 0xb1, 0x02, 0x08, - 0x48, 0x0b, 0x11, 0x02, 0x04, 0x02, 0x81, 0x00, - 0x24, 0x48, 0x0b, 0x92, 0xa2, 0x64, 0x00, 0x81, - 0x10, 0x28, 0x44, 0x09, 0x10, 0x02, 0x44, 0xc0, - 0xb1, 0x32, 0x28, 0x48, 0x0b, 0x11, 0x06, 0xc4, - 0xc0, 0x91, 0x00, 0x28, 0x45, 0x0b, 0x12, 0x82, - 0xc4, 0x41, 0xb1, 0x00, 0x2c, 0x40, 0x0b, 0x10, - 0x02, 0xc2, 0x01, 0x60, 0xed, 0x09, 0x00, 0xe4, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x15, 0xa4, - 0x00, 0xb9, 0x00, 0x0e, 0x40, 0x2a, 0x90, 0x02, - 0x64, 0x00, 0xb9, 0x01, 0x26, 0x54, 0x0b, 0x90, - 0x0a, 0xa4, 0x40, 0x89, 0x00, 0x26, 0x40, 0x03, - 0x92, 0x22, 0xe4, 0x00, 0xa9, 0x00, 0x26, 0x41, - 0x8b, 0x90, 0x02, 0x64, 0x05, 0xb9, 0x10, 0x2e, - 0x41, 0x0b, 0x90, 0x02, 0x6c, 0x00, 0x89, 0x00, - 0x4e, 0x40, 0x0b, 0x90, 0x12, 0xa6, 0x00, 0xb9, - 0x00, 0x2e, 0x44, 0x09, 0x90, 0x02, 0xc6, 0x05, - 0x20, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x15, 0xe4, - 0x00, 0xf9, 0x00, 0x3e, 0x40, 0x0e, 0x90, 0x03, - 0xe4, 0x20, 0xf9, 0x04, 0x3e, 0x40, 0x8f, 0x90, - 0x43, 0x25, 0x00, 0xc1, 0x00, 0x36, 0x40, 0x0f, - 0x14, 0x03, 0x65, 0x84, 0xd9, 0x00, 0x3a, 0x54, - 0x0c, 0x9d, 0x83, 0x66, 0x00, 0xf9, 0x44, 0x3a, - 0x50, 0x49, 0x90, 0x23, 0xe4, 0x10, 0xd9, 0x04, - 0x3e, 0x40, 0x0f, 0x90, 0x03, 0x66, 0x04, 0xf9, - 0x84, 0x3e, 0x50, 0x0f, 0x90, 0x23, 0xe8, 0x04, - 0x70, 0x00, 0x00, 0x00, 0x00, 0x28, 0x01, 0x24, - 0x00, 0xf9, 0x04, 0x3c, 0x40, 0x0d, 0x90, 0x83, - 0x66, 0x80, 0xf9, 0x00, 0x1e, 0x60, 0x0d, 0x90, - 0x03, 0x64, 0x00, 0xf9, 0x00, 0x1e, 0x40, 0x1f, - 0x90, 0x03, 0x24, 0x00, 0xf9, 0x00, 0x2c, 0x40, - 0x0d, 0x90, 0x83, 0x65, 0x00, 0xf9, 0x80, 0x36, - 0x40, 0x0b, 0x90, 0x03, 0xc4, 0x08, 0xb9, 0x91, - 0x3e, 0x41, 0x0f, 0x90, 0x83, 0xe4, 0x00, 0xb9, - 0x40, 0x3e, 0x40, 0x0d, 0x90, 0x13, 0xca, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x28, 0x10, 0xa0, - 0x00, 0xf8, 0x00, 0x32, 0x00, 0x0f, 0x81, 0x03, - 0xe1, 0x00, 0xc8, 0x00, 0x32, 0x00, 0x8f, 0x00, - 0x03, 0xe1, 0x00, 0xf8, 0x20, 0x3e, 0x00, 0x0f, - 0x80, 0x01, 0xe1, 0x20, 0xd8, 0x34, 0x3e, 0xed, - 0x09, 0x00, 0xe5, 0x00, 0x1c, 0x07, 0x81, 0x43, - 0xa1, 0x00, 0xc8, 0x20, 0x36, 0x00, 0x0f, 0x80, - 0x03, 0xe0, 0x00, 0xc8, 0x60, 0x3e, 0x00, 0x4f, - 0x80, 0x0b, 0x21, 0x28, 0xf8, 0x18, 0x3e, 0x10, - 0x8e, 0x80, 0x03, 0xca, 0x04, 0x20, 0x00, 0x00, - 0x00, 0x00, 0x28, 0x05, 0x28, 0x00, 0xba, 0x00, - 0x22, 0x80, 0x01, 0xe8, 0x02, 0xe8, 0x00, 0x8a, - 0x00, 0x22, 0x80, 0x09, 0xa0, 0x03, 0xa8, 0x00, - 0xbe, 0x00, 0x2e, 0x80, 0x0b, 0xa0, 0x42, 0x5a, - 0x00, 0xbe, 0x40, 0x2f, 0xa0, 0x09, 0x60, 0x02, - 0x38, 0x85, 0xae, 0x80, 0x27, 0xb8, 0x4b, 0xec, - 0x03, 0xbb, 0x80, 0xae, 0xc0, 0x0b, 0xa0, 0x06, - 0xe8, 0x02, 0x38, 0x00, 0xbe, 0x40, 0x2e, 0x81, - 0x08, 0xa0, 0x02, 0xca, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x28, 0x04, 0x0c, 0x00, 0xb1, 0x81, - 0x28, 0xc0, 0x03, 0x0c, 0x02, 0xcc, 0x00, 0x81, - 0x80, 0x0c, 0xc0, 0x0b, 0x30, 0x02, 0xac, 0x00, - 0xb0, 0x80, 0x24, 0xc0, 0x0b, 0x30, 0x02, 0x0d, - 0x00, 0x83, 0x80, 0x2c, 0xf0, 0x0b, 0x38, 0x00, - 0xcf, 0x80, 0x93, 0x40, 0x20, 0xe8, 0x09, 0x3e, - 0x02, 0x8e, 0x80, 0x83, 0x00, 0x28, 0xe8, 0x0b, - 0xbd, 0x02, 0x4f, 0x40, 0xb3, 0x40, 0x2c, 0xc0, - 0x0a, 0x30, 0x02, 0xca, 0x00, 0x50, 0x00, 0x00, - 0x00, 0x00, 0xa0, 0x01, 0x1c, 0x00, 0xb3, 0xc0, - 0x29, 0xc0, 0x09, 0x70, 0x02, 0xde, 0x00, 0x97, - 0xc0, 0x29, 0xc0, 0x0b, 0x70, 0x06, 0x9c, 0x40, - 0xb7, 0x08, 0x2d, 0xc9, 0x0b, 0x70, 0x02, 0xfc, - 0x20, 0xa7, 0x04, 0x0d, 0xc0, 0x09, 0xf0, 0x12, - 0x5e, 0x00, 0xb7, 0x08, 0x2d, 0xc0, 0x0b, 0x54, - 0x02, 0x80, 0x00, 0xa7, 0xc4, 0x21, 0xc2, 0x8a, - 0x00, 0x02, 0x5c, 0x00, 0x37, 0x00, 0x2d, 0xe0, - 0x08, 0x70, 0x02, 0xe8, 0x00, 0x40, 0x00, 0x00, - 0x00, 0x00, 0xed, 0x09, 0x00, 0xe6, 0x00, 0xa8, - 0x08, 0x1e, 0x00, 0xf7, 0x80, 0xa9, 0xea, 0x0f, - 0x78, 0x03, 0xdf, 0x42, 0xc3, 0x80, 0xbd, 0xe0, - 0x0f, 0x78, 0x03, 0x9e, 0x00, 0xf7, 0x80, 0x3d, - 0xe4, 0x0f, 0x78, 0x03, 0xde, 0x00, 0xd7, 0x80, - 0x2d, 0xe0, 0x0f, 0x78, 0x03, 0xfe, 0x04, 0x97, - 0x80, 0x35, 0xa0, 0x0f, 0x58, 0x03, 0x92, 0x00, - 0xc7, 0x80, 0x39, 0xe0, 0x0f, 0x78, 0x02, 0x5e, - 0x04, 0xf7, 0x82, 0x2f, 0xf0, 0x0e, 0x78, 0x03, - 0xe2, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x1d, 0xac, 0x00, 0xbb, 0x01, 0x36, 0xcc, 0x0d, - 0xb0, 0x03, 0xed, 0x80, 0xeb, 0x00, 0x36, 0xd4, - 0x0d, 0xb0, 0x03, 0xac, 0x00, 0xf9, 0x00, 0x3e, - 0xd8, 0x0b, 0xb1, 0x03, 0x6c, 0x00, 0xfb, 0x00, - 0x3e, 0xc0, 0x8d, 0xb0, 0x13, 0xac, 0x04, 0xeb, - 0x04, 0x36, 0x80, 0x4f, 0x80, 0x27, 0xa0, 0x10, - 0xfa, 0x00, 0x3a, 0xc0, 0x0f, 0xa0, 0x52, 0xa8, - 0x00, 0xf8, 0x00, 0x3e, 0xc0, 0x0f, 0xb0, 0x03, - 0xc2, 0x02, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x05, 0xfe, 0x00, 0xf7, 0x80, 0x3b, 0xe4, 0x0f, - 0xf8, 0x03, 0x3e, 0x00, 0xff, 0x80, 0x3d, 0xf4, - 0x0c, 0xf3, 0x03, 0xff, 0x00, 0xff, 0x82, 0x1b, - 0xe2, 0x0f, 0xfc, 0x03, 0x3c, 0x80, 0xcf, 0x80, - 0xb3, 0xe0, 0x0f, 0xe8, 0x07, 0xfe, 0x00, 0xff, - 0x94, 0x33, 0xe4, 0x1c, 0x59, 0x02, 0x32, 0x80, - 0xd7, 0x80, 0x33, 0xe1, 0x0c, 0xf8, 0x13, 0x3e, - 0x40, 0xff, 0x81, 0x3d, 0xe0, 0x04, 0xf9, 0x03, - 0xc0, 0x04, 0x70, 0x00, 0x00, 0x00, 0x00, 0xa8, - 0x01, 0x9c, 0x00, 0xb7, 0x04, 0x21, 0xc0, 0x0b, - 0x60, 0x02, 0x1c, 0x10, 0xb7, 0x00, 0x2d, 0xc0, - 0x18, 0x71, 0x07, 0x