···1212#include "ppc_asm.h"13131414 .text1515+ /* a procedure descriptor used when booting this as a COFF file */1616+_zimage_start_opd:1717+ .long _zimage_start, 0, 0, 01818+1519 .globl _zimage_start1620_zimage_start:2121+ /* Work out the offset between the address we were linked at2222+ and the address where we're running. */1723 bl 1f1818-1919-1:2020- mflr r02424+1: mflr r02125 lis r9,1b@ha2226 addi r9,r9,1b@l2327 subf. r0,r9,r02424- beq 3f2828+ beq 3f /* if running at same address as linked */25293030+ /* The .got2 section contains a list of addresses, so add3131+ the address offset onto each entry. */2632 lis r9,__got2_start@ha2733 addi r9,r9,__got2_start@l2834 lis r8,__got2_end@ha···3832 srwi. r8,r8,23933 mtctr r84034 add r9,r0,r94141-2:4242- lwz r8,0(r9)3535+2: lwz r8,0(r9)4336 add r8,r8,r04437 stw r8,0(r9)4538 addi r9,r9,44639 bdnz 2b47404848-3:4949- lis r9,_start@h4141+ /* Do a cache flush for our text, in case OF didn't */4242+3: lis r9,_start@h5043 add r9,r0,r95144 lis r8,_etext@ha5245 addi r8,r8,_etext@l
+84
arch/powerpc/boot/hack-coff.c
···11+/*22+ * hack-coff.c - hack the header of an xcoff file to fill in33+ * a few fields needed by the Open Firmware xcoff loader on44+ * Power Macs but not initialized by objcopy.55+ *66+ * Copyright (C) Paul Mackerras 1997.77+ *88+ * This program is free software; you can redistribute it and/or99+ * modify it under the terms of the GNU General Public License1010+ * as published by the Free Software Foundation; either version1111+ * 2 of the License, or (at your option) any later version.1212+ */1313+#include <stdio.h>1414+#include <stdlib.h>1515+#include <unistd.h>1616+#include <fcntl.h>1717+#include <string.h>1818+#include "rs6000.h"1919+2020+#define AOUT_MAGIC 0x010b2121+2222+#define get_16be(x) ((((unsigned char *)(x))[0] << 8) \2323+ + ((unsigned char *)(x))[1])2424+#define put_16be(x, v) (((unsigned char *)(x))[0] = (v) >> 8, \2525+ ((unsigned char *)(x))[1] = (v) & 0xff)2626+#define get_32be(x) ((((unsigned char *)(x))[0] << 24) \2727+ + (((unsigned char *)(x))[1] << 16) \2828+ + (((unsigned char *)(x))[2] << 8) \2929+ + ((unsigned char *)(x))[3])3030+3131+int3232+main(int ac, char **av)3333+{3434+ int fd;3535+ int i, nsect;3636+ int aoutsz;3737+ struct external_filehdr fhdr;3838+ AOUTHDR aout;3939+ struct external_scnhdr shdr;4040+4141+ if (ac != 2) {4242+ fprintf(stderr, "Usage: hack-coff coff-file\n");4343+ exit(1);4444+ }4545+ if ((fd = open(av[1], 2)) == -1) {4646+ perror(av[2]);4747+ exit(1);4848+ }4949+ if (read(fd, &fhdr, sizeof(fhdr)) != sizeof(fhdr))5050+ goto readerr;5151+ i = get_16be(fhdr.f_magic);5252+ if (i != U802TOCMAGIC && i != U802WRMAGIC && i != U802ROMAGIC) {5353+ fprintf(stderr, "%s: not an xcoff file\n", av[1]);5454+ exit(1);5555+ }5656+ aoutsz = get_16be(fhdr.f_opthdr);5757+ if (read(fd, &aout, aoutsz) != aoutsz)5858+ goto readerr;5959+ nsect = get_16be(fhdr.f_nscns);6060+ for (i = 0; i < nsect; ++i) {6161+ if (read(fd, &shdr, sizeof(shdr)) != sizeof(shdr))6262+ goto readerr;6363+ if (strcmp(shdr.s_name, ".text") == 0) {6464+ put_16be(aout.o_snentry, i+1);6565+ put_16be(aout.o_sntext, i+1);6666+ } else if (strcmp(shdr.s_name, ".data") == 0) {6767+ put_16be(aout.o_sndata, i+1);6868+ } else if (strcmp(shdr.s_name, ".bss") == 0) {6969+ put_16be(aout.o_snbss, i+1);7070+ }7171+ }7272+ put_16be(aout.magic, AOUT_MAGIC);7373+ if (lseek(fd, (long) sizeof(struct external_filehdr), 0) == -17474+ || write(fd, &aout, aoutsz) != aoutsz) {7575+ fprintf(stderr, "%s: write error\n", av[1]);7676+ exit(1);7777+ }7878+ close(fd);7979+ exit(0);8080+8181+readerr:8282+ fprintf(stderr, "%s: read error or file too short\n", av[1]);8383+ exit(1);8484+}
+22-24
arch/powerpc/boot/main.c
···212122222323/* Value picked to match that used by yaboot */2424-#define PROG_START 0x014000002525-#define RAM_END (512<<20) // Fixme: use OF */2424+#define PROG_START 0x01400000 /* only used on 64-bit systems */2525+#define RAM_END (512<<20) /* Fixme: use OF */2626#define ONE_MB 0x10000027272828extern char _start[];···160160 elfoffset = (unsigned long)elf64ph->p_offset;161161 vmlinux.size = (unsigned long)elf64ph->p_filesz + elfoffset;162162 vmlinux.memsize = (unsigned long)elf64ph->p_memsz + elfoffset;163163+164164+#if defined(PROG_START)165165+ /*166166+ * Maintain a "magic" minimum address. This keeps some older167167+ * firmware platforms running.168168+ */169169+170170+ if (claim_base < PROG_START)171171+ claim_base = PROG_START;172172+#endif173173+163174 return 1;164175}165176···217206 exit();218207 if (getprop(chosen_handle, "stdout", &stdout, sizeof(stdout)) != 4)219208 exit();220220- stderr = stdout;221221- if (getprop(chosen_handle, "stdin", &stdin, sizeof(stdin)) != 4)222222- exit();223209224210 printf("\n\rzImage starting: loaded at 0x%p (sp: 0x%p)\n\r", _start, sp);211211+212212+ /*213213+ * The first available claim_base must be above the end of the214214+ * the loaded kernel wrapper file (_start to _end includes the215215+ * initrd image if it is present) and rounded up to a nice216216+ * 1 MB boundary for good measure.217217+ */218218+219219+ claim_base = _ALIGN_UP((unsigned long)_end, ONE_MB);225220226221 vmlinuz.addr = (unsigned long)_vmlinux_start;227222 vmlinuz.size = (unsigned long)(_vmlinux_end - _vmlinux_start);···244227 printf("Error: not a valid PPC32 or PPC64 ELF file!\n\r");245228 exit();246229 }247247-248248- /*249249- * The first available claim_base must be above the end of the250250- * the loaded kernel wrapper file (_start to _end includes the251251- * initrd image if it is present) and rounded up to a nice252252- * 1 MB boundary for good measure.253253- */254254-255255- claim_base = _ALIGN_UP((unsigned long)_end, ONE_MB);256256-257257-#if defined(PROG_START)258258- /*259259- * Maintain a "magic" minimum address. This keeps some older260260- * firmware platforms running.261261- */262262-263263- if (claim_base < PROG_START)264264- claim_base = PROG_START;265265-#endif266230267231 /* We need to claim the memsize plus the file offset since gzip268232 * will expand the header (file offset), then the kernel, then
+111-445
arch/powerpc/boot/prom.c
···1313#include "prom.h"14141515int (*prom)(void *);1616+phandle chosen_handle;1717+ihandle stdout;16181717-void *chosen_handle;1818-1919-void *stdin;2020-void *stdout;2121-void *stderr;2222-2323-2424-int2525-write(void *handle, void *ptr, int nb)1919+int call_prom(const char *service, int nargs, int nret, ...)2620{2121+ int i;2722 struct prom_args {2828- char *service;2323+ const char *service;2924 int nargs;3025 int nret;3131- void *ihandle;3232- void *addr;3333- int len;3434- int actual;2626+ unsigned int args[12];3527 } args;2828+ va_list list;36293737- args.service = "write";3838- args.nargs = 3;3939- args.nret = 1;4040- args.ihandle = handle;4141- args.addr = ptr;4242- args.len = nb;4343- args.actual = -1;4444- (*prom)(&args);4545- return args.actual;3030+ args.service = service;3131+ args.nargs = nargs;3232+ args.nret = nret;3333+3434+ va_start(list, nret);3535+ for (i = 0; i < nargs; i++)3636+ args.args[i] = va_arg(list, unsigned int);3737+ va_end(list);3838+3939+ for (i = 0; i < nret; i++)4040+ args.args[nargs+i] = 0;4141+4242+ if (prom(&args) < 0)4343+ return -1;4444+4545+ return (nret > 0)? args.args[nargs]: 0;4646}47474848-int4949-read(void *handle, void *ptr, int nb)4848+int call_prom_ret(const char *service, int nargs, int nret,4949+ unsigned int *rets, ...)5050{5151+ int i;5152 struct prom_args {5252- char *service;5353+ const char *service;5354 int nargs;5455 int nret;5555- void *ihandle;5656- void *addr;5757- int len;5858- int actual;5656+ unsigned int args[12];5957 } args;5858+ va_list list;60596161- args.service = "read";6262- args.nargs = 3;6363- args.nret = 1;6464- args.ihandle = handle;6565- args.addr = ptr;6666- args.len = nb;6767- args.actual = -1;6868- (*prom)(&args);6969- return args.actual;6060+ args.service = service;6161+ args.nargs = nargs;6262+ args.nret = nret;6363+6464+ va_start(list, rets);6565+ for (i = 0; i < nargs; i++)6666+ args.args[i] = va_arg(list, unsigned int);6767+ va_end(list);6868+6969+ for (i = 0; i < nret; i++)7070+ args.args[nargs+i] = 0;7171+7272+ if (prom(&args) < 0)7373+ return -1;7474+7575+ if (rets != (void *) 0)7676+ for (i = 1; i < nret; ++i)7777+ rets[i-1] = args.args[nargs+i];7878+7979+ return (nret > 0)? args.args[nargs]: 0;7080}71817272-void7373-exit()8282+int write(void *handle, void *ptr, int nb)7483{7575- struct prom_args {7676- char *service;7777- } args;7878-7979- for (;;) {8080- args.service = "exit";8181- (*prom)(&args);8282- }8484+ return call_prom("write", 3, 1, handle, ptr, nb);8385}84868585-void8686-pause(void)8787-{8888- struct prom_args {8989- char *service;9090- } args;9191-9292- args.service = "enter";9393- (*prom)(&args);9494-}9595-9696-void *9797-finddevice(const char *name)9898-{9999- struct prom_args {100100- char *service;101101- int nargs;102102- int nret;103103- const char *devspec;104104- void *phandle;105105- } args;106106-107107- args.service = "finddevice";108108- args.nargs = 1;109109- args.nret = 1;110110- args.devspec = name;111111- args.phandle = (void *) -1;112112- (*prom)(&args);113113- return args.phandle;114114-}115115-116116-void *117117-claim(unsigned long virt, unsigned long size, unsigned long align)118118-{119119- struct prom_args {120120- char *service;121121- int nargs;122122- int nret;123123- unsigned int virt;124124- unsigned int size;125125- unsigned int align;126126- void *ret;127127- } args;128128-129129- args.service = "claim";130130- args.nargs = 3;131131- args.nret = 1;132132- args.virt = virt;133133- args.size = size;134134- args.align = align;135135- (*prom)(&args);136136- return args.ret;137137-}138138-139139-int140140-getprop(void *phandle, const char *name, void *buf, int buflen)141141-{142142- struct prom_args {143143- char *service;144144- int nargs;145145- int nret;146146- void *phandle;147147- const char *name;148148- void *buf;149149- int buflen;150150- int size;151151- } args;152152-153153- args.service = "getprop";154154- args.nargs = 4;155155- args.nret = 1;156156- args.phandle = phandle;157157- args.name = name;158158- args.buf = buf;159159- args.buflen = buflen;160160- args.size = -1;161161- (*prom)(&args);162162- return args.size;163163-}164164-165165-int166166-putc(int c, void *f)167167-{168168- char ch = c;169169-170170- if (c == '\n')171171- putc('\r', f);172172- return write(f, &ch, 1) == 1? c: -1;173173-}174174-175175-int176176-putchar(int c)177177-{178178- return putc(c, stdout);179179-}180180-181181-int182182-fputs(char *str, void *f)183183-{184184- int n = strlen(str);185185-186186- return write(f, str, n) == n? 0: -1;187187-}188188-189189-size_t strnlen(const char * s, size_t count)190190-{191191- const char *sc;192192-193193- for (sc = s; count-- && *sc != '\0'; ++sc)194194- /* nothing */;195195- return sc - s;196196-}197197-198198-extern unsigned int __div64_32(unsigned long long *dividend,199199- unsigned int divisor);200200-201201-/* The unnecessary pointer compare is there202202- * to check for type safety (n must be 64bit)8787+/*8888+ * Older OF's require that when claiming a specific range of addresses,8989+ * we claim the physical space in the /memory node and the virtual9090+ * space in the chosen mmu node, and then do a map operation to9191+ * map virtual to physical.20392 */204204-# define do_div(n,base) ({ \205205- unsigned int __base = (base); \206206- unsigned int __rem; \207207- (void)(((typeof((n)) *)0) == ((unsigned long long *)0)); \208208- if (((n) >> 32) == 0) { \209209- __rem = (unsigned int)(n) % __base; \210210- (n) = (unsigned int)(n) / __base; \211211- } else \212212- __rem = __div64_32(&(n), __base); \213213- __rem; \214214- })9393+static int need_map = -1;9494+static ihandle chosen_mmu;9595+static phandle memory;21596216216-static int skip_atoi(const char **s)9797+/* returns true if s2 is a prefix of s1 */9898+static int string_match(const char *s1, const char *s2)21799{218218- int i, c;219219-220220- for (i = 0; '0' <= (c = **s) && c <= '9'; ++*s)221221- i = i*10 + c - '0';222222- return i;100100+ for (; *s2; ++s2)101101+ if (*s1++ != *s2)102102+ return 0;103103+ return 1;223104}224105225225-#define ZEROPAD 1 /* pad with zero */226226-#define SIGN 2 /* unsigned/signed long */227227-#define PLUS 4 /* show plus */228228-#define SPACE 8 /* space if plus */229229-#define LEFT 16 /* left justified */230230-#define SPECIAL 32 /* 0x */231231-#define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */232232-233233-static char * number(char * str, unsigned long long num, int base, int size, int precision, int type)106106+static int check_of_version(void)234107{235235- char c,sign,tmp[66];236236- const char *digits="0123456789abcdefghijklmnopqrstuvwxyz";237237- int i;108108+ phandle oprom, chosen;109109+ char version[64];238110239239- if (type & LARGE)240240- digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";241241- if (type & LEFT)242242- type &= ~ZEROPAD;243243- if (base < 2 || base > 36)111111+ oprom = finddevice("/openprom");112112+ if (oprom == (phandle) -1)244113 return 0;245245- c = (type & ZEROPAD) ? '0' : ' ';246246- sign = 0;247247- if (type & SIGN) {248248- if ((signed long long)num < 0) {249249- sign = '-';250250- num = - (signed long long)num;251251- size--;252252- } else if (type & PLUS) {253253- sign = '+';254254- size--;255255- } else if (type & SPACE) {256256- sign = ' ';257257- size--;114114+ if (getprop(oprom, "model", version, sizeof(version)) <= 0)115115+ return 0;116116+ version[sizeof(version)-1] = 0;117117+ printf("OF version = '%s'\r\n", version);118118+ if (!string_match(version, "Open Firmware, 1.")119119+ && !string_match(version, "FirmWorks,3."))120120+ return 0;121121+ chosen = finddevice("/chosen");122122+ if (chosen == (phandle) -1) {123123+ chosen = finddevice("/chosen@0");124124+ if (chosen == (phandle) -1) {125125+ printf("no chosen\n");126126+ return 0;258127 }259128 }260260- if (type & SPECIAL) {261261- if (base == 16)262262- size -= 2;263263- else if (base == 8)264264- size--;129129+ if (getprop(chosen, "mmu", &chosen_mmu, sizeof(chosen_mmu)) <= 0) {130130+ printf("no mmu\n");131131+ return 0;265132 }266266- i = 0;267267- if (num == 0)268268- tmp[i++]='0';269269- else while (num != 0) {270270- tmp[i++] = digits[do_div(num, base)];271271- }272272- if (i > precision)273273- precision = i;274274- size -= precision;275275- if (!(type&(ZEROPAD+LEFT)))276276- while(size-->0)277277- *str++ = ' ';278278- if (sign)279279- *str++ = sign;280280- if (type & SPECIAL) {281281- if (base==8)282282- *str++ = '0';283283- else if (base==16) {284284- *str++ = '0';285285- *str++ = digits[33];133133+ memory = (ihandle) call_prom("open", 1, 1, "/memory");134134+ if (memory == (ihandle) -1) {135135+ memory = (ihandle) call_prom("open", 1, 1, "/memory@0");136136+ if (memory == (ihandle) -1) {137137+ printf("no memory node\n");138138+ return 0;286139 }287140 }288288- if (!(type & LEFT))289289- while (size-- > 0)290290- *str++ = c;291291- while (i < precision--)292292- *str++ = '0';293293- while (i-- > 0)294294- *str++ = tmp[i];295295- while (size-- > 0)296296- *str++ = ' ';297297- return str;141141+ printf("old OF detected\r\n");142142+ return 1;298143}299144300300-int vsprintf(char *buf, const char *fmt, va_list args)145145+void *claim(unsigned long virt, unsigned long size, unsigned long align)301146{302302- int len;303303- unsigned long long num;304304- int i, base;305305- char * str;306306- const char *s;147147+ int ret;148148+ unsigned int result;307149308308- int flags; /* flags to number() */309309-310310- int field_width; /* width of output field */311311- int precision; /* min. # of digits for integers; max312312- number of chars for from string */313313- int qualifier; /* 'h', 'l', or 'L' for integer fields */314314- /* 'z' support added 23/7/1999 S.H. */315315- /* 'z' changed to 'Z' --davidm 1/25/99 */316316-150150+ if (need_map < 0)151151+ need_map = check_of_version();152152+ if (align || !need_map)153153+ return (void *) call_prom("claim", 3, 1, virt, size, align);317154318318- for (str=buf ; *fmt ; ++fmt) {319319- if (*fmt != '%') {320320- *str++ = *fmt;321321- continue;322322- }323323-324324- /* process flags */325325- flags = 0;326326- repeat:327327- ++fmt; /* this also skips first '%' */328328- switch (*fmt) {329329- case '-': flags |= LEFT; goto repeat;330330- case '+': flags |= PLUS; goto repeat;331331- case ' ': flags |= SPACE; goto repeat;332332- case '#': flags |= SPECIAL; goto repeat;333333- case '0': flags |= ZEROPAD; goto repeat;334334- }335335-336336- /* get field width */337337- field_width = -1;338338- if ('0' <= *fmt && *fmt <= '9')339339- field_width = skip_atoi(&fmt);340340- else if (*fmt == '*') {341341- ++fmt;342342- /* it's the next argument */343343- field_width = va_arg(args, int);344344- if (field_width < 0) {345345- field_width = -field_width;346346- flags |= LEFT;347347- }348348- }349349-350350- /* get the precision */351351- precision = -1;352352- if (*fmt == '.') {353353- ++fmt; 354354- if ('0' <= *fmt && *fmt <= '9')355355- precision = skip_atoi(&fmt);356356- else if (*fmt == '*') {357357- ++fmt;358358- /* it's the next argument */359359- precision = va_arg(args, int);360360- }361361- if (precision < 0)362362- precision = 0;363363- }364364-365365- /* get the conversion qualifier */366366- qualifier = -1;367367- if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' || *fmt =='Z') {368368- qualifier = *fmt;369369- ++fmt;370370- }371371-372372- /* default base */373373- base = 10;374374-375375- switch (*fmt) {376376- case 'c':377377- if (!(flags & LEFT))378378- while (--field_width > 0)379379- *str++ = ' ';380380- *str++ = (unsigned char) va_arg(args, int);381381- while (--field_width > 0)382382- *str++ = ' ';383383- continue;384384-385385- case 's':386386- s = va_arg(args, char *);387387- if (!s)388388- s = "<NULL>";389389-390390- len = strnlen(s, precision);391391-392392- if (!(flags & LEFT))393393- while (len < field_width--)394394- *str++ = ' ';395395- for (i = 0; i < len; ++i)396396- *str++ = *s++;397397- while (len < field_width--)398398- *str++ = ' ';399399- continue;400400-401401- case 'p':402402- if (field_width == -1) {403403- field_width = 2*sizeof(void *);404404- flags |= ZEROPAD;405405- }406406- str = number(str,407407- (unsigned long) va_arg(args, void *), 16,408408- field_width, precision, flags);409409- continue;410410-411411-412412- case 'n':413413- if (qualifier == 'l') {414414- long * ip = va_arg(args, long *);415415- *ip = (str - buf);416416- } else if (qualifier == 'Z') {417417- size_t * ip = va_arg(args, size_t *);418418- *ip = (str - buf);419419- } else {420420- int * ip = va_arg(args, int *);421421- *ip = (str - buf);422422- }423423- continue;424424-425425- case '%':426426- *str++ = '%';427427- continue;428428-429429- /* integer number formats - set up the flags and "break" */430430- case 'o':431431- base = 8;432432- break;433433-434434- case 'X':435435- flags |= LARGE;436436- case 'x':437437- base = 16;438438- break;439439-440440- case 'd':441441- case 'i':442442- flags |= SIGN;443443- case 'u':444444- break;445445-446446- default:447447- *str++ = '%';448448- if (*fmt)449449- *str++ = *fmt;450450- else451451- --fmt;452452- continue;453453- }454454- if (qualifier == 'l') {455455- num = va_arg(args, unsigned long);456456- if (flags & SIGN)457457- num = (signed long) num;458458- } else if (qualifier == 'Z') {459459- num = va_arg(args, size_t);460460- } else if (qualifier == 'h') {461461- num = (unsigned short) va_arg(args, int);462462- if (flags & SIGN)463463- num = (signed short) num;464464- } else {465465- num = va_arg(args, unsigned int);466466- if (flags & SIGN)467467- num = (signed int) num;468468- }469469- str = number(str, num, base, field_width, precision, flags);470470- }471471- *str = '\0';472472- return str-buf;473473-}474474-475475-int sprintf(char * buf, const char *fmt, ...)476476-{477477- va_list args;478478- int i;479479-480480- va_start(args, fmt);481481- i=vsprintf(buf,fmt,args);482482- va_end(args);483483- return i;484484-}485485-486486-static char sprint_buf[1024];487487-488488-int489489-printf(const char *fmt, ...)490490-{491491- va_list args;492492- int n;493493-494494- va_start(args, fmt);495495- n = vsprintf(sprint_buf, fmt, args);496496- va_end(args);497497- write(stdout, sprint_buf, n);498498- return n;155155+ ret = call_prom_ret("call-method", 5, 2, &result, "claim", memory,156156+ align, size, virt);157157+ if (ret != 0 || result == -1)158158+ return (void *) -1;159159+ ret = call_prom_ret("call-method", 5, 2, &result, "claim", chosen_mmu,160160+ align, size, virt);161161+ /* 0x12 == coherent + read/write */162162+ ret = call_prom("call-method", 6, 1, "map", chosen_mmu,163163+ 0x12, size, virt, virt);164164+ return (void *) virt;499165}
+27-11
arch/powerpc/boot/prom.h
···11#ifndef _PPC_BOOT_PROM_H_22#define _PPC_BOOT_PROM_H_3344-extern int (*prom) (void *);55-extern void *chosen_handle;44+typedef void *phandle;55+typedef void *ihandle;6677-extern void *stdin;88-extern void *stdout;99-extern void *stderr;77+extern int (*prom) (void *);88+extern phandle chosen_handle;99+extern ihandle stdout;1010+1111+int call_prom(const char *service, int nargs, int nret, ...);1212+int call_prom_ret(const char *service, int nargs, int nret,1313+ unsigned int *rets, ...);10141115extern int write(void *handle, void *ptr, int nb);1212-extern int read(void *handle, void *ptr, int nb);1313-extern void exit(void);1414-extern void pause(void);1515-extern void *finddevice(const char *);1616-extern void *claim(unsigned long virt, unsigned long size, unsigned long align);1717-extern int getprop(void *phandle, const char *name, void *buf, int buflen);1616+extern void *claim(unsigned long virt, unsigned long size, unsigned long aln);1717+1818+static inline void exit(void)1919+{2020+ call_prom("exit", 0, 0);2121+}2222+2323+static inline phandle finddevice(const char *name)2424+{2525+ return (phandle) call_prom("finddevice", 1, 1, name);2626+}2727+2828+static inline int getprop(void *phandle, const char *name,2929+ void *buf, int buflen)3030+{3131+ return call_prom("getprop", 4, 1, phandle, name, buf, buflen);3232+}3333+1834#endif /* _PPC_BOOT_PROM_H_ */
+243
arch/powerpc/boot/rs6000.h
···11+/* IBM RS/6000 "XCOFF" file definitions for BFD.22+ Copyright (C) 1990, 1991 Free Software Foundation, Inc.33+ FIXME: Can someone provide a transliteration of this name into ASCII?44+ Using the following chars caused a compiler warning on HIUX (so I replaced55+ them with octal escapes), and isn't useful without an understanding of what66+ character set it is.77+ Written by Mimi Ph\373\364ng-Th\345o V\365 of IBM88+ and John Gilmore of Cygnus Support. */99+1010+/********************** FILE HEADER **********************/1111+1212+struct external_filehdr {1313+ char f_magic[2]; /* magic number */1414+ char f_nscns[2]; /* number of sections */1515+ char f_timdat[4]; /* time & date stamp */1616+ char f_symptr[4]; /* file pointer to symtab */1717+ char f_nsyms[4]; /* number of symtab entries */1818+ char f_opthdr[2]; /* sizeof(optional hdr) */1919+ char f_flags[2]; /* flags */2020+};2121+2222+ /* IBM RS/6000 */2323+#define U802WRMAGIC 0730 /* writeable text segments **chh** */2424+#define U802ROMAGIC 0735 /* readonly sharable text segments */2525+#define U802TOCMAGIC 0737 /* readonly text segments and TOC */2626+2727+#define BADMAG(x) \2828+ ((x).f_magic != U802ROMAGIC && (x).f_magic != U802WRMAGIC && \2929+ (x).f_magic != U802TOCMAGIC)3030+3131+#define FILHDR struct external_filehdr3232+#define FILHSZ 203333+3434+3535+/********************** AOUT "OPTIONAL HEADER" **********************/3636+3737+3838+typedef struct3939+{4040+ unsigned char magic[2]; /* type of file */4141+ unsigned char vstamp[2]; /* version stamp */4242+ unsigned char tsize[4]; /* text size in bytes, padded to FW bdry */4343+ unsigned char dsize[4]; /* initialized data " " */4444+ unsigned char bsize[4]; /* uninitialized data " " */4545+ unsigned char entry[4]; /* entry pt. */4646+ unsigned char text_start[4]; /* base of text used for this file */4747+ unsigned char data_start[4]; /* base of data used for this file */4848+ unsigned char o_toc[4]; /* address of TOC */4949+ unsigned char o_snentry[2]; /* section number of entry point */5050+ unsigned char o_sntext[2]; /* section number of .text section */5151+ unsigned char o_sndata[2]; /* section number of .data section */5252+ unsigned char o_sntoc[2]; /* section number of TOC */5353+ unsigned char o_snloader[2]; /* section number of .loader section */5454+ unsigned char o_snbss[2]; /* section number of .bss section */5555+ unsigned char o_algntext[2]; /* .text alignment */5656+ unsigned char o_algndata[2]; /* .data alignment */5757+ unsigned char o_modtype[2]; /* module type (??) */5858+ unsigned char o_cputype[2]; /* cpu type */5959+ unsigned char o_maxstack[4]; /* max stack size (??) */6060+ unsigned char o_maxdata[4]; /* max data size (??) */6161+ unsigned char o_resv2[12]; /* reserved */6262+}6363+AOUTHDR;6464+6565+#define AOUTSZ 726666+#define SMALL_AOUTSZ (28)6767+#define AOUTHDRSZ 726868+6969+#define RS6K_AOUTHDR_OMAGIC 0x0107 /* old: text & data writeable */7070+#define RS6K_AOUTHDR_NMAGIC 0x0108 /* new: text r/o, data r/w */7171+#define RS6K_AOUTHDR_ZMAGIC 0x010B /* paged: text r/o, both page-aligned */7272+7373+7474+/********************** SECTION HEADER **********************/7575+7676+7777+struct external_scnhdr {7878+ char s_name[8]; /* section name */7979+ char s_paddr[4]; /* physical address, aliased s_nlib */8080+ char s_vaddr[4]; /* virtual address */8181+ char s_size[4]; /* section size */8282+ char s_scnptr[4]; /* file ptr to raw data for section */8383+ char s_relptr[4]; /* file ptr to relocation */8484+ char s_lnnoptr[4]; /* file ptr to line numbers */8585+ char s_nreloc[2]; /* number of relocation entries */8686+ char s_nlnno[2]; /* number of line number entries*/8787+ char s_flags[4]; /* flags */8888+};8989+9090+/*9191+ * names of "special" sections9292+ */9393+#define _TEXT ".text"9494+#define _DATA ".data"9595+#define _BSS ".bss"9696+#define _PAD ".pad"9797+#define _LOADER ".loader"9898+9999+#define SCNHDR struct external_scnhdr100100+#define SCNHSZ 40101101+102102+/* XCOFF uses a special .loader section with type STYP_LOADER. */103103+#define STYP_LOADER 0x1000104104+105105+/* XCOFF uses a special .debug section with type STYP_DEBUG. */106106+#define STYP_DEBUG 0x2000107107+108108+/* XCOFF handles line number or relocation overflow by creating109109+ another section header with STYP_OVRFLO set. */110110+#define STYP_OVRFLO 0x8000111111+112112+/********************** LINE NUMBERS **********************/113113+114114+/* 1 line number entry for every "breakpointable" source line in a section.115115+ * Line numbers are grouped on a per function basis; first entry in a function116116+ * grouping will have l_lnno = 0 and in place of physical address will be the117117+ * symbol table index of the function name.118118+ */119119+struct external_lineno {120120+ union {121121+ char l_symndx[4]; /* function name symbol index, iff l_lnno == 0*/122122+ char l_paddr[4]; /* (physical) address of line number */123123+ } l_addr;124124+ char l_lnno[2]; /* line number */125125+};126126+127127+128128+#define LINENO struct external_lineno129129+#define LINESZ 6130130+131131+132132+/********************** SYMBOLS **********************/133133+134134+#define E_SYMNMLEN 8 /* # characters in a symbol name */135135+#define E_FILNMLEN 14 /* # characters in a file name */136136+#define E_DIMNUM 4 /* # array dimensions in auxiliary entry */137137+138138+struct external_syment139139+{140140+ union {141141+ char e_name[E_SYMNMLEN];142142+ struct {143143+ char e_zeroes[4];144144+ char e_offset[4];145145+ } e;146146+ } e;147147+ char e_value[4];148148+ char e_scnum[2];149149+ char e_type[2];150150+ char e_sclass[1];151151+ char e_numaux[1];152152+};153153+154154+155155+156156+#define N_BTMASK (017)157157+#define N_TMASK (060)158158+#define N_BTSHFT (4)159159+#define N_TSHIFT (2)160160+161161+162162+union external_auxent {163163+ struct {164164+ char x_tagndx[4]; /* str, un, or enum tag indx */165165+ union {166166+ struct {167167+ char x_lnno[2]; /* declaration line number */168168+ char x_size[2]; /* str/union/array size */169169+ } x_lnsz;170170+ char x_fsize[4]; /* size of function */171171+ } x_misc;172172+ union {173173+ struct { /* if ISFCN, tag, or .bb */174174+ char x_lnnoptr[4]; /* ptr to fcn line # */175175+ char x_endndx[4]; /* entry ndx past block end */176176+ } x_fcn;177177+ struct { /* if ISARY, up to 4 dimen. */178178+ char x_dimen[E_DIMNUM][2];179179+ } x_ary;180180+ } x_fcnary;181181+ char x_tvndx[2]; /* tv index */182182+ } x_sym;183183+184184+ union {185185+ char x_fname[E_FILNMLEN];186186+ struct {187187+ char x_zeroes[4];188188+ char x_offset[4];189189+ } x_n;190190+ } x_file;191191+192192+ struct {193193+ char x_scnlen[4]; /* section length */194194+ char x_nreloc[2]; /* # relocation entries */195195+ char x_nlinno[2]; /* # line numbers */196196+ } x_scn;197197+198198+ struct {199199+ char x_tvfill[4]; /* tv fill value */200200+ char x_tvlen[2]; /* length of .tv */201201+ char x_tvran[2][2]; /* tv range */202202+ } x_tv; /* info about .tv section (in auxent of symbol .tv)) */203203+204204+ struct {205205+ unsigned char x_scnlen[4];206206+ unsigned char x_parmhash[4];207207+ unsigned char x_snhash[2];208208+ unsigned char x_smtyp[1];209209+ unsigned char x_smclas[1];210210+ unsigned char x_stab[4];211211+ unsigned char x_snstab[2];212212+ } x_csect;213213+214214+};215215+216216+#define SYMENT struct external_syment217217+#define SYMESZ 18218218+#define AUXENT union external_auxent219219+#define AUXESZ 18220220+#define DBXMASK 0x80 /* for dbx storage mask */221221+#define SYMNAME_IN_DEBUG(symptr) ((symptr)->n_sclass & DBXMASK)222222+223223+224224+225225+/********************** RELOCATION DIRECTIVES **********************/226226+227227+228228+struct external_reloc {229229+ char r_vaddr[4];230230+ char r_symndx[4];231231+ char r_size[1];232232+ char r_type[1];233233+};234234+235235+236236+#define RELOC struct external_reloc237237+#define RELSZ 10238238+239239+#define DEFAULT_DATA_SECTION_ALIGNMENT 4240240+#define DEFAULT_BSS_SECTION_ALIGNMENT 4241241+#define DEFAULT_TEXT_SECTION_ALIGNMENT 4242242+/* For new sections we havn't heard of before */243243+#define DEFAULT_SECTION_ALIGNMENT 4
+325
arch/powerpc/boot/stdio.c
···11+/*22+ * Copyright (C) Paul Mackerras 1997.33+ *44+ * This program is free software; you can redistribute it and/or55+ * modify it under the terms of the GNU General Public License66+ * as published by the Free Software Foundation; either version77+ * 2 of the License, or (at your option) any later version.88+ */99+#include <stdarg.h>1010+#include <stddef.h>1111+#include "string.h"1212+#include "stdio.h"1313+#include "prom.h"1414+1515+size_t strnlen(const char * s, size_t count)1616+{1717+ const char *sc;1818+1919+ for (sc = s; count-- && *sc != '\0'; ++sc)2020+ /* nothing */;2121+ return sc - s;2222+}2323+2424+extern unsigned int __div64_32(unsigned long long *dividend,2525+ unsigned int divisor);2626+2727+/* The unnecessary pointer compare is there2828+ * to check for type safety (n must be 64bit)2929+ */3030+# define do_div(n,base) ({ \3131+ unsigned int __base = (base); \3232+ unsigned int __rem; \3333+ (void)(((typeof((n)) *)0) == ((unsigned long long *)0)); \3434+ if (((n) >> 32) == 0) { \3535+ __rem = (unsigned int)(n) % __base; \3636+ (n) = (unsigned int)(n) / __base; \3737+ } else \3838+ __rem = __div64_32(&(n), __base); \3939+ __rem; \4040+ })4141+4242+static int skip_atoi(const char **s)4343+{4444+ int i, c;4545+4646+ for (i = 0; '0' <= (c = **s) && c <= '9'; ++*s)4747+ i = i*10 + c - '0';4848+ return i;4949+}5050+5151+#define ZEROPAD 1 /* pad with zero */5252+#define SIGN 2 /* unsigned/signed long */5353+#define PLUS 4 /* show plus */5454+#define SPACE 8 /* space if plus */5555+#define LEFT 16 /* left justified */5656+#define SPECIAL 32 /* 0x */5757+#define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */5858+5959+static char * number(char * str, unsigned long long num, int base, int size, int precision, int type)6060+{6161+ char c,sign,tmp[66];6262+ const char *digits="0123456789abcdefghijklmnopqrstuvwxyz";6363+ int i;6464+6565+ if (type & LARGE)6666+ digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";6767+ if (type & LEFT)6868+ type &= ~ZEROPAD;6969+ if (base < 2 || base > 36)7070+ return 0;7171+ c = (type & ZEROPAD) ? '0' : ' ';7272+ sign = 0;7373+ if (type & SIGN) {7474+ if ((signed long long)num < 0) {7575+ sign = '-';7676+ num = - (signed long long)num;7777+ size--;7878+ } else if (type & PLUS) {7979+ sign = '+';8080+ size--;8181+ } else if (type & SPACE) {8282+ sign = ' ';8383+ size--;8484+ }8585+ }8686+ if (type & SPECIAL) {8787+ if (base == 16)8888+ size -= 2;8989+ else if (base == 8)9090+ size--;9191+ }9292+ i = 0;9393+ if (num == 0)9494+ tmp[i++]='0';9595+ else while (num != 0) {9696+ tmp[i++] = digits[do_div(num, base)];9797+ }9898+ if (i > precision)9999+ precision = i;100100+ size -= precision;101101+ if (!(type&(ZEROPAD+LEFT)))102102+ while(size-->0)103103+ *str++ = ' ';104104+ if (sign)105105+ *str++ = sign;106106+ if (type & SPECIAL) {107107+ if (base==8)108108+ *str++ = '0';109109+ else if (base==16) {110110+ *str++ = '0';111111+ *str++ = digits[33];112112+ }113113+ }114114+ if (!(type & LEFT))115115+ while (size-- > 0)116116+ *str++ = c;117117+ while (i < precision--)118118+ *str++ = '0';119119+ while (i-- > 0)120120+ *str++ = tmp[i];121121+ while (size-- > 0)122122+ *str++ = ' ';123123+ return str;124124+}125125+126126+int vsprintf(char *buf, const char *fmt, va_list args)127127+{128128+ int len;129129+ unsigned long long num;130130+ int i, base;131131+ char * str;132132+ const char *s;133133+134134+ int flags; /* flags to number() */135135+136136+ int field_width; /* width of output field */137137+ int precision; /* min. # of digits for integers; max138138+ number of chars for from string */139139+ int qualifier; /* 'h', 'l', or 'L' for integer fields */140140+ /* 'z' support added 23/7/1999 S.H. */141141+ /* 'z' changed to 'Z' --davidm 1/25/99 */142142+143143+144144+ for (str=buf ; *fmt ; ++fmt) {145145+ if (*fmt != '%') {146146+ *str++ = *fmt;147147+ continue;148148+ }149149+150150+ /* process flags */151151+ flags = 0;152152+ repeat:153153+ ++fmt; /* this also skips first '%' */154154+ switch (*fmt) {155155+ case '-': flags |= LEFT; goto repeat;156156+ case '+': flags |= PLUS; goto repeat;157157+ case ' ': flags |= SPACE; goto repeat;158158+ case '#': flags |= SPECIAL; goto repeat;159159+ case '0': flags |= ZEROPAD; goto repeat;160160+ }161161+162162+ /* get field width */163163+ field_width = -1;164164+ if ('0' <= *fmt && *fmt <= '9')165165+ field_width = skip_atoi(&fmt);166166+ else if (*fmt == '*') {167167+ ++fmt;168168+ /* it's the next argument */169169+ field_width = va_arg(args, int);170170+ if (field_width < 0) {171171+ field_width = -field_width;172172+ flags |= LEFT;173173+ }174174+ }175175+176176+ /* get the precision */177177+ precision = -1;178178+ if (*fmt == '.') {179179+ ++fmt; 180180+ if ('0' <= *fmt && *fmt <= '9')181181+ precision = skip_atoi(&fmt);182182+ else if (*fmt == '*') {183183+ ++fmt;184184+ /* it's the next argument */185185+ precision = va_arg(args, int);186186+ }187187+ if (precision < 0)188188+ precision = 0;189189+ }190190+191191+ /* get the conversion qualifier */192192+ qualifier = -1;193193+ if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' || *fmt =='Z') {194194+ qualifier = *fmt;195195+ ++fmt;196196+ }197197+198198+ /* default base */199199+ base = 10;200200+201201+ switch (*fmt) {202202+ case 'c':203203+ if (!(flags & LEFT))204204+ while (--field_width > 0)205205+ *str++ = ' ';206206+ *str++ = (unsigned char) va_arg(args, int);207207+ while (--field_width > 0)208208+ *str++ = ' ';209209+ continue;210210+211211+ case 's':212212+ s = va_arg(args, char *);213213+ if (!s)214214+ s = "<NULL>";215215+216216+ len = strnlen(s, precision);217217+218218+ if (!(flags & LEFT))219219+ while (len < field_width--)220220+ *str++ = ' ';221221+ for (i = 0; i < len; ++i)222222+ *str++ = *s++;223223+ while (len < field_width--)224224+ *str++ = ' ';225225+ continue;226226+227227+ case 'p':228228+ if (field_width == -1) {229229+ field_width = 2*sizeof(void *);230230+ flags |= ZEROPAD;231231+ }232232+ str = number(str,233233+ (unsigned long) va_arg(args, void *), 16,234234+ field_width, precision, flags);235235+ continue;236236+237237+238238+ case 'n':239239+ if (qualifier == 'l') {240240+ long * ip = va_arg(args, long *);241241+ *ip = (str - buf);242242+ } else if (qualifier == 'Z') {243243+ size_t * ip = va_arg(args, size_t *);244244+ *ip = (str - buf);245245+ } else {246246+ int * ip = va_arg(args, int *);247247+ *ip = (str - buf);248248+ }249249+ continue;250250+251251+ case '%':252252+ *str++ = '%';253253+ continue;254254+255255+ /* integer number formats - set up the flags and "break" */256256+ case 'o':257257+ base = 8;258258+ break;259259+260260+ case 'X':261261+ flags |= LARGE;262262+ case 'x':263263+ base = 16;264264+ break;265265+266266+ case 'd':267267+ case 'i':268268+ flags |= SIGN;269269+ case 'u':270270+ break;271271+272272+ default:273273+ *str++ = '%';274274+ if (*fmt)275275+ *str++ = *fmt;276276+ else277277+ --fmt;278278+ continue;279279+ }280280+ if (qualifier == 'l') {281281+ num = va_arg(args, unsigned long);282282+ if (flags & SIGN)283283+ num = (signed long) num;284284+ } else if (qualifier == 'Z') {285285+ num = va_arg(args, size_t);286286+ } else if (qualifier == 'h') {287287+ num = (unsigned short) va_arg(args, int);288288+ if (flags & SIGN)289289+ num = (signed short) num;290290+ } else {291291+ num = va_arg(args, unsigned int);292292+ if (flags & SIGN)293293+ num = (signed int) num;294294+ }295295+ str = number(str, num, base, field_width, precision, flags);296296+ }297297+ *str = '\0';298298+ return str-buf;299299+}300300+301301+int sprintf(char * buf, const char *fmt, ...)302302+{303303+ va_list args;304304+ int i;305305+306306+ va_start(args, fmt);307307+ i=vsprintf(buf,fmt,args);308308+ va_end(args);309309+ return i;310310+}311311+312312+static char sprint_buf[1024];313313+314314+int315315+printf(const char *fmt, ...)316316+{317317+ va_list args;318318+ int n;319319+320320+ va_start(args, fmt);321321+ n = vsprintf(sprint_buf, fmt, args);322322+ va_end(args);323323+ write(stdout, sprint_buf, n);324324+ return n;325325+}
-6
arch/powerpc/boot/stdio.h
···7788extern int vsprintf(char *buf, const char *fmt, va_list args);991010-extern int putc(int c, void *f);1111-extern int putchar(int c);1212-extern int getchar(void);1313-1414-extern int fputs(char *str, void *f);1515-1610#endif /* _PPC_BOOT_STDIO_H_ */
+17-3
arch/powerpc/boot/string.S
···107107 rlwinm. r7,r5,32-3,3,31 /* r7 = r5 >> 3 */108108 addi r6,r3,-4109109 addi r4,r4,-4110110- beq 2f /* if less than 8 bytes to do */110110+ beq 3f /* if less than 8 bytes to do */111111 andi. r0,r6,3 /* get dest word aligned */112112 mtctr r7113113 bne 5f114114+ andi. r0,r4,3 /* check src word aligned too */115115+ bne 3f1141161: lwz r7,4(r4)115117 lwzu r8,8(r4)116118 stw r7,4(r6)···134132 bdnz 4b135133 blr1361345: subfic r0,r0,4135135+ cmpw cr1,r0,r5136136+ add r7,r0,r4137137+ andi. r7,r7,3 /* will source be word-aligned too? */138138+ ble cr1,3b139139+ bne 3b /* do byte-by-byte if not */137140 mtctr r01381416: lbz r7,4(r4)139142 addi r4,r4,1···156149 rlwinm. r7,r5,32-3,3,31 /* r7 = r5 >> 3 */157150 add r6,r3,r5158151 add r4,r4,r5159159- beq 2f152152+ beq 3f160153 andi. r0,r6,3161154 mtctr r7162155 bne 5f156156+ andi. r0,r4,3157157+ bne 3f1631581: lwz r7,-4(r4)164159 lwzu r8,-8(r4)165160 stw r7,-4(r6)···180171 stbu r0,-1(r6)181172 bdnz 4b182173 blr183183-5: mtctr r0174174+5: cmpw cr1,r0,r5175175+ subf r7,r0,r4176176+ andi. r7,r7,3177177+ ble cr1,3b178178+ bne 3b179179+ mtctr r01841806: lbzu r7,-1(r4)185181 stbu r7,-1(r6)186182 bdnz 6b
···11+#22+# Automatically generated make config: don't edit33+# Linux kernel version: 2.6.15-g461d4edf-dirty44+# Fri Jan 13 11:01:47 200655+#66+# CONFIG_PPC64 is not set77+CONFIG_PPC32=y88+CONFIG_PPC_MERGE=y99+CONFIG_MMU=y1010+CONFIG_GENERIC_HARDIRQS=y1111+CONFIG_RWSEM_XCHGADD_ALGORITHM=y1212+CONFIG_GENERIC_CALIBRATE_DELAY=y1313+CONFIG_PPC=y1414+CONFIG_EARLY_PRINTK=y1515+CONFIG_GENERIC_NVRAM=y1616+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y1717+CONFIG_ARCH_MAY_HAVE_PC_FDC=y1818+CONFIG_PPC_OF=y1919+CONFIG_PPC_UDBG_16550=y2020+# CONFIG_GENERIC_TBSYNC is not set2121+CONFIG_DEFAULT_UIMAGE=y2222+2323+#2424+# Processor support2525+#2626+# CONFIG_CLASSIC32 is not set2727+# CONFIG_PPC_52xx is not set2828+# CONFIG_PPC_82xx is not set2929+CONFIG_PPC_83xx=y3030+# CONFIG_40x is not set3131+# CONFIG_44x is not set3232+# CONFIG_8xx is not set3333+# CONFIG_E200 is not set3434+# CONFIG_E500 is not set3535+CONFIG_6xx=y3636+CONFIG_83xx=y3737+CONFIG_PPC_FPU=y3838+CONFIG_PPC_STD_MMU=y3939+CONFIG_PPC_STD_MMU_32=y4040+# CONFIG_SMP is not set4141+4242+#4343+# Code maturity level options4444+#4545+CONFIG_EXPERIMENTAL=y4646+CONFIG_CLEAN_COMPILE=y4747+CONFIG_BROKEN_ON_SMP=y4848+CONFIG_INIT_ENV_ARG_LIMIT=324949+5050+#5151+# General setup5252+#5353+CONFIG_LOCALVERSION=""5454+CONFIG_LOCALVERSION_AUTO=y5555+CONFIG_SWAP=y5656+CONFIG_SYSVIPC=y5757+# CONFIG_POSIX_MQUEUE is not set5858+# CONFIG_BSD_PROCESS_ACCT is not set5959+CONFIG_SYSCTL=y6060+# CONFIG_AUDIT is not set6161+# CONFIG_IKCONFIG is not set6262+CONFIG_INITRAMFS_SOURCE=""6363+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set6464+CONFIG_EMBEDDED=y6565+# CONFIG_KALLSYMS is not set6666+CONFIG_HOTPLUG=y6767+CONFIG_PRINTK=y6868+CONFIG_BUG=y6969+CONFIG_ELF_CORE=y7070+CONFIG_BASE_FULL=y7171+CONFIG_FUTEX=y7272+# CONFIG_EPOLL is not set7373+CONFIG_SHMEM=y7474+CONFIG_CC_ALIGN_FUNCTIONS=07575+CONFIG_CC_ALIGN_LABELS=07676+CONFIG_CC_ALIGN_LOOPS=07777+CONFIG_CC_ALIGN_JUMPS=07878+CONFIG_SLAB=y7979+# CONFIG_TINY_SHMEM is not set8080+CONFIG_BASE_SMALL=08181+# CONFIG_SLOB is not set8282+8383+#8484+# Loadable module support8585+#8686+CONFIG_MODULES=y8787+CONFIG_MODULE_UNLOAD=y8888+# CONFIG_MODULE_FORCE_UNLOAD is not set8989+CONFIG_OBSOLETE_MODPARM=y9090+# CONFIG_MODVERSIONS is not set9191+# CONFIG_MODULE_SRCVERSION_ALL is not set9292+# CONFIG_KMOD is not set9393+9494+#9595+# Block layer9696+#9797+# CONFIG_LBD is not set9898+9999+#100100+# IO Schedulers101101+#102102+CONFIG_IOSCHED_NOOP=y103103+CONFIG_IOSCHED_AS=y104104+CONFIG_IOSCHED_DEADLINE=y105105+CONFIG_IOSCHED_CFQ=y106106+CONFIG_DEFAULT_AS=y107107+# CONFIG_DEFAULT_DEADLINE is not set108108+# CONFIG_DEFAULT_CFQ is not set109109+# CONFIG_DEFAULT_NOOP is not set110110+CONFIG_DEFAULT_IOSCHED="anticipatory"111111+CONFIG_PPC_GEN550=y112112+# CONFIG_WANT_EARLY_SERIAL is not set113113+114114+#115115+# Platform support116116+#117117+CONFIG_MPC834x_SYS=y118118+CONFIG_MPC834x=y119119+120120+#121121+# Kernel options122122+#123123+# CONFIG_HIGHMEM is not set124124+# CONFIG_HZ_100 is not set125125+CONFIG_HZ_250=y126126+# CONFIG_HZ_1000 is not set127127+CONFIG_HZ=250128128+CONFIG_PREEMPT_NONE=y129129+# CONFIG_PREEMPT_VOLUNTARY is not set130130+# CONFIG_PREEMPT is not set131131+CONFIG_BINFMT_ELF=y132132+# CONFIG_BINFMT_MISC is not set133133+CONFIG_ARCH_FLATMEM_ENABLE=y134134+CONFIG_SELECT_MEMORY_MODEL=y135135+CONFIG_FLATMEM_MANUAL=y136136+# CONFIG_DISCONTIGMEM_MANUAL is not set137137+# CONFIG_SPARSEMEM_MANUAL is not set138138+CONFIG_FLATMEM=y139139+CONFIG_FLAT_NODE_MEM_MAP=y140140+# CONFIG_SPARSEMEM_STATIC is not set141141+CONFIG_SPLIT_PTLOCK_CPUS=4142142+CONFIG_PROC_DEVICETREE=y143143+# CONFIG_CMDLINE_BOOL is not set144144+# CONFIG_PM is not set145145+# CONFIG_SOFTWARE_SUSPEND is not set146146+CONFIG_SECCOMP=y147147+CONFIG_ISA_DMA_API=y148148+149149+#150150+# Bus options151151+#152152+CONFIG_GENERIC_ISA_DMA=y153153+# CONFIG_PPC_I8259 is not set154154+CONFIG_PPC_INDIRECT_PCI=y155155+CONFIG_FSL_SOC=y156156+CONFIG_PCI=y157157+CONFIG_PCI_DOMAINS=y158158+# CONFIG_PCI_LEGACY_PROC is not set159159+160160+#161161+# PCCARD (PCMCIA/CardBus) support162162+#163163+# CONFIG_PCCARD is not set164164+165165+#166166+# PCI Hotplug Support167167+#168168+# CONFIG_HOTPLUG_PCI is not set169169+170170+#171171+# Advanced setup172172+#173173+# CONFIG_ADVANCED_OPTIONS is not set174174+175175+#176176+# Default settings for advanced configuration options are used177177+#178178+CONFIG_HIGHMEM_START=0xfe000000179179+CONFIG_LOWMEM_SIZE=0x30000000180180+CONFIG_KERNEL_START=0xc0000000181181+CONFIG_TASK_SIZE=0x80000000182182+CONFIG_BOOT_LOAD=0x00800000183183+184184+#185185+# Networking186186+#187187+CONFIG_NET=y188188+189189+#190190+# Networking options191191+#192192+CONFIG_PACKET=y193193+# CONFIG_PACKET_MMAP is not set194194+CONFIG_UNIX=y195195+# CONFIG_NET_KEY is not set196196+CONFIG_INET=y197197+CONFIG_IP_MULTICAST=y198198+# CONFIG_IP_ADVANCED_ROUTER is not set199199+CONFIG_IP_FIB_HASH=y200200+CONFIG_IP_PNP=y201201+CONFIG_IP_PNP_DHCP=y202202+CONFIG_IP_PNP_BOOTP=y203203+# CONFIG_IP_PNP_RARP is not set204204+# CONFIG_NET_IPIP is not set205205+# CONFIG_NET_IPGRE is not set206206+# CONFIG_IP_MROUTE is not set207207+# CONFIG_ARPD is not set208208+CONFIG_SYN_COOKIES=y209209+# CONFIG_INET_AH is not set210210+# CONFIG_INET_ESP is not set211211+# CONFIG_INET_IPCOMP is not set212212+# CONFIG_INET_TUNNEL is not set213213+CONFIG_INET_DIAG=y214214+CONFIG_INET_TCP_DIAG=y215215+# CONFIG_TCP_CONG_ADVANCED is not set216216+CONFIG_TCP_CONG_BIC=y217217+# CONFIG_IPV6 is not set218218+# CONFIG_NETFILTER is not set219219+220220+#221221+# DCCP Configuration (EXPERIMENTAL)222222+#223223+# CONFIG_IP_DCCP is not set224224+225225+#226226+# SCTP Configuration (EXPERIMENTAL)227227+#228228+# CONFIG_IP_SCTP is not set229229+# CONFIG_ATM is not set230230+# CONFIG_BRIDGE is not set231231+# CONFIG_VLAN_8021Q is not set232232+# CONFIG_DECNET is not set233233+# CONFIG_LLC2 is not set234234+# CONFIG_IPX is not set235235+# CONFIG_ATALK is not set236236+# CONFIG_X25 is not set237237+# CONFIG_LAPB is not set238238+# CONFIG_NET_DIVERT is not set239239+# CONFIG_ECONET is not set240240+# CONFIG_WAN_ROUTER is not set241241+242242+#243243+# QoS and/or fair queueing244244+#245245+# CONFIG_NET_SCHED is not set246246+247247+#248248+# Network testing249249+#250250+# CONFIG_NET_PKTGEN is not set251251+# CONFIG_HAMRADIO is not set252252+# CONFIG_IRDA is not set253253+# CONFIG_BT is not set254254+# CONFIG_IEEE80211 is not set255255+256256+#257257+# Device Drivers258258+#259259+260260+#261261+# Generic Driver Options262262+#263263+CONFIG_STANDALONE=y264264+CONFIG_PREVENT_FIRMWARE_BUILD=y265265+# CONFIG_FW_LOADER is not set266266+267267+#268268+# Connector - unified userspace <-> kernelspace linker269269+#270270+# CONFIG_CONNECTOR is not set271271+272272+#273273+# Memory Technology Devices (MTD)274274+#275275+# CONFIG_MTD is not set276276+277277+#278278+# Parallel port support279279+#280280+# CONFIG_PARPORT is not set281281+282282+#283283+# Plug and Play support284284+#285285+286286+#287287+# Block devices288288+#289289+# CONFIG_BLK_DEV_FD is not set290290+# CONFIG_BLK_CPQ_DA is not set291291+# CONFIG_BLK_CPQ_CISS_DA is not set292292+# CONFIG_BLK_DEV_DAC960 is not set293293+# CONFIG_BLK_DEV_UMEM is not set294294+# CONFIG_BLK_DEV_COW_COMMON is not set295295+CONFIG_BLK_DEV_LOOP=y296296+# CONFIG_BLK_DEV_CRYPTOLOOP is not set297297+# CONFIG_BLK_DEV_NBD is not set298298+# CONFIG_BLK_DEV_SX8 is not set299299+CONFIG_BLK_DEV_RAM=y300300+CONFIG_BLK_DEV_RAM_COUNT=16301301+CONFIG_BLK_DEV_RAM_SIZE=32768302302+CONFIG_BLK_DEV_INITRD=y303303+# CONFIG_CDROM_PKTCDVD is not set304304+# CONFIG_ATA_OVER_ETH is not set305305+306306+#307307+# ATA/ATAPI/MFM/RLL support308308+#309309+# CONFIG_IDE is not set310310+311311+#312312+# SCSI device support313313+#314314+# CONFIG_RAID_ATTRS is not set315315+# CONFIG_SCSI is not set316316+317317+#318318+# Multi-device support (RAID and LVM)319319+#320320+# CONFIG_MD is not set321321+322322+#323323+# Fusion MPT device support324324+#325325+# CONFIG_FUSION is not set326326+327327+#328328+# IEEE 1394 (FireWire) support329329+#330330+# CONFIG_IEEE1394 is not set331331+332332+#333333+# I2O device support334334+#335335+# CONFIG_I2O is not set336336+337337+#338338+# Macintosh device drivers339339+#340340+# CONFIG_WINDFARM is not set341341+342342+#343343+# Network device support344344+#345345+CONFIG_NETDEVICES=y346346+# CONFIG_DUMMY is not set347347+# CONFIG_BONDING is not set348348+# CONFIG_EQUALIZER is not set349349+# CONFIG_TUN is not set350350+351351+#352352+# ARCnet devices353353+#354354+# CONFIG_ARCNET is not set355355+356356+#357357+# PHY device support358358+#359359+CONFIG_PHYLIB=y360360+361361+#362362+# MII PHY device drivers363363+#364364+CONFIG_MARVELL_PHY=y365365+# CONFIG_DAVICOM_PHY is not set366366+# CONFIG_QSEMI_PHY is not set367367+# CONFIG_LXT_PHY is not set368368+# CONFIG_CICADA_PHY is not set369369+370370+#371371+# Ethernet (10 or 100Mbit)372372+#373373+CONFIG_NET_ETHERNET=y374374+CONFIG_MII=y375375+# CONFIG_HAPPYMEAL is not set376376+# CONFIG_SUNGEM is not set377377+# CONFIG_CASSINI is not set378378+# CONFIG_NET_VENDOR_3COM is not set379379+380380+#381381+# Tulip family network device support382382+#383383+# CONFIG_NET_TULIP is not set384384+# CONFIG_HP100 is not set385385+CONFIG_NET_PCI=y386386+# CONFIG_PCNET32 is not set387387+# CONFIG_AMD8111_ETH is not set388388+# CONFIG_ADAPTEC_STARFIRE is not set389389+# CONFIG_B44 is not set390390+# CONFIG_FORCEDETH is not set391391+# CONFIG_DGRS is not set392392+# CONFIG_EEPRO100 is not set393393+CONFIG_E100=y394394+# CONFIG_FEALNX is not set395395+# CONFIG_NATSEMI is not set396396+# CONFIG_NE2K_PCI is not set397397+# CONFIG_8139CP is not set398398+# CONFIG_8139TOO is not set399399+# CONFIG_SIS900 is not set400400+# CONFIG_EPIC100 is not set401401+# CONFIG_SUNDANCE is not set402402+# CONFIG_TLAN is not set403403+# CONFIG_VIA_RHINE is not set404404+405405+#406406+# Ethernet (1000 Mbit)407407+#408408+# CONFIG_ACENIC is not set409409+# CONFIG_DL2K is not set410410+# CONFIG_E1000 is not set411411+# CONFIG_NS83820 is not set412412+# CONFIG_HAMACHI is not set413413+# CONFIG_YELLOWFIN is not set414414+# CONFIG_R8169 is not set415415+# CONFIG_SIS190 is not set416416+# CONFIG_SKGE is not set417417+# CONFIG_SKY2 is not set418418+# CONFIG_SK98LIN is not set419419+# CONFIG_VIA_VELOCITY is not set420420+# CONFIG_TIGON3 is not set421421+# CONFIG_BNX2 is not set422422+CONFIG_GIANFAR=y423423+# CONFIG_GFAR_NAPI is not set424424+425425+#426426+# Ethernet (10000 Mbit)427427+#428428+# CONFIG_CHELSIO_T1 is not set429429+# CONFIG_IXGB is not set430430+# CONFIG_S2IO is not set431431+432432+#433433+# Token Ring devices434434+#435435+# CONFIG_TR is not set436436+437437+#438438+# Wireless LAN (non-hamradio)439439+#440440+# CONFIG_NET_RADIO is not set441441+442442+#443443+# Wan interfaces444444+#445445+# CONFIG_WAN is not set446446+# CONFIG_FDDI is not set447447+# CONFIG_HIPPI is not set448448+# CONFIG_PPP is not set449449+# CONFIG_SLIP is not set450450+# CONFIG_SHAPER is not set451451+# CONFIG_NETCONSOLE is not set452452+# CONFIG_NETPOLL is not set453453+# CONFIG_NET_POLL_CONTROLLER is not set454454+455455+#456456+# ISDN subsystem457457+#458458+# CONFIG_ISDN is not set459459+460460+#461461+# Telephony Support462462+#463463+# CONFIG_PHONE is not set464464+465465+#466466+# Input device support467467+#468468+CONFIG_INPUT=y469469+470470+#471471+# Userland interfaces472472+#473473+# CONFIG_INPUT_MOUSEDEV is not set474474+# CONFIG_INPUT_JOYDEV is not set475475+# CONFIG_INPUT_TSDEV is not set476476+# CONFIG_INPUT_EVDEV is not set477477+# CONFIG_INPUT_EVBUG is not set478478+479479+#480480+# Input Device Drivers481481+#482482+# CONFIG_INPUT_KEYBOARD is not set483483+# CONFIG_INPUT_MOUSE is not set484484+# CONFIG_INPUT_JOYSTICK is not set485485+# CONFIG_INPUT_TOUCHSCREEN is not set486486+# CONFIG_INPUT_MISC is not set487487+488488+#489489+# Hardware I/O ports490490+#491491+# CONFIG_SERIO is not set492492+# CONFIG_GAMEPORT is not set493493+494494+#495495+# Character devices496496+#497497+# CONFIG_VT is not set498498+# CONFIG_SERIAL_NONSTANDARD is not set499499+500500+#501501+# Serial drivers502502+#503503+CONFIG_SERIAL_8250=y504504+CONFIG_SERIAL_8250_CONSOLE=y505505+CONFIG_SERIAL_8250_NR_UARTS=4506506+CONFIG_SERIAL_8250_RUNTIME_UARTS=4507507+# CONFIG_SERIAL_8250_EXTENDED is not set508508+509509+#510510+# Non-8250 serial port support511511+#512512+CONFIG_SERIAL_CORE=y513513+CONFIG_SERIAL_CORE_CONSOLE=y514514+CONFIG_UNIX98_PTYS=y515515+CONFIG_LEGACY_PTYS=y516516+CONFIG_LEGACY_PTY_COUNT=256517517+518518+#519519+# IPMI520520+#521521+# CONFIG_IPMI_HANDLER is not set522522+523523+#524524+# Watchdog Cards525525+#526526+CONFIG_WATCHDOG=y527527+# CONFIG_WATCHDOG_NOWAYOUT is not set528528+529529+#530530+# Watchdog Device Drivers531531+#532532+# CONFIG_SOFT_WATCHDOG is not set533533+CONFIG_83xx_WDT=y534534+535535+#536536+# PCI-based Watchdog Cards537537+#538538+# CONFIG_PCIPCWATCHDOG is not set539539+# CONFIG_WDTPCI is not set540540+# CONFIG_NVRAM is not set541541+CONFIG_GEN_RTC=y542542+# CONFIG_GEN_RTC_X is not set543543+# CONFIG_DTLK is not set544544+# CONFIG_R3964 is not set545545+# CONFIG_APPLICOM is not set546546+547547+#548548+# Ftape, the floppy tape device driver549549+#550550+# CONFIG_AGP is not set551551+# CONFIG_DRM is not set552552+# CONFIG_RAW_DRIVER is not set553553+554554+#555555+# TPM devices556556+#557557+# CONFIG_TCG_TPM is not set558558+# CONFIG_TELCLOCK is not set559559+560560+#561561+# I2C support562562+#563563+CONFIG_I2C=y564564+CONFIG_I2C_CHARDEV=y565565+566566+#567567+# I2C Algorithms568568+#569569+# CONFIG_I2C_ALGOBIT is not set570570+# CONFIG_I2C_ALGOPCF is not set571571+# CONFIG_I2C_ALGOPCA is not set572572+573573+#574574+# I2C Hardware Bus support575575+#576576+# CONFIG_I2C_ALI1535 is not set577577+# CONFIG_I2C_ALI1563 is not set578578+# CONFIG_I2C_ALI15X3 is not set579579+# CONFIG_I2C_AMD756 is not set580580+# CONFIG_I2C_AMD8111 is not set581581+# CONFIG_I2C_I801 is not set582582+# CONFIG_I2C_I810 is not set583583+# CONFIG_I2C_PIIX4 is not set584584+CONFIG_I2C_MPC=y585585+# CONFIG_I2C_NFORCE2 is not set586586+# CONFIG_I2C_PARPORT_LIGHT is not set587587+# CONFIG_I2C_PROSAVAGE is not set588588+# CONFIG_I2C_SAVAGE4 is not set589589+# CONFIG_SCx200_ACB is not set590590+# CONFIG_I2C_SIS5595 is not set591591+# CONFIG_I2C_SIS630 is not set592592+# CONFIG_I2C_SIS96X is not set593593+# CONFIG_I2C_STUB is not set594594+# CONFIG_I2C_VIA is not set595595+# CONFIG_I2C_VIAPRO is not set596596+# CONFIG_I2C_VOODOO3 is not set597597+# CONFIG_I2C_PCA_ISA is not set598598+599599+#600600+# Miscellaneous I2C Chip support601601+#602602+# CONFIG_SENSORS_DS1337 is not set603603+# CONFIG_SENSORS_DS1374 is not set604604+# CONFIG_SENSORS_EEPROM is not set605605+# CONFIG_SENSORS_PCF8574 is not set606606+# CONFIG_SENSORS_PCA9539 is not set607607+# CONFIG_SENSORS_PCF8591 is not set608608+# CONFIG_SENSORS_RTC8564 is not set609609+# CONFIG_SENSORS_M41T00 is not set610610+# CONFIG_SENSORS_MAX6875 is not set611611+# CONFIG_RTC_X1205_I2C is not set612612+# CONFIG_I2C_DEBUG_CORE is not set613613+# CONFIG_I2C_DEBUG_ALGO is not set614614+# CONFIG_I2C_DEBUG_BUS is not set615615+# CONFIG_I2C_DEBUG_CHIP is not set616616+617617+#618618+# Dallas's 1-wire bus619619+#620620+# CONFIG_W1 is not set621621+622622+#623623+# Hardware Monitoring support624624+#625625+CONFIG_HWMON=y626626+# CONFIG_HWMON_VID is not set627627+# CONFIG_SENSORS_ADM1021 is not set628628+# CONFIG_SENSORS_ADM1025 is not set629629+# CONFIG_SENSORS_ADM1026 is not set630630+# CONFIG_SENSORS_ADM1031 is not set631631+# CONFIG_SENSORS_ADM9240 is not set632632+# CONFIG_SENSORS_ASB100 is not set633633+# CONFIG_SENSORS_ATXP1 is not set634634+# CONFIG_SENSORS_DS1621 is not set635635+# CONFIG_SENSORS_FSCHER is not set636636+# CONFIG_SENSORS_FSCPOS is not set637637+# CONFIG_SENSORS_GL518SM is not set638638+# CONFIG_SENSORS_GL520SM is not set639639+# CONFIG_SENSORS_IT87 is not set640640+# CONFIG_SENSORS_LM63 is not set641641+# CONFIG_SENSORS_LM75 is not set642642+# CONFIG_SENSORS_LM77 is not set643643+# CONFIG_SENSORS_LM78 is not set644644+# CONFIG_SENSORS_LM80 is not set645645+# CONFIG_SENSORS_LM83 is not set646646+# CONFIG_SENSORS_LM85 is not set647647+# CONFIG_SENSORS_LM87 is not set648648+# CONFIG_SENSORS_LM90 is not set649649+# CONFIG_SENSORS_LM92 is not set650650+# CONFIG_SENSORS_MAX1619 is not set651651+# CONFIG_SENSORS_PC87360 is not set652652+# CONFIG_SENSORS_SIS5595 is not set653653+# CONFIG_SENSORS_SMSC47M1 is not set654654+# CONFIG_SENSORS_SMSC47B397 is not set655655+# CONFIG_SENSORS_VIA686A is not set656656+# CONFIG_SENSORS_VT8231 is not set657657+# CONFIG_SENSORS_W83781D is not set658658+# CONFIG_SENSORS_W83792D is not set659659+# CONFIG_SENSORS_W83L785TS is not set660660+# CONFIG_SENSORS_W83627HF is not set661661+# CONFIG_SENSORS_W83627EHF is not set662662+# CONFIG_HWMON_DEBUG_CHIP is not set663663+664664+#665665+# Misc devices666666+#667667+668668+#669669+# Multimedia Capabilities Port drivers670670+#671671+672672+#673673+# Multimedia devices674674+#675675+# CONFIG_VIDEO_DEV is not set676676+677677+#678678+# Digital Video Broadcasting Devices679679+#680680+# CONFIG_DVB is not set681681+682682+#683683+# Graphics support684684+#685685+# CONFIG_FB is not set686686+687687+#688688+# Sound689689+#690690+# CONFIG_SOUND is not set691691+692692+#693693+# USB support694694+#695695+CONFIG_USB_ARCH_HAS_HCD=y696696+CONFIG_USB_ARCH_HAS_OHCI=y697697+# CONFIG_USB is not set698698+699699+#700700+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'701701+#702702+703703+#704704+# USB Gadget Support705705+#706706+# CONFIG_USB_GADGET is not set707707+708708+#709709+# MMC/SD Card support710710+#711711+# CONFIG_MMC is not set712712+713713+#714714+# InfiniBand support715715+#716716+# CONFIG_INFINIBAND is not set717717+718718+#719719+# SN Devices720720+#721721+722722+#723723+# File systems724724+#725725+CONFIG_EXT2_FS=y726726+# CONFIG_EXT2_FS_XATTR is not set727727+# CONFIG_EXT2_FS_XIP is not set728728+CONFIG_EXT3_FS=y729729+CONFIG_EXT3_FS_XATTR=y730730+# CONFIG_EXT3_FS_POSIX_ACL is not set731731+# CONFIG_EXT3_FS_SECURITY is not set732732+CONFIG_JBD=y733733+# CONFIG_JBD_DEBUG is not set734734+CONFIG_FS_MBCACHE=y735735+# CONFIG_REISERFS_FS is not set736736+# CONFIG_JFS_FS is not set737737+# CONFIG_FS_POSIX_ACL is not set738738+# CONFIG_XFS_FS is not set739739+# CONFIG_OCFS2_FS is not set740740+# CONFIG_MINIX_FS is not set741741+# CONFIG_ROMFS_FS is not set742742+CONFIG_INOTIFY=y743743+# CONFIG_QUOTA is not set744744+CONFIG_DNOTIFY=y745745+# CONFIG_AUTOFS_FS is not set746746+# CONFIG_AUTOFS4_FS is not set747747+# CONFIG_FUSE_FS is not set748748+749749+#750750+# CD-ROM/DVD Filesystems751751+#752752+# CONFIG_ISO9660_FS is not set753753+# CONFIG_UDF_FS is not set754754+755755+#756756+# DOS/FAT/NT Filesystems757757+#758758+# CONFIG_MSDOS_FS is not set759759+# CONFIG_VFAT_FS is not set760760+# CONFIG_NTFS_FS is not set761761+762762+#763763+# Pseudo filesystems764764+#765765+CONFIG_PROC_FS=y766766+CONFIG_PROC_KCORE=y767767+CONFIG_SYSFS=y768768+CONFIG_TMPFS=y769769+# CONFIG_HUGETLB_PAGE is not set770770+CONFIG_RAMFS=y771771+# CONFIG_RELAYFS_FS is not set772772+# CONFIG_CONFIGFS_FS is not set773773+774774+#775775+# Miscellaneous filesystems776776+#777777+# CONFIG_ADFS_FS is not set778778+# CONFIG_AFFS_FS is not set779779+# CONFIG_HFS_FS is not set780780+# CONFIG_HFSPLUS_FS is not set781781+# CONFIG_BEFS_FS is not set782782+# CONFIG_BFS_FS is not set783783+# CONFIG_EFS_FS is not set784784+# CONFIG_CRAMFS is not set785785+# CONFIG_VXFS_FS is not set786786+# CONFIG_HPFS_FS is not set787787+# CONFIG_QNX4FS_FS is not set788788+# CONFIG_SYSV_FS is not set789789+# CONFIG_UFS_FS is not set790790+791791+#792792+# Network File Systems793793+#794794+CONFIG_NFS_FS=y795795+CONFIG_NFS_V3=y796796+# CONFIG_NFS_V3_ACL is not set797797+CONFIG_NFS_V4=y798798+# CONFIG_NFS_DIRECTIO is not set799799+# CONFIG_NFSD is not set800800+CONFIG_ROOT_NFS=y801801+CONFIG_LOCKD=y802802+CONFIG_LOCKD_V4=y803803+CONFIG_NFS_COMMON=y804804+CONFIG_SUNRPC=y805805+CONFIG_SUNRPC_GSS=y806806+CONFIG_RPCSEC_GSS_KRB5=y807807+# CONFIG_RPCSEC_GSS_SPKM3 is not set808808+# CONFIG_SMB_FS is not set809809+# CONFIG_CIFS is not set810810+# CONFIG_NCP_FS is not set811811+# CONFIG_CODA_FS is not set812812+# CONFIG_AFS_FS is not set813813+# CONFIG_9P_FS is not set814814+815815+#816816+# Partition Types817817+#818818+CONFIG_PARTITION_ADVANCED=y819819+# CONFIG_ACORN_PARTITION is not set820820+# CONFIG_OSF_PARTITION is not set821821+# CONFIG_AMIGA_PARTITION is not set822822+# CONFIG_ATARI_PARTITION is not set823823+# CONFIG_MAC_PARTITION is not set824824+# CONFIG_MSDOS_PARTITION is not set825825+# CONFIG_LDM_PARTITION is not set826826+# CONFIG_SGI_PARTITION is not set827827+# CONFIG_ULTRIX_PARTITION is not set828828+# CONFIG_SUN_PARTITION is not set829829+# CONFIG_EFI_PARTITION is not set830830+831831+#832832+# Native Language Support833833+#834834+# CONFIG_NLS is not set835835+836836+#837837+# Library routines838838+#839839+# CONFIG_CRC_CCITT is not set840840+# CONFIG_CRC16 is not set841841+CONFIG_CRC32=y842842+# CONFIG_LIBCRC32C is not set843843+844844+#845845+# Instrumentation Support846846+#847847+# CONFIG_PROFILING is not set848848+849849+#850850+# Kernel hacking851851+#852852+# CONFIG_PRINTK_TIME is not set853853+# CONFIG_MAGIC_SYSRQ is not set854854+# CONFIG_DEBUG_KERNEL is not set855855+CONFIG_LOG_BUF_SHIFT=14856856+# CONFIG_BOOTX_TEXT is not set857857+# CONFIG_SERIAL_TEXT_DEBUG is not set858858+# CONFIG_PPC_EARLY_DEBUG_LPAR is not set859859+# CONFIG_PPC_EARLY_DEBUG_G5 is not set860860+# CONFIG_PPC_EARLY_DEBUG_RTAS is not set861861+# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set862862+# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set863863+864864+#865865+# Security options866866+#867867+# CONFIG_KEYS is not set868868+# CONFIG_SECURITY is not set869869+870870+#871871+# Cryptographic options872872+#873873+CONFIG_CRYPTO=y874874+# CONFIG_CRYPTO_HMAC is not set875875+# CONFIG_CRYPTO_NULL is not set876876+# CONFIG_CRYPTO_MD4 is not set877877+CONFIG_CRYPTO_MD5=y878878+# CONFIG_CRYPTO_SHA1 is not set879879+# CONFIG_CRYPTO_SHA256 is not set880880+# CONFIG_CRYPTO_SHA512 is not set881881+# CONFIG_CRYPTO_WP512 is not set882882+# CONFIG_CRYPTO_TGR192 is not set883883+CONFIG_CRYPTO_DES=y884884+# CONFIG_CRYPTO_BLOWFISH is not set885885+# CONFIG_CRYPTO_TWOFISH is not set886886+# CONFIG_CRYPTO_SERPENT is not set887887+# CONFIG_CRYPTO_AES is not set888888+# CONFIG_CRYPTO_CAST5 is not set889889+# CONFIG_CRYPTO_CAST6 is not set890890+# CONFIG_CRYPTO_TEA is not set891891+# CONFIG_CRYPTO_ARC4 is not set892892+# CONFIG_CRYPTO_KHAZAD is not set893893+# CONFIG_CRYPTO_ANUBIS is not set894894+# CONFIG_CRYPTO_DEFLATE is not set895895+# CONFIG_CRYPTO_MICHAEL_MIC is not set896896+# CONFIG_CRYPTO_CRC32C is not set897897+# CONFIG_CRYPTO_TEST is not set898898+899899+#900900+# Hardware crypto devices901901+#902902+903903+#904904+# SEC2.x Options905905+#906906+CONFIG_MPC8349E_SEC2x=y907907+908908+#909909+# SEC2.x Test Options910910+#911911+CONFIG_MPC8349E_SEC2xTEST=y
···130130 mfcr r7131131132132 /* Get storage ptr */133133- LOADADDR(r5,cpu_state_storage)133133+ LOAD_REG_IMMEDIATE(r5,cpu_state_storage)134134135135 /* We only deal with 970 for now */136136 mfspr r0,SPRN_PVR···164164 /* Get storage ptr (FIXME when using anton reloc as we165165 * are running with translation disabled here166166 */167167- LOADADDR(r5,cpu_state_storage)167167+ LOAD_REG_IMMEDIATE(r5,cpu_state_storage)168168169169 /* We only deal with 970 for now */170170 mfspr r0,SPRN_PVR
···511511 cmpdi 0,r5,0512512 beq 4f513513 /* Check for pending interrupts (iSeries) */514514- ld r3,PACALPPACA+LPPACAANYINT(r13)514514+ ld r3,PACALPPACAPTR(r13)515515+ ld r3,LPPACAANYINT(r3)515516 cmpdi r3,0516517 beq+ 4f /* skip do_IRQ if no interrupts */517518···690689 std r6,PACASAVEDMSR(r13)691690692691 /* Setup our real return addr */ 693693- SET_REG_TO_LABEL(r4,.rtas_return_loc)694694- SET_REG_TO_CONST(r9,PAGE_OFFSET)695695- sub r4,r4,r9692692+ LOAD_REG_ADDR(r4,.rtas_return_loc)693693+ clrldi r4,r4,2 /* convert to realmode address */696694 mtlr r4697695698696 li r0,0···706706 sync /* disable interrupts so SRR0/1 */707707 mtmsrd r0 /* don't get trashed */708708709709- SET_REG_TO_LABEL(r4,rtas)709709+ LOAD_REG_ADDR(r4, rtas)710710 ld r5,RTASENTRY(r4) /* get the rtas->entry value */711711 ld r4,RTASBASE(r4) /* get the rtas->base value */712712···718718_STATIC(rtas_return_loc)719719 /* relocation is off at this point */720720 mfspr r4,SPRN_SPRG3 /* Get PACA */721721- SET_REG_TO_CONST(r5, PAGE_OFFSET)722722- sub r4,r4,r5 /* RELOC the PACA base pointer */721721+ clrldi r4,r4,2 /* convert to realmode address */723722724723 mfmsr r6725724 li r0,MSR_RI···727728 mtmsrd r6728729729730 ld r1,PACAR1(r4) /* Restore our SP */730730- LOADADDR(r3,.rtas_restore_regs)731731+ LOAD_REG_IMMEDIATE(r3,.rtas_restore_regs)731732 ld r4,PACASAVEDMSR(r4) /* Restore our MSR */732733733734 mtspr SPRN_SRR0,r3
+5-5
arch/powerpc/kernel/fpu.S
···3939 * to another. Instead we call giveup_fpu in switch_to.4040 */4141#ifndef CONFIG_SMP4242- LOADBASE(r3, last_task_used_math)4242+ LOAD_REG_ADDRBASE(r3, last_task_used_math)4343 toreal(r3)4444- PPC_LL r4,OFF(last_task_used_math)(r3)4444+ PPC_LL r4,ADDROFF(last_task_used_math)(r3)4545 PPC_LCMPI 0,r4,04646 beq 1f4747 toreal(r4)···7777#ifndef CONFIG_SMP7878 subi r4,r5,THREAD7979 fromreal(r4)8080- PPC_STL r4,OFF(last_task_used_math)(r3)8080+ PPC_STL r4,ADDROFF(last_task_used_math)(r3)8181#endif /* CONFIG_SMP */8282 /* restore registers and return */8383 /* we haven't used ctr or xer or lr */···1131131:114114#ifndef CONFIG_SMP115115 li r5,0116116- LOADBASE(r4,last_task_used_math)117117- PPC_STL r5,OFF(last_task_used_math)(r4)116116+ LOAD_REG_ADDRBASE(r4,last_task_used_math)117117+ PPC_STL r5,ADDROFF(last_task_used_math)(r4)118118#endif /* CONFIG_SMP */119119 blr120120
+60-52
arch/powerpc/kernel/head_64.S
···154154 bne 100b155155156156#ifdef CONFIG_HMT157157- LOADADDR(r4, .hmt_init)157157+ SET_REG_IMMEDIATE(r4, .hmt_init)158158 mtctr r4159159 bctr160160#else161161#ifdef CONFIG_SMP162162- LOADADDR(r4, .pSeries_secondary_smp_init)162162+ LOAD_REG_IMMEDIATE(r4, .pSeries_secondary_smp_init)163163 mtctr r4164164 mr r3,r24165165 bctr···205205#define EX_LR 72206206207207/*208208- * We're short on space and time in the exception prolog, so we can't use209209- * the normal LOADADDR macro. Normally we just need the low halfword of the210210- * address, but for Kdump we need the whole low word.208208+ * We're short on space and time in the exception prolog, so we can't209209+ * use the normal SET_REG_IMMEDIATE macro. Normally we just need the210210+ * low halfword of the address, but for Kdump we need the whole low211211+ * word.211212 */212213#ifdef CONFIG_CRASH_DUMP213214#define LOAD_HANDLER(reg, label) \···255254256255#define EXCEPTION_PROLOG_ISERIES_2 \257256 mfmsr r10; \258258- ld r11,PACALPPACA+LPPACASRR0(r13); \259259- ld r12,PACALPPACA+LPPACASRR1(r13); \257257+ ld r12,PACALPPACAPTR(r13); \258258+ ld r11,LPPACASRR0(r12); \259259+ ld r12,LPPACASRR1(r12); \260260 ori r10,r10,MSR_RI; \261261 mtmsrd r10,1262262···636634 std r12,PACA_EXSLB+EX_R12(r13)637635 mfspr r10,SPRN_SPRG1638636 std r10,PACA_EXSLB+EX_R13(r13)639639- ld r12,PACALPPACA+LPPACASRR1(r13);637637+ ld r12,PACALPPACAPTR(r13)638638+ ld r12,LPPACASRR1(r12)640639 b .slb_miss_realmode641640642641 STD_EXCEPTION_ISERIES(0x400, instruction_access, PACA_EXGEN)···647644 mtspr SPRN_SPRG1,r13 /* save r13 */648645 mfspr r13,SPRN_SPRG3 /* get paca address into r13 */649646 std r3,PACA_EXSLB+EX_R3(r13)650650- ld r3,PACALPPACA+LPPACASRR0(r13) /* get SRR0 value */647647+ ld r3,PACALPPACAPTR(r13)648648+ ld r3,LPPACASRR0(r3) /* get SRR0 value */651649 std r9,PACA_EXSLB+EX_R9(r13)652650 mfcr r9653651#ifdef __DISABLED__···660656 std r12,PACA_EXSLB+EX_R12(r13)661657 mfspr r10,SPRN_SPRG1662658 std r10,PACA_EXSLB+EX_R13(r13)663663- ld r12,PACALPPACA+LPPACASRR1(r13);659659+ ld r12,PACALPPACAPTR(r13)660660+ ld r12,LPPACASRR1(r12)664661 b .slb_miss_realmode665662666663#ifdef __DISABLED__···718713 lbz r23,PACAPROCSTART(r13) /* Test if this processor719714 * should start */720715 sync721721- LOADADDR(r3,current_set)716716+ LOAD_REG_IMMEDIATE(r3,current_set)722717 sldi r28,r24,3 /* get current_set[cpu#] */723718 ldx r3,r3,r28724719 addi r1,r3,THREAD_SIZE···750745 .globl decrementer_iSeries_masked751746decrementer_iSeries_masked:752747 li r11,1753753- stb r11,PACALPPACA+LPPACADECRINT(r13)754754- LOADBASE(r12,tb_ticks_per_jiffy)755755- lwz r12,OFF(tb_ticks_per_jiffy)(r12)748748+ ld r12,PACALPPACAPTR(r13)749749+ stb r11,LPPACADECRINT(r12)750750+ LOAD_REG_ADDRBASE(r12,tb_ticks_per_jiffy)751751+ lwz r12,ADDROFF(tb_ticks_per_jiffy)(r12)756752 mtspr SPRN_DEC,r12757753 /* fall through */758754759755 .globl hardware_interrupt_iSeries_masked760756hardware_interrupt_iSeries_masked:761757 mtcrf 0x80,r9 /* Restore regs */762762- ld r11,PACALPPACA+LPPACASRR0(r13)763763- ld r12,PACALPPACA+LPPACASRR1(r13)758758+ ld r12,PACALPPACAPTR(r13)759759+ ld r11,LPPACASRR0(r12)760760+ ld r12,LPPACASRR1(r12)764761 mtspr SPRN_SRR0,r11765762 mtspr SPRN_SRR1,r12766763 ld r9,PACA_EXGEN+EX_R9(r13)···1001994 ld r3,PACA_EXSLB+EX_R3(r13)1002995 lwz r9,PACA_EXSLB+EX_CCR(r13) /* get saved CR */1003996#ifdef CONFIG_PPC_ISERIES10041004- ld r11,PACALPPACA+LPPACASRR0(r13) /* get SRR0 value */997997+ ld r11,PACALPPACAPTR(r13)998998+ ld r11,LPPACASRR0(r11) /* get SRR0 value */1005999#endif /* CONFIG_PPC_ISERIES */1006100010071001 mtlr r10···14201412 * physical cpu id in r24, we need to search the pacas to find14211413 * which logical id maps to our physical one.14221414 */14231423- LOADADDR(r13, paca) /* Get base vaddr of paca array */14151415+ LOAD_REG_IMMEDIATE(r13, paca) /* Get base vaddr of paca array */14241416 li r5,0 /* logical cpu id */142514171: lhz r6,PACAHWCPUID(r13) /* Load HW procid from paca */14261418 cmpw r6,r24 /* Compare to our id */···14541446#ifdef CONFIG_PPC_ISERIES14551447_STATIC(__start_initialization_iSeries)14561448 /* Clear out the BSS */14571457- LOADADDR(r11,__bss_stop)14581458- LOADADDR(r8,__bss_start)14491449+ LOAD_REG_IMMEDIATE(r11,__bss_stop)14501450+ LOAD_REG_IMMEDIATE(r8,__bss_start)14591451 sub r11,r11,r8 /* bss size */14601452 addi r11,r11,7 /* round up to an even double word */14611453 rldicl. r11,r11,61,3 /* shift right by 3 */···146614583: stdu r0,8(r8)14671459 bdnz 3b146814604:14691469- LOADADDR(r1,init_thread_union)14611461+ LOAD_REG_IMMEDIATE(r1,init_thread_union)14701462 addi r1,r1,THREAD_SIZE14711463 li r0,014721464 stdu r0,-STACK_FRAME_OVERHEAD(r1)1473146514741474- LOADADDR(r3,cpu_specs)14751475- LOADADDR(r4,cur_cpu_spec)14661466+ LOAD_REG_IMMEDIATE(r3,cpu_specs)14671467+ LOAD_REG_IMMEDIATE(r4,cur_cpu_spec)14761468 li r5,014771469 bl .identify_cpu1478147014791479- LOADADDR(r2,__toc_start)14711471+ LOAD_REG_IMMEDIATE(r2,__toc_start)14801472 addi r2,r2,0x400014811473 addi r2,r2,0x400014821474···15361528 li r24,01537152915381530 /* Switch off MMU if not already */15391539- LOADADDR(r4, .__after_prom_start - KERNELBASE)15311531+ LOAD_REG_IMMEDIATE(r4, .__after_prom_start - KERNELBASE)15401532 add r4,r4,r3015411533 bl .__mmu_off15421534 b .__after_prom_start···15561548 /* put a relocation offset into r3 */15571549 bl .reloc_offset1558155015591559- LOADADDR(r2,__toc_start)15511551+ LOAD_REG_IMMEDIATE(r2,__toc_start)15601552 addi r2,r2,0x400015611553 addi r2,r2,0x400015621554···15961588 */15971589 bl .reloc_offset15981590 mr r26,r315991599- SET_REG_TO_CONST(r27,KERNELBASE)15911591+ LOAD_REG_IMMEDIATE(r27, KERNELBASE)1600159216011601- LOADADDR(r3, PHYSICAL_START) /* target addr */15931593+ LOAD_REG_IMMEDIATE(r3, PHYSICAL_START) /* target addr */1602159416031595 // XXX FIXME: Use phys returned by OF (r30)16041596 add r4,r27,r26 /* source addr */···16061598 /* i.e. where we are running */16071599 /* the source addr */1608160016091609- LOADADDR(r5,copy_to_here) /* # bytes of memory to copy */16011601+ LOAD_REG_IMMEDIATE(r5,copy_to_here) /* # bytes of memory to copy */16101602 sub r5,r5,r271611160316121604 li r6,0x100 /* Start offset, the first 0x100 */···16161608 /* this includes the code being */16171609 /* executed here. */1618161016191619- LOADADDR(r0, 4f) /* Jump to the copy of this code */16111611+ LOAD_REG_IMMEDIATE(r0, 4f) /* Jump to the copy of this code */16201612 mtctr r0 /* that we just made/relocated */16211613 bctr1622161416231623-4: LOADADDR(r5,klimit)16151615+4: LOAD_REG_IMMEDIATE(r5,klimit)16241616 add r5,r5,r2616251617 ld r5,0(r5) /* get the value of klimit */16261618 sub r5,r5,r27···17021694 mtmsrd r3 /* RI on */1703169517041696 /* Set up a paca value for this processor. */17051705- LOADADDR(r4, paca) /* Get base vaddr of paca array */16971697+ LOAD_REG_IMMEDIATE(r4, paca) /* Get base vaddr of paca array */17061698 mulli r13,r24,PACA_SIZE /* Calculate vaddr of right paca */17071699 add r13,r13,r4 /* for this processor. */17081700 mtspr SPRN_SPRG3,r13 /* Save vaddr of paca in SPRG3 */···17391731 bl .early_setup_secondary1740173217411733 /* Initialize the kernel stack. Just a repeat for iSeries. */17421742- LOADADDR(r3,current_set)17341734+ LOAD_REG_ADDR(r3, current_set)17431735 sldi r28,r24,3 /* get current_set[cpu#] */17441736 ldx r1,r3,r2817451737 addi r1,r1,THREAD_SIZE-STACK_FRAME_OVERHEAD···17501742 mtlr r71751174317521744 /* enable MMU and jump to start_secondary */17531753- LOADADDR(r3,.start_secondary_prolog)17541754- SET_REG_TO_CONST(r4, MSR_KERNEL)17451745+ LOAD_REG_ADDR(r3, .start_secondary_prolog)17461746+ LOAD_REG_IMMEDIATE(r4, MSR_KERNEL)17551747#ifdef DO_SOFT_DISABLE17561748 ori r4,r4,MSR_EE17571749#endif···18001792 * be detached from the kernel completely. Besides, we need18011793 * to clear it now for kexec-style entry.18021794 */18031803- LOADADDR(r11,__bss_stop)18041804- LOADADDR(r8,__bss_start)17951795+ LOAD_REG_IMMEDIATE(r11,__bss_stop)17961796+ LOAD_REG_IMMEDIATE(r8,__bss_start)18051797 sub r11,r11,r8 /* bss size */18061798 addi r11,r11,7 /* round up to an even double word */18071799 rldicl. r11,r11,61,3 /* shift right by 3 */···18391831 /* up the htab. This is done because we have relocated the */18401832 /* kernel but are still running in real mode. */1841183318421842- LOADADDR(r3,init_thread_union)18341834+ LOAD_REG_IMMEDIATE(r3,init_thread_union)18431835 add r3,r3,r261844183618451837 /* set up a stack pointer (physical address) */···18481840 stdu r0,-STACK_FRAME_OVERHEAD(r1)1849184118501842 /* set up the TOC (physical address) */18511851- LOADADDR(r2,__toc_start)18431843+ LOAD_REG_IMMEDIATE(r2,__toc_start)18521844 addi r2,r2,0x400018531845 addi r2,r2,0x400018541846 add r2,r2,r261855184718561856- LOADADDR(r3,cpu_specs)18481848+ LOAD_REG_IMMEDIATE(r3, cpu_specs)18571849 add r3,r3,r2618581858- LOADADDR(r4,cur_cpu_spec)18501850+ LOAD_REG_IMMEDIATE(r4,cur_cpu_spec)18591851 add r4,r4,r2618601852 mr r5,r2618611853 bl .identify_cpu···18711863 * nowhere it can be initialized differently before we reach this18721864 * code18731865 */18741874- LOADADDR(r27, boot_cpuid)18661866+ LOAD_REG_IMMEDIATE(r27, boot_cpuid)18751867 add r27,r27,r2618761868 lwz r27,0(r27)1877186918781878- LOADADDR(r24, paca) /* Get base vaddr of paca array */18701870+ LOAD_REG_IMMEDIATE(r24, paca) /* Get base vaddr of paca array */18791871 mulli r13,r27,PACA_SIZE /* Calculate vaddr of right paca */18801872 add r13,r13,r24 /* for this processor. */18811873 add r13,r13,r26 /* convert to physical addr */···18881880 mr r3,r3118891881 bl .early_setup1890188218911891- LOADADDR(r3,.start_here_common)18921892- SET_REG_TO_CONST(r4, MSR_KERNEL)18831883+ LOAD_REG_IMMEDIATE(r3, .start_here_common)18841884+ LOAD_REG_IMMEDIATE(r4, MSR_KERNEL)18931885 mtspr SPRN_SRR0,r318941886 mtspr SPRN_SRR1,r418951887 rfid···19031895 /* The following code sets up the SP and TOC now that we are */19041896 /* running with translation enabled. */1905189719061906- LOADADDR(r3,init_thread_union)18981898+ LOAD_REG_IMMEDIATE(r3,init_thread_union)1907189919081900 /* set up the stack */19091901 addi r1,r3,THREAD_SIZE···19161908 li r3,019171909 bl .do_cpu_ftr_fixups1918191019191919- LOADADDR(r26, boot_cpuid)19111911+ LOAD_REG_IMMEDIATE(r26, boot_cpuid)19201912 lwz r26,0(r26)1921191319221922- LOADADDR(r24, paca) /* Get base vaddr of paca array */19141914+ LOAD_REG_IMMEDIATE(r24, paca) /* Get base vaddr of paca array */19231915 mulli r13,r26,PACA_SIZE /* Calculate vaddr of right paca */19241916 add r13,r13,r24 /* for this processor. */19251917 mtspr SPRN_SPRG3,r131926191819271919 /* ptr to current */19281928- LOADADDR(r4,init_task)19201920+ LOAD_REG_IMMEDIATE(r4, init_task)19291921 std r4,PACACURRENT(r13)1930192219311923 /* Load the TOC */···1948194019491941_GLOBAL(hmt_init)19501942#ifdef CONFIG_HMT19511951- LOADADDR(r5, hmt_thread_data)19431943+ LOAD_REG_IMMEDIATE(r5, hmt_thread_data)19521944 mfspr r7,SPRN_PVR19531945 srwi r7,r7,1619541946 cmpwi r7,0x34 /* Pulsar */···19691961 b 101f1970196219711963__hmt_secondary_hold:19721972- LOADADDR(r5, hmt_thread_data)19641964+ LOAD_REG_IMMEDIATE(r5, hmt_thread_data)19731965 clrldi r5,r5,419741966 li r7,019751967 mfspr r6,SPRN_PIR···1997198919981990#ifdef CONFIG_HMT19991991_GLOBAL(hmt_start_secondary)20002000- LOADADDR(r4,__hmt_secondary_hold)19921992+ LOAD_REG_IMMEDIATE(r4,__hmt_secondary_hold)20011993 clrldi r4,r4,420021994 mtspr SPRN_NIADORM, r420031995 mfspr r4, SPRN_MSRDORM
+4-4
arch/powerpc/kernel/idle_power4.S
···3838 /* We must dynamically check for the NAP feature as it3939 * can be cleared by CPU init after the fixups are done4040 */4141- LOADBASE(r3,cur_cpu_spec)4242- ld r4,OFF(cur_cpu_spec)(r3)4141+ LOAD_REG_ADDRBASE(r3,cur_cpu_spec)4242+ ld r4,ADDROFF(cur_cpu_spec)(r3)4343 ld r4,CPU_SPEC_FEATURES(r4)4444 andi. r0,r4,CPU_FTR_CAN_NAP4545 beqlr4646 /* Now check if user or arch enabled NAP mode */4747- LOADBASE(r3,powersave_nap)4848- lwz r4,OFF(powersave_nap)(r3)4747+ LOAD_REG_ADDRBASE(r3,powersave_nap)4848+ lwz r4,ADDROFF(powersave_nap)(r3)4949 cmpwi 0,r4,05050 beqlr5151
+4-8
arch/powerpc/kernel/irq.c
···238238 irq_exit();239239240240#ifdef CONFIG_PPC_ISERIES241241- {242242- struct paca_struct *lpaca = get_paca();243243-244244- if (lpaca->lppaca.int_dword.fields.decr_int) {245245- lpaca->lppaca.int_dword.fields.decr_int = 0;246246- /* Signal a fake decrementer interrupt */247247- timer_interrupt(regs);248248- }241241+ if (get_lppaca()->int_dword.fields.decr_int) {242242+ get_lppaca()->int_dword.fields.decr_int = 0;243243+ /* Signal a fake decrementer interrupt */244244+ timer_interrupt(regs);249245 }250246#endif251247}
+5-8
arch/powerpc/kernel/lparcfg.c
···5555{5656 unsigned long sum_purr = 0;5757 int cpu;5858- struct paca_struct *lpaca;59586059 for_each_cpu(cpu) {6161- lpaca = paca + cpu;6262- sum_purr += lpaca->lppaca.emulated_time_base;6060+ sum_purr += lppaca[cpu].emulated_time_base;63616462#ifdef PURR_DEBUG6563 printk(KERN_INFO "get_purr for cpu (%d) has value (%ld) \n",6666- cpu, lpaca->lppaca.emulated_time_base);6464+ cpu, lppaca[cpu].emulated_time_base);6765#endif6866 }6967 return sum_purr;···7779 unsigned long pool_id, lp_index;7880 int shared, entitled_capacity, max_entitled_capacity;7981 int processors, max_processors;8080- struct paca_struct *lpaca = get_paca();8182 unsigned long purr = get_purr();82838384 seq_printf(m, "%s %s \n", MODULE_NAME, MODULE_VERS);84858585- shared = (int)(lpaca->lppaca_ptr->shared_proc);8686+ shared = (int)(get_lppaca()->shared_proc);8687 seq_printf(m, "serial_number=%c%c%c%c%c%c%c\n",8788 e2a(xItExtVpdPanel.mfgID[2]),8889 e2a(xItExtVpdPanel.mfgID[3]),···399402 (h_resource >> 0 * 8) & 0xffff);400403401404 /* pool related entries are apropriate for shared configs */402402- if (paca[0].lppaca.shared_proc) {405405+ if (lppaca[0].shared_proc) {403406404407 h_pic(&pool_idle_time, &pool_procs);405408···448451 seq_printf(m, "partition_potential_processors=%d\n",449452 partition_potential_processors);450453451451- seq_printf(m, "shared_processor_mode=%d\n", paca[0].lppaca.shared_proc);454454+ seq_printf(m, "shared_processor_mode=%d\n", lppaca[0].shared_proc);452455453456 return 0;454457}
···16271627 kfree(prop->value);16281628 kfree(prop);16291629 prop = next;16301630+16311631+ if (!prop) {16321632+ prop = node->deadprops;16331633+ node->deadprops = NULL;16341634+ }16301635 }16311636 kfree(node->intrs);16321637 kfree(node->full_name);···17791774__initcall(prom_reconfig_setup);17801775#endif1781177617771777+struct property *of_find_property(struct device_node *np, const char *name,17781778+ int *lenp)17791779+{17801780+ struct property *pp;17811781+17821782+ read_lock(&devtree_lock);17831783+ for (pp = np->properties; pp != 0; pp = pp->next)17841784+ if (strcmp(pp->name, name) == 0) {17851785+ if (lenp != 0)17861786+ *lenp = pp->length;17871787+ break;17881788+ }17891789+ read_unlock(&devtree_lock);17901790+17911791+ return pp;17921792+}17931793+17821794/*17831795 * Find a property with a given name for a given node17841796 * and return the value.···18031781unsigned char *get_property(struct device_node *np, const char *name,18041782 int *lenp)18051783{18061806- struct property *pp;18071807-18081808- for (pp = np->properties; pp != 0; pp = pp->next)18091809- if (strcmp(pp->name, name) == 0) {18101810- if (lenp != 0)18111811- *lenp = pp->length;18121812- return pp->value;18131813- }18141814- return NULL;17841784+ struct property *pp = of_find_property(np,name,lenp);17851785+ return pp ? pp->value : NULL;18151786}18161787EXPORT_SYMBOL(get_property);18171788···18381823 return 0;18391824}1840182518261826+/*18271827+ * Remove a property from a node. Note that we don't actually18281828+ * remove it, since we have given out who-knows-how-many pointers18291829+ * to the data using get-property. Instead we just move the property18301830+ * to the "dead properties" list, so it won't be found any more.18311831+ */18321832+int prom_remove_property(struct device_node *np, struct property *prop)18331833+{18341834+ struct property **next;18351835+ int found = 0;1841183618371837+ write_lock(&devtree_lock);18381838+ next = &np->properties;18391839+ while (*next) {18401840+ if (*next == prop) {18411841+ /* found the node */18421842+ *next = prop->next;18431843+ prop->next = np->deadprops;18441844+ np->deadprops = prop;18451845+ found = 1;18461846+ break;18471847+ }18481848+ next = &(*next)->next;18491849+ }18501850+ write_unlock(&devtree_lock);18511851+18521852+ if (!found)18531853+ return -ENODEV;18541854+18551855+#ifdef CONFIG_PROC_DEVICETREE18561856+ /* try to remove the proc node as well */18571857+ if (np->pde)18581858+ proc_device_tree_remove_prop(np->pde, prop);18591859+#endif /* CONFIG_PROC_DEVICETREE */18601860+18611861+ return 0;18621862+}18631863+18641864+/*18651865+ * Update a property in a node. Note that we don't actually18661866+ * remove it, since we have given out who-knows-how-many pointers18671867+ * to the data using get-property. Instead we just move the property18681868+ * to the "dead properties" list, and add the new property to the18691869+ * property list18701870+ */18711871+int prom_update_property(struct device_node *np,18721872+ struct property *newprop,18731873+ struct property *oldprop)18741874+{18751875+ struct property **next;18761876+ int found = 0;18771877+18781878+ write_lock(&devtree_lock);18791879+ next = &np->properties;18801880+ while (*next) {18811881+ if (*next == oldprop) {18821882+ /* found the node */18831883+ newprop->next = oldprop->next;18841884+ *next = newprop;18851885+ oldprop->next = np->deadprops;18861886+ np->deadprops = oldprop;18871887+ found = 1;18881888+ break;18891889+ }18901890+ next = &(*next)->next;18911891+ }18921892+ write_unlock(&devtree_lock);18931893+18941894+ if (!found)18951895+ return -ENODEV;18961896+18971897+#ifdef CONFIG_PROC_DEVICETREE18981898+ /* try to add to proc as well if it was initialized */18991899+ if (np->pde)19001900+ proc_device_tree_update_prop(np->pde, newprop, oldprop);19011901+#endif /* CONFIG_PROC_DEVICETREE */19021902+19031903+ return 0;19041904+}
+2-1
arch/powerpc/kernel/prom_parse.c
···113113114114static int of_bus_pci_match(struct device_node *np)115115{116116- return !strcmp(np->type, "pci");116116+ /* "vci" is for the /chaos bridge on 1st-gen PCI powermacs */117117+ return !strcmp(np->type, "pci") || !strcmp(np->type, "vci");117118}118119119120static void of_bus_pci_count_cells(struct device_node *np,
+95-1
arch/powerpc/kernel/rtas.c
···3636 .lock = SPIN_LOCK_UNLOCKED3737};38383939+struct rtas_suspend_me_data {4040+ long waiting;4141+ struct rtas_args *args;4242+};4343+3944EXPORT_SYMBOL(rtas);40454146DEFINE_SPINLOCK(rtas_data_buf_lock);···561556 } while (status == RTAS_BUSY);562557}563558559559+static int ibm_suspend_me_token = RTAS_UNKNOWN_SERVICE;560560+#ifdef CONFIG_PPC_PSERIES561561+static void rtas_percpu_suspend_me(void *info)562562+{563563+ long rc;564564+ long flags;565565+ struct rtas_suspend_me_data *data =566566+ (struct rtas_suspend_me_data *)info;567567+568568+ /*569569+ * We use "waiting" to indicate our state. As long570570+ * as it is >0, we are still trying to all join up.571571+ * If it goes to 0, we have successfully joined up and572572+ * one thread got H_Continue. If any error happens,573573+ * we set it to <0.574574+ */575575+ local_irq_save(flags);576576+ do {577577+ rc = plpar_hcall_norets(H_JOIN);578578+ smp_rmb();579579+ } while (rc == H_Success && data->waiting > 0);580580+ if (rc == H_Success)581581+ goto out;582582+583583+ if (rc == H_Continue) {584584+ data->waiting = 0;585585+ rtas_call(ibm_suspend_me_token, 0, 1,586586+ data->args->args);587587+ } else {588588+ data->waiting = -EBUSY;589589+ printk(KERN_ERR "Error on H_Join hypervisor call\n");590590+ }591591+592592+out:593593+ /* before we restore interrupts, make sure we don't594594+ * generate a spurious soft lockup errors595595+ */596596+ touch_softlockup_watchdog();597597+ local_irq_restore(flags);598598+ return;599599+}600600+601601+static int rtas_ibm_suspend_me(struct rtas_args *args)602602+{603603+ int i;604604+605605+ struct rtas_suspend_me_data data;606606+607607+ data.waiting = 1;608608+ data.args = args;609609+610610+ /* Call function on all CPUs. One of us will make the611611+ * rtas call612612+ */613613+ if (on_each_cpu(rtas_percpu_suspend_me, &data, 1, 0))614614+ data.waiting = -EINVAL;615615+616616+ if (data.waiting != 0)617617+ printk(KERN_ERR "Error doing global join\n");618618+619619+ /* Prod each CPU. This won't hurt, and will wake620620+ * anyone we successfully put to sleep with H_Join621621+ */622622+ for_each_cpu(i)623623+ plpar_hcall_norets(H_PROD, i);624624+625625+ return data.waiting;626626+}627627+#else /* CONFIG_PPC_PSERIES */628628+static int rtas_ibm_suspend_me(struct rtas_args *args)629629+{630630+ return -ENOSYS;631631+}632632+#endif564633565634asmlinkage int ppc_rtas(struct rtas_args __user *uargs)566635{···642563 unsigned long flags;643564 char *buff_copy, *errbuf = NULL;644565 int nargs;566566+ int rc;645567646568 if (!capable(CAP_SYS_ADMIN))647569 return -EPERM;···660580 if (copy_from_user(args.args, uargs->args,661581 nargs * sizeof(rtas_arg_t)) != 0)662582 return -EFAULT;583583+584584+ if (args.token == RTAS_UNKNOWN_SERVICE)585585+ return -EINVAL;586586+587587+ /* Need to handle ibm,suspend_me call specially */588588+ if (args.token == ibm_suspend_me_token) {589589+ rc = rtas_ibm_suspend_me(&args);590590+ if (rc)591591+ return rc;592592+ goto copy_return;593593+ }663594664595 buff_copy = get_errorlog_buffer();665596···695604 kfree(buff_copy);696605 }697606607607+ copy_return:698608 /* Copy out args. */699609 if (copy_to_user(uargs->args + nargs,700610 args.args + nargs,···767675 * the stop-self token if any768676 */769677#ifdef CONFIG_PPC64770770- if (_machine == PLATFORM_PSERIES_LPAR)678678+ if (_machine == PLATFORM_PSERIES_LPAR) {771679 rtas_region = min(lmb.rmo_size, RTAS_INSTANTIATE_MAX);680680+ ibm_suspend_me_token = rtas_token("ibm,suspend-me");681681+ }772682#endif773683 rtas_rmo_buf = lmb_alloc_base(RTAS_RMOBUF_MAX, PAGE_SIZE, rtas_region);774684
+6-3
arch/powerpc/kernel/setup-common.c
···100100void machine_restart(char *cmd)101101{102102 machine_shutdown();103103- ppc_md.restart(cmd);103103+ if (ppc_md.restart)104104+ ppc_md.restart(cmd);104105#ifdef CONFIG_SMP105106 smp_send_stop();106107#endif···113112void machine_power_off(void)114113{115114 machine_shutdown();116116- ppc_md.power_off();115115+ if (ppc_md.power_off)116116+ ppc_md.power_off();117117#ifdef CONFIG_SMP118118 smp_send_stop();119119#endif···131129void machine_halt(void)132130{133131 machine_shutdown();134134- ppc_md.halt();132132+ if (ppc_md.halt)133133+ ppc_md.halt();135134#ifdef CONFIG_SMP136135 smp_send_stop();137136#endif
···2828void __spin_yield(raw_spinlock_t *lock)2929{3030 unsigned int lock_value, holder_cpu, yield_count;3131- struct paca_struct *holder_paca;32313332 lock_value = lock->slock;3433 if (lock_value == 0)3534 return;3635 holder_cpu = lock_value & 0xffff;3736 BUG_ON(holder_cpu >= NR_CPUS);3838- holder_paca = &paca[holder_cpu];3939- yield_count = holder_paca->lppaca.yield_count;3737+ yield_count = lppaca[holder_cpu].yield_count;4038 if ((yield_count & 1) == 0)4139 return; /* virtual cpu is currently running */4240 rmb();···5860{5961 int lock_value;6062 unsigned int holder_cpu, yield_count;6161- struct paca_struct *holder_paca;62636364 lock_value = rw->lock;6465 if (lock_value >= 0)6566 return; /* no write lock at present */6667 holder_cpu = lock_value & 0xffff;6768 BUG_ON(holder_cpu >= NR_CPUS);6868- holder_paca = &paca[holder_cpu];6969- yield_count = holder_paca->lppaca.yield_count;6969+ yield_count = lppaca[holder_cpu].yield_count;7070 if ((yield_count & 1) == 0)7171 return; /* virtual cpu is currently running */7272 rmb();
+4-4
arch/powerpc/oprofile/common.c
···140140141141 switch (cur_cpu_spec->oprofile_type) {142142#ifdef CONFIG_PPC64143143- case RS64:143143+ case PPC_OPROFILE_RS64:144144 model = &op_model_rs64;145145 break;146146- case POWER4:146146+ case PPC_OPROFILE_POWER4:147147 model = &op_model_power4;148148 break;149149#else150150- case G4:150150+ case PPC_OPROFILE_G4:151151 model = &op_model_7450;152152 break;153153#endif154154#ifdef CONFIG_FSL_BOOKE155155- case BOOKE:155155+ case PPC_OPROFILE_BOOKE:156156 model = &op_model_fsl_booke;157157 break;158158#endif
+1
arch/powerpc/platforms/83xx/Kconfig
···7788config MPC834x_SYS99 bool "Freescale MPC834x SYS"1010+ select DEFAULT_UIMAGE1011 help1112 This option enables support for the MPC 834x SYS evaluation board.1213
···11+/*22+ * arch/powerppc/platforms/83xx/mpc834x_sys.h33+ *44+ * MPC834X SYS common board definitions55+ *66+ * Maintainer: Kumar Gala <galak@kernel.crashing.org>77+ *88+ * This program is free software; you can redistribute it and/or modify it99+ * under the terms of the GNU General Public License as published by the1010+ * Free Software Foundation; either version 2 of the License, or (at your1111+ * option) any later version.1212+ *1313+ */1414+1515+#ifndef __MACH_MPC83XX_SYS_H__1616+#define __MACH_MPC83XX_SYS_H__1717+1818+#define PIRQA MPC83xx_IRQ_EXT41919+#define PIRQB MPC83xx_IRQ_EXT52020+#define PIRQC MPC83xx_IRQ_EXT62121+#define PIRQD MPC83xx_IRQ_EXT72222+2323+#endif /* __MACH_MPC83XX_SYS_H__ */
+14
arch/powerpc/platforms/83xx/mpc83xx.h
···11+#ifndef __MPC83XX_H__22+#define __MPC83XX_H__33+44+#include <linux/init.h>55+#include <linux/device.h>66+77+/*88+ * Declaration for the various functions exported by the99+ * mpc83xx_* files. Mostly for use by mpc83xx_setup1010+ */1111+1212+extern int add_bridge(struct device_node *dev);1313+1414+#endif /* __MPC83XX_H__ */
+99
arch/powerpc/platforms/83xx/pci.c
···11+/*22+ * FSL SoC setup code33+ *44+ * Maintained by Kumar Gala (see MAINTAINERS for contact information)55+ *66+ * This program is free software; you can redistribute it and/or modify it77+ * under the terms of the GNU General Public License as published by the88+ * Free Software Foundation; either version 2 of the License, or (at your99+ * option) any later version.1010+ */1111+1212+#include <linux/config.h>1313+#include <linux/stddef.h>1414+#include <linux/kernel.h>1515+#include <linux/init.h>1616+#include <linux/errno.h>1717+#include <linux/pci.h>1818+#include <linux/delay.h>1919+#include <linux/irq.h>2020+#include <linux/module.h>2121+2222+#include <asm/system.h>2323+#include <asm/atomic.h>2424+#include <asm/io.h>2525+#include <asm/pci-bridge.h>2626+#include <asm/prom.h>2727+#include <sysdev/fsl_soc.h>2828+2929+#undef DEBUG3030+3131+#ifdef DEBUG3232+#define DBG(x...) printk(x)3333+#else3434+#define DBG(x...)3535+#endif3636+3737+int mpc83xx_pci2_busno;3838+3939+#ifdef CONFIG_PCI4040+int __init add_bridge(struct device_node *dev)4141+{4242+ int len;4343+ struct pci_controller *hose;4444+ struct resource rsrc;4545+ int *bus_range;4646+ int primary = 1, has_address = 0;4747+ phys_addr_t immr = get_immrbase();4848+4949+ DBG("Adding PCI host bridge %s\n", dev->full_name);5050+5151+ /* Fetch host bridge registers address */5252+ has_address = (of_address_to_resource(dev, 0, &rsrc) == 0);5353+5454+ /* Get bus range if any */5555+ bus_range = (int *) get_property(dev, "bus-range", &len);5656+ if (bus_range == NULL || len < 2 * sizeof(int)) {5757+ printk(KERN_WARNING "Can't get bus-range for %s, assume"5858+ " bus 0\n", dev->full_name);5959+ }6060+6161+ hose = pcibios_alloc_controller();6262+ if (!hose)6363+ return -ENOMEM;6464+ hose->arch_data = dev;6565+ hose->set_cfg_type = 1;6666+6767+ hose->first_busno = bus_range ? bus_range[0] : 0;6868+ hose->last_busno = bus_range ? bus_range[1] : 0xff;6969+7070+ /* MPC83xx supports up to two host controllers one at 0x8500 from immrbar7171+ * the other at 0x8600, we consider the 0x8500 the primary controller7272+ */7373+ /* PCI 1 */7474+ if ((rsrc.start & 0xfffff) == 0x8500) {7575+ setup_indirect_pci(hose, immr + 0x8300, immr + 0x8304);7676+ }7777+ /* PCI 2*/7878+ if ((rsrc.start & 0xfffff) == 0x8600) {7979+ setup_indirect_pci(hose, immr + 0x8380, immr + 0x8384);8080+ primary = 0;8181+ hose->bus_offset = hose->first_busno;8282+ mpc83xx_pci2_busno = hose->first_busno;8383+ }8484+8585+ printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%08lx. "8686+ "Firmware bus number: %d->%d\n",8787+ rsrc.start, hose->first_busno, hose->last_busno);8888+8989+ DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",9090+ hose, hose->cfg_addr, hose->cfg_data);9191+9292+ /* Interpret the "ranges" property */9393+ /* This also maps the I/O region and sets isa_io/mem_base */9494+ pci_process_bridge_OF_ranges(hose, dev, primary);9595+9696+ return 0;9797+}9898+9999+#endif
+17-10
arch/powerpc/platforms/chrp/pci.c
···135135hydra_init(void)136136{137137 struct device_node *np;138138+ struct resource r;138139139140 np = find_devices("mac-io");140140- if (np == NULL || np->n_addrs == 0)141141+ if (np == NULL || of_address_to_resource(np, 0, &r))141142 return 0;142142- Hydra = ioremap(np->addrs[0].address, np->addrs[0].size);143143- printk("Hydra Mac I/O at %lx\n", np->addrs[0].address);143143+ Hydra = ioremap(r.start, r.end-r.start);144144+ printk("Hydra Mac I/O at %lx\n", r.start);144145 printk("Hydra Feature_Control was %x",145146 in_le32(&Hydra->Feature_Control));146147 out_le32(&Hydra->Feature_Control, (HYDRA_FC_SCC_CELL_EN |···178177{179178 u32 __iomem *reg;180179 u32 val;181181- unsigned long addr = dev->addrs[0].address;180180+ struct resource r;182181183183- setup_indirect_pci(hose, addr + 0xf8000, addr + 0xf8010);182182+ if (of_address_to_resource(dev, 0, &r)) {183183+ printk(KERN_ERR "No address for Python PCI controller\n");184184+ return;185185+ }184186185187 /* Clear the magic go-slow bit */186186- reg = ioremap(dev->addrs[0].address + 0xf6000, 0x40);188188+ reg = ioremap(r.start + 0xf6000, 0x40);189189+ BUG_ON(!reg); 187190 val = in_be32(®[12]);188191 if (val & PRG_CL_RESET_VALID) {189192 out_be32(®[12], val & ~PRG_CL_RESET_VALID);190193 in_be32(®[12]);191194 }192195 iounmap(reg);196196+197197+ setup_indirect_pci(hose, r.start + 0xf8000, r.start + 0xf8010);193198}194199195200/* Marvell Discovery II based Pegasos 2 */···225218 char *model, *machine;226219 int is_longtrail = 0, is_mot = 0, is_pegasos = 0;227220 struct device_node *root = find_path_device("/");228228-221221+ struct resource r;229222 /*230223 * The PCI host bridge nodes on some machines don't have231224 * properties to adequately identify them, so we have to···245238 continue;246239 ++index;247240 /* The GG2 bridge on the LongTrail doesn't have an address */248248- if (dev->n_addrs < 1 && !is_longtrail) {241241+ if (of_address_to_resource(dev, 0, &r) && !is_longtrail) {249242 printk(KERN_WARNING "Can't use %s: no address\n",250243 dev->full_name);251244 continue;···262255 printk(KERN_INFO "PCI buses %d..%d",263256 bus_range[0], bus_range[1]);264257 printk(" controlled by %s", dev->type);265265- if (dev->n_addrs > 0)266266- printk(" at %lx", dev->addrs[0].address);258258+ if (!is_longtrail)259259+ printk(" at %lx", r.start);267260 printk("\n");268261269262 hose = pcibios_alloc_controller();
···2121#include <linux/mc146818rtc.h>2222#include <linux/init.h>2323#include <linux/bcd.h>2424+#include <linux/ioport.h>24252526#include <asm/io.h>2627#include <asm/nvram.h>···3837long __init chrp_time_init(void)3938{4039 struct device_node *rtcs;4040+ struct resource r;4141 int base;42424343 rtcs = find_compatible_devices("rtc", "pnpPNP,b00");4444 if (rtcs == NULL)4545 rtcs = find_compatible_devices("rtc", "ds1385-rtc");4646- if (rtcs == NULL || rtcs->addrs == NULL)4646+ if (rtcs == NULL || of_address_to_resource(rtcs, 0, &r))4747 return 0;4848- base = rtcs->addrs[0].address;4848+4949+ base = r.start;4950 nvram_as1 = 0;5051 nvram_as0 = base;5152 nvram_data = base + 1;
+2-4
arch/powerpc/platforms/iseries/irq.c
···334334 */335335int iSeries_get_irq(struct pt_regs *regs)336336{337337- struct paca_struct *lpaca;338337 /* -2 means ignore this interrupt */339338 int irq = -2;340339341341- lpaca = get_paca();342340#ifdef CONFIG_SMP343343- if (lpaca->lppaca.int_dword.fields.ipi_cnt) {344344- lpaca->lppaca.int_dword.fields.ipi_cnt = 0;341341+ if (get_lppaca()->int_dword.fields.ipi_cnt) {342342+ get_lppaca()->int_dword.fields.ipi_cnt = 0;345343 iSeries_smp_message_recv(regs);346344 }347345#endif /* CONFIG_SMP */
+2-1
arch/powerpc/platforms/iseries/misc.S
···4444 /* Check pending interrupts */4545 /* A decrementer, IPI or PMC interrupt may have occurred4646 * while we were in the hypervisor (which enables) */4747- ld r4,PACALPPACA+LPPACAANYINT(r13)4747+ ld r4,PACALPPACAPTR(r13)4848+ ld r4,LPPACAANYINT(r4)4849 cmpdi r4,04950 beqlr5051
+4-4
arch/powerpc/platforms/iseries/setup.c
···538538 */539539static void __init iSeries_setup_arch(void)540540{541541- if (get_paca()->lppaca.shared_proc) {541541+ if (get_lppaca()->shared_proc) {542542 ppc_md.idle_loop = iseries_shared_idle;543543 printk(KERN_INFO "Using shared processor idle loop\n");544544 } else {···647647 * The decrementer stops during the yield. Force a fake decrementer648648 * here and let the timer_interrupt code sort out the actual time.649649 */650650- get_paca()->lppaca.int_dword.fields.decr_int = 1;650650+ get_lppaca()->int_dword.fields.decr_int = 1;651651 process_iSeries_events();652652}653653···883883 pft_size[1] = __ilog2(HvCallHpt_getHptPages() * HW_PAGE_SIZE);884884885885 for (i = 0; i < NR_CPUS; i++) {886886- if (paca[i].lppaca.dyn_proc_status >= 2)886886+ if (lppaca[i].dyn_proc_status >= 2)887887 continue;888888889889 snprintf(p, 32 - (p - buf), "@%d", i);···891891892892 dt_prop_str(dt, "device_type", "cpu");893893894894- index = paca[i].lppaca.dyn_hv_phys_proc_index;894894+ index = lppaca[i].dyn_hv_phys_proc_index;895895 d = &xIoHriProcessorVpd[index];896896897897 dt_prop_u32(dt, "i-cache-size", d->xInstCacheSize * 1024);
+1-1
arch/powerpc/platforms/iseries/smp.c
···9191 BUG_ON((nr < 0) || (nr >= NR_CPUS));92929393 /* Verify that our partition has a processor nr */9494- if (paca[nr].lppaca.dyn_proc_status >= 2)9494+ if (lppaca[nr].dyn_proc_status >= 2)9595 return;96969797 /* The processor is currently spinning, waiting
+2-2
arch/powerpc/platforms/pseries/lpar.c
···254254void vpa_init(int cpu)255255{256256 int hwcpu = get_hard_smp_processor_id(cpu);257257- unsigned long vpa = __pa(&paca[cpu].lppaca);257257+ unsigned long vpa = __pa(&lppaca[cpu]);258258 long ret;259259260260 if (cpu_has_feature(CPU_FTR_ALTIVEC))261261- paca[cpu].lppaca.vmxregs_in_use = 1;261261+ lppaca[cpu].vmxregs_in_use = 1;262262263263 ret = register_vpa(hwcpu, vpa);264264
···190190191191 /* instruct hypervisor to maintain PMCs */192192 if (firmware_has_feature(FW_FEATURE_SPLPAR))193193- get_paca()->lppaca.pmcregs_in_use = 1;193193+ get_lppaca()->pmcregs_in_use = 1;194194}195195196196static void __init pSeries_setup_arch(void)···234234 /* Choose an idle loop */235235 if (firmware_has_feature(FW_FEATURE_SPLPAR)) {236236 vpa_init(boot_cpuid);237237- if (get_paca()->lppaca.shared_proc) {237237+ if (get_lppaca()->shared_proc) {238238 printk(KERN_INFO "Using shared processor idle loop\n");239239 ppc_md.idle_loop = pseries_shared_idle;240240 } else {···444444445445static inline void dedicated_idle_sleep(unsigned int cpu)446446{447447- struct paca_struct *ppaca = &paca[cpu ^ 1];447447+ struct lppaca *plppaca = &lppaca[cpu ^ 1];448448449449 /* Only sleep if the other thread is not idle */450450- if (!(ppaca->lppaca.idle)) {450450+ if (!(plppaca->idle)) {451451 local_irq_disable();452452453453 /*···480480481481static void pseries_dedicated_idle(void)482482{ 483483- struct paca_struct *lpaca = get_paca();484483 unsigned int cpu = smp_processor_id();485484 unsigned long start_snooze;486485 unsigned long *smt_snooze_delay = &__get_cpu_var(smt_snooze_delay);···490491 * Indicate to the HV that we are idle. Now would be491492 * a good time to find other work to dispatch.492493 */493493- lpaca->lppaca.idle = 1;494494+ get_lppaca()->idle = 1;494495495496 if (!need_resched()) {496497 start_snooze = get_tb() +···517518 HMT_medium();518519 }519520520520- lpaca->lppaca.idle = 0;521521+ get_lppaca()->idle = 0;521522 ppc64_runlatch_on();522523523524 preempt_enable_no_resched();···531532532533static void pseries_shared_idle(void)533534{534534- struct paca_struct *lpaca = get_paca();535535 unsigned int cpu = smp_processor_id();536536537537 while (1) {···538540 * Indicate to the HV that we are idle. Now would be539541 * a good time to find other work to dispatch.540542 */541541- lpaca->lppaca.idle = 1;543543+ get_lppaca()->idle = 1;542544543545 while (!need_resched() && !cpu_is_offline(cpu)) {544546 local_irq_disable();···562564 HMT_medium();563565 }564566565565- lpaca->lppaca.idle = 0;567567+ get_lppaca()->idle = 0;566568 ppc64_runlatch_on();567569568570 preempt_enable_no_resched();···586588{587589 /* Don't risk a hypervisor call if we're crashing */588590 if (!crash_shutdown) {589589- unsigned long vpa = __pa(&get_paca()->lppaca);591591+ unsigned long vpa = __pa(get_lppaca());590592591593 if (unregister_vpa(hard_smp_processor_id(), vpa)) {592594 printk("VPA deregistration of cpu %u (hw_cpu_id %d) "
···375375 lis r11, swapper_pg_dir@h376376 ori r11, r11, swapper_pg_dir@l377377 rlwimi r10, r11, 0, 2, 19378378+ stw r12, 16(r0)379379+ b LoadLargeDTLB3783803:379381 lwz r11, 0(r10) /* Get the level 1 entry */380382 rlwinm. r10, r11,0,0,19 /* Extract page descriptor page address */···431429 . = 0x1300432430InstructionTLBError:433431 b InstructionAccess432432+433433+LoadLargeDTLB:434434+ li r12, 0435435+ lwz r11, 0(r10) /* Get the level 1 entry */436436+ rlwinm. r10, r11,0,0,19 /* Extract page descriptor page address */437437+ beq 3f /* If zero, don't try to find a pte */438438+439439+ /* We have a pte table, so load fetch the pte from the table.440440+ */441441+ ori r11, r11, 1 /* Set valid bit in physical L2 page */442442+ DO_8xx_CPU6(0x3b80, r3)443443+ mtspr SPRN_MD_TWC, r11 /* Load pte table base address */444444+ mfspr r10, SPRN_MD_TWC /* ....and get the pte address */445445+ lwz r10, 0(r10) /* Get the pte */446446+447447+ /* Insert the Guarded flag into the TWC from the Linux PTE.448448+ * It is bit 27 of both the Linux PTE and the TWC (at least449449+ * I got that right :-). It will be better when we can put450450+ * this into the Linux pgd/pmd and load it in the operation451451+ * above.452452+ */453453+ rlwimi r11, r10, 0, 27, 27454454+455455+ rlwimi r12, r10, 0, 0, 9 /* extract phys. addr */456456+ mfspr r3, SPRN_MD_EPN457457+ rlwinm r3, r3, 0, 0, 9 /* extract virtual address */458458+ tophys(r3, r3)459459+ cmpw r3, r12 /* only use 8M page if it is a direct 460460+ kernel mapping */461461+ bne 1f462462+ ori r11, r11, MD_PS8MEG463463+ li r12, 1464464+ b 2f465465+1:466466+ li r12, 0 /* can't use 8MB TLB, so zero r12. */467467+2:468468+ DO_8xx_CPU6(0x3b80, r3)469469+ mtspr SPRN_MD_TWC, r11470470+471471+ /* The Linux PTE won't go exactly into the MMU TLB.472472+ * Software indicator bits 21, 22 and 28 must be clear.473473+ * Software indicator bits 24, 25, 26, and 27 must be474474+ * set. All other Linux PTE bits control the behavior475475+ * of the MMU.476476+ */477477+3: li r11, 0x00f0478478+ rlwimi r10, r11, 0, 24, 28 /* Set 24-27, clear 28 */479479+ cmpwi r12, 1480480+ bne 4f481481+ ori r10, r10, 0x8482482+483483+ mfspr r12, SPRN_MD_EPN484484+ lis r3, 0xff80 /* 10-19 must be clear for 8MB TLB */485485+ ori r3, r3, 0x0fff486486+ and r12, r3, r12487487+ DO_8xx_CPU6(0x3780, r3)488488+ mtspr SPRN_MD_EPN, r12489489+490490+ lis r3, 0xff80 /* 10-19 must be clear for 8MB TLB */491491+ ori r3, r3, 0x0fff492492+ and r10, r3, r10493493+4:494494+ DO_8xx_CPU6(0x3d80, r3)495495+ mtspr SPRN_MD_RPN, r10 /* Update TLB entry */496496+497497+ mfspr r10, SPRN_M_TW /* Restore registers */498498+ lwz r11, 0(r0)499499+ mtcr r11500500+ lwz r11, 4(r0)501501+502502+ lwz r12, 16(r0)503503+#ifdef CONFIG_8xx_CPU6504504+ lwz r3, 8(r0)505505+#endif506506+ rfi434507435508/* This is the data TLB error on the MPC8xx. This could be due to436509 * many reasons, including a dirty update to a pte. We can catch that
···221221 instruction set this cpu supports. This could be done in userspace,222222 but it's not easy, and we've already done it here. */223223# define ELF_HWCAP (cur_cpu_spec->cpu_user_features)224224+225225+/* This yields a string that ld.so will use to load implementation226226+ specific libraries for optimization. This is more specific in227227+ intent than poking at uname or /proc/cpuinfo. */228228+229229+#define ELF_PLATFORM (cur_cpu_spec->platform)230230+224231#ifdef __powerpc64__225232# define ELF_PLAT_INIT(_r, load_addr) do { \226233 _r->gpr[2] = load_addr; \227234} while (0)228235#endif /* __powerpc64__ */229229-230230-/* This yields a string that ld.so will use to load implementation231231- specific libraries for optimization. This is more specific in232232- intent than poking at uname or /proc/cpuinfo.233233-234234- For the moment, we have only optimizations for the Intel generations,235235- but that could change... */236236-237237-#define ELF_PLATFORM (NULL)238236239237#ifdef __KERNEL__240238
···6677#define H_Success 088#define H_Busy 1 /* Hardware busy -- retry later */99+#define H_Closed 2 /* Resource closed */910#define H_Constrained 4 /* Resource request constrained to max allowed */1111+#define H_InProgress 14 /* Kind of like busy */1212+#define H_Continue 18 /* Returned from H_Join on success */1013#define H_LongBusyStartRange 9900 /* Start of long busy range */1114#define H_LongBusyOrder1msec 9900 /* Long busy, hint that 1msec is a good time to retry */1215#define H_LongBusyOrder10msec 9901 /* Long busy, hint that 10msec is a good time to retry */···117114#define H_REGISTER_VTERM 0x154118115#define H_FREE_VTERM 0x158119116#define H_POLL_PENDING 0x1D8117117+#define H_JOIN 0x298118118+#define H_ENABLE_CRQ 0x2B0120119121120#ifndef __ASSEMBLY__122121
+5-1
include/asm-powerpc/lppaca.h
···2929//----------------------------------------------------------------------------3030#include <asm/types.h>31313232-struct lppaca {3232+/* The Hypervisor barfs if the lppaca crosses a page boundary. A 1k3333+ * alignment is sufficient to prevent this */3434+struct __attribute__((__aligned__(0x400))) lppaca {3335//=============================================================================3436// CACHE_LINE_1 0x0000 - 0x007F Contains read-only data3537// NOTE: The xDynXyz fields are fields that will be dynamically changed by···130128//=============================================================================131129 u8 pmc_save_area[256]; // PMC interrupt Area x00-xFF132130};131131+132132+extern struct lppaca lppaca[];133133134134#endif /* __KERNEL__ */135135#endif /* _ASM_POWERPC_LPPACA_H */
+1-13
include/asm-powerpc/paca.h
···23232424register struct paca_struct *local_paca asm("r13");2525#define get_paca() local_paca2626+#define get_lppaca() (get_paca()->lppaca_ptr)26272728struct task_struct;2829···9695 u64 saved_r1; /* r1 save for RTAS calls */9796 u64 saved_msr; /* MSR saved here by enter_rtas */9897 u8 proc_enabled; /* irq soft-enable flag */9999-100100- /*101101- * iSeries structure which the hypervisor knows about -102102- * this structure should not cross a page boundary.103103- * The vpa_init/register_vpa call is now known to fail if the104104- * lppaca structure crosses a page boundary.105105- * The lppaca is also used on POWER5 pSeries boxes.106106- * The lppaca is 640 bytes long, and cannot readily change107107- * since the hypervisor knows its layout, so a 1kB108108- * alignment will suffice to ensure that it doesn't109109- * cross a page boundary.110110- */111111- struct lppaca lppaca __attribute__((__aligned__(0x400)));11298};11399114100extern struct paca_struct paca[];
+38-34
include/asm-powerpc/ppc_asm.h
···156156#endif157157158158/* 159159- * LOADADDR( rn, name )160160- * loads the address of 'name' into 'rn'159159+ * LOAD_REG_IMMEDIATE(rn, expr)160160+ * Loads the value of the constant expression 'expr' into register 'rn'161161+ * using immediate instructions only. Use this when it's important not162162+ * to reference other data (i.e. on ppc64 when the TOC pointer is not163163+ * valid).161164 *162162- * LOADBASE( rn, name )163163- * loads the address (possibly without the low 16 bits) of 'name' into 'rn'164164- * suitable for base+disp addressing165165+ * LOAD_REG_ADDR(rn, name)166166+ * Loads the address of label 'name' into register 'rn'. Use this when167167+ * you don't particularly need immediate instructions only, but you need168168+ * the whole address in one register (e.g. it's a structure address and169169+ * you want to access various offsets within it). On ppc32 this is170170+ * identical to LOAD_REG_IMMEDIATE.171171+ *172172+ * LOAD_REG_ADDRBASE(rn, name)173173+ * ADDROFF(name)174174+ * LOAD_REG_ADDRBASE loads part of the address of label 'name' into175175+ * register 'rn'. ADDROFF(name) returns the remainder of the address as176176+ * a constant expression. ADDROFF(name) is a signed expression < 16 bits177177+ * in size, so is suitable for use directly as an offset in load and store178178+ * instructions. Use this when loading/storing a single word or less as:179179+ * LOAD_REG_ADDRBASE(rX, name)180180+ * ld rY,ADDROFF(name)(rX)165181 */166182#ifdef __powerpc64__167167-#define LOADADDR(rn,name) \168168- lis rn,name##@highest; \169169- ori rn,rn,name##@higher; \170170- rldicr rn,rn,32,31; \171171- oris rn,rn,name##@h; \172172- ori rn,rn,name##@l183183+#define LOAD_REG_IMMEDIATE(reg,expr) \184184+ lis (reg),(expr)@highest; \185185+ ori (reg),(reg),(expr)@higher; \186186+ rldicr (reg),(reg),32,31; \187187+ oris (reg),(reg),(expr)@h; \188188+ ori (reg),(reg),(expr)@l;173189174174-#define LOADBASE(rn,name) \175175- ld rn,name@got(r2)190190+#define LOAD_REG_ADDR(reg,name) \191191+ ld (reg),name@got(r2)176192177177-#define OFF(name) 0178178-179179-#define SET_REG_TO_CONST(reg, value) \180180- lis reg,(((value)>>48)&0xFFFF); \181181- ori reg,reg,(((value)>>32)&0xFFFF); \182182- rldicr reg,reg,32,31; \183183- oris reg,reg,(((value)>>16)&0xFFFF); \184184- ori reg,reg,((value)&0xFFFF);185185-186186-#define SET_REG_TO_LABEL(reg, label) \187187- lis reg,(label)@highest; \188188- ori reg,reg,(label)@higher; \189189- rldicr reg,reg,32,31; \190190- oris reg,reg,(label)@h; \191191- ori reg,reg,(label)@l;193193+#define LOAD_REG_ADDRBASE(reg,name) LOAD_REG_ADDR(reg,name)194194+#define ADDROFF(name) 0192195193196/* offsets for stack frame layout */194197#define LRSAVE 16195198196199#else /* 32-bit */197197-#define LOADADDR(rn,name) \198198- lis rn,name@ha; \199199- addi rn,rn,name@l200200201201-#define LOADBASE(rn,name) \202202- lis rn,name@ha201201+#define LOAD_REG_IMMEDIATE(reg,expr) \202202+ lis (reg),(expr)@ha; \203203+ addi (reg),(reg),(expr)@l;203204204204-#define OFF(name) name@l205205+#define LOAD_REG_ADDR(reg,name) LOAD_REG_IMMEDIATE(reg, name)206206+207207+#define LOAD_REG_ADDRBASE(reg, name) lis (reg),name@ha208208+#define ADDROFF(name) name@l205209206210/* offsets for stack frame layout */207211#define LRSAVE 4