Lines Matching +full:used +full:- +full:by +full:- +full:rtas
1 // SPDX-License-Identifier: GPL-2.0-or-later
6 * Copyright (C) 1996-2005 Paul Mackerras.
8 * Adapted for 64bit PowerPC by Dave Engebretsen and Peter Bergner.
34 #include <asm/rtas.h>
46 #include <asm/asm-prototypes.h>
47 #include <asm/ultravisor-api.h>
72 * On ppc32 we compile with -mrelocatable, which means that references
82 * ADDR is used in calls to call_prom. The 4th and following
83 * arguments to call_prom should be 32-bit values.
185 /* Platforms codes are now obsolete in the kernel. Now only used within this
216 * Error results ... some OF calls will return "-1" on error, some
222 #define PROM_ERROR (-1u)
236 return c1 < c2 ? -1 : 1; in prom_strcmp()
249 return -E2BIG; in prom_strscpy_pad()
259 // Rewind by one character to ensure nul termination in prom_strscpy_pad()
260 i--; in prom_strscpy_pad()
261 rc = -E2BIG; in prom_strscpy_pad()
278 return c1 < c2 ? -1 : 1; in prom_strncmp()
281 count--; in prom_strncmp()
292 return sc - s; in prom_strlen()
300 for (su1 = cs, su2 = ct; 0 < count; ++su1, ++su2, count--) in prom_memcmp()
301 if ((res = *su1 - *su2) != 0) in prom_memcmp()
315 l1--; in prom_strstr()
334 count -= dsize; in prom_strlcat()
336 len = count-1; in prom_strlcat()
347 return -EINVAL; in prom_strtobool()
379 return -EINVAL; in prom_strtobool()
435 rets[i-1] = be32_to_cpu(args.args[nargs+i]); in call_prom_ret()
452 call_prom("write", 3, 1, prom.stdout, p, q - p); in prom_print()
470 for (i = nibbles-1; i >= 0; i--) { in prom_print_hex()
473 buf[i] += ('a'-'0'-10); in prom_print_hex()
487 for (i = UL_DIGITS-1; i >= 0; i--) { in prom_print_dec()
494 size = UL_DIGITS - i; in prom_print_dec()
512 call_prom("write", 3, 1, prom.stdout, p, q - p); in prom_printf()
581 prom_print("-"); in prom_printf()
582 vs = -vs; in prom_printf()
604 ret = call_prom_ret("call-method", 5, 2, &result, in prom_claim()
607 if (ret != 0 || result == -1) in prom_claim()
608 return -1; in prom_claim()
609 ret = call_prom_ret("call-method", 5, 2, &result, in prom_claim()
613 call_prom("call-method", 4, 1, ADDR("release"), in prom_claim()
615 return -1; in prom_claim()
618 call_prom("call-method", 6, 1, in prom_claim()
630 * it also causes some sort of double-fault on early pmacs */ in prom_panic()
690 --i; in tohex()
725 #define prom_toupper(c) (prom_islower(c) ? ((c) - 'a' + 'A') : (c))
741 (value = prom_isdigit(*cp) ? *cp - '0' : prom_toupper(*cp) - 'A' + 10) < base) { in prom_strtoul()
780 * Early parsing of the command line passed to the kernel, used for
794 l = prom_getprop(prom.chosen, "bootargs", p, COMMAND_LINE_SIZE-1); in early_cmdline_parse()
861 opt += sizeof("svm=") - 1; in early_cmdline_parse()
871 * followed by # option vectors - 1, followed by the option vectors.
877 /* Firmware expects the value to be n - 1, where n is the # of vectors */
878 #define NUM_VECTORS(n) ((n) - 1)
881 * Firmware expects 1 + n - 2, where n is the length of the option vector in
882 * bytes. The 1 accounts for the length byte itself, the - 2 .. ?
884 #define VECTOR_LENGTH(n) (1 + (n) - 2)
1019 .mask = cpu_to_be32(0xffffffff), /* all 3.1-compliant */
1023 .mask = cpu_to_be32(0xffffffff), /* all 3.00-compliant */
1027 .mask = cpu_to_be32(0xffffffff), /* all 2.07-compliant */
1031 .mask = cpu_to_be32(0xffffffff), /* all 2.06-compliant */
1035 .mask = cpu_to_be32(0xffffffff), /* all 2.05-compliant */
1039 .mask = cpu_to_be32(0xfffffffe), /* all 2.04-compliant and earlier */
1136 /* Old method - ELF header with PT_NOTE sections only works on BE */
1159 char name[24]; /* "IBM,RPA-Client-Config" */
1208 .namesz = sizeof("IBM,RPA-Client-Config"),
1211 .name = "IBM,RPA-Client-Config",
1243 plen = prom_getproplen(node, "ibm,ppc-interrupt-server#s"); in prom_count_smt_threads()
1269 prom_debug("MMU - either supported\n"); in prom_parse_mmu_model()
1270 support->radix_mmu = !prom_radix_disable; in prom_parse_mmu_model()
1271 support->hash_mmu = true; in prom_parse_mmu_model()
1274 prom_debug("MMU - radix only\n"); in prom_parse_mmu_model()
1282 support->radix_mmu = true; in prom_parse_mmu_model()
1285 prom_debug("MMU - hash only\n"); in prom_parse_mmu_model()
1286 support->hash_mmu = true; in prom_parse_mmu_model()
1299 prom_debug("XIVE - either mode supported\n"); in prom_parse_xive_model()
1300 support->xive = !prom_xive_disable; in prom_parse_xive_model()
1303 prom_debug("XIVE - exploitation mode supported\n"); in prom_parse_xive_model()
1311 support->xive = true; in prom_parse_xive_model()
1314 prom_debug("XIVE - legacy mode supported\n"); in prom_parse_xive_model()
1331 support->radix_gtse = !prom_radix_gtse_disable; in prom_parse_platform_support()
1349 "ibm,arch-vec-5-platform-support"); in prom_check_platform_support()
1355 * by __memcpy() when KASAN is active in prom_check_platform_support()
1365 prom_debug("Found ibm,arch-vec-5-platform-support, len: %d\n", in prom_check_platform_support()
1368 prom_printf("WARNING: ibm,arch-vec-5-platform-support longer than expected (len: %d)\n", in prom_check_platform_support()
1370 prom_getprop(prom.chosen, "ibm,arch-vec-5-platform-support", &vec, sizeof(vec)); in prom_check_platform_support()
1378 /* Radix preferred - Check if GTSE is also supported */ in prom_check_platform_support()
1407 /* Check ibm,arch-vec-5-platform-support and fixup vec5 if required */ in prom_send_capabilities()
1425 /* try calling the ibm,client-architecture-support method */ in prom_send_capabilities()
1426 prom_printf("Calling ibm,client-architecture-support..."); in prom_send_capabilities()
1427 if (call_prom_ret("call-method", 3, 2, &ret, in prom_send_capabilities()
1428 ADDR("ibm,client-architecture-support"), in prom_send_capabilities()
1433 prom_printf("\nWARNING: ibm,client-architecture" in prom_send_capabilities()
1434 "-support call FAILED!\n"); in prom_send_capabilities()
1447 /* no ibm,client-architecture-support call, try the old way */ in prom_send_capabilities()
1449 ADDR("/packages/elf-loader")); in prom_send_capabilities()
1451 prom_printf("couldn't open /packages/elf-loader\n"); in prom_send_capabilities()
1454 call_prom("call-method", 3, 1, ADDR("process-elf-header"), in prom_send_capabilities()
1476 * from there, allocations are done this way : rtas is allocated
1477 * topmost, and the device-tree is allocated from the bottom. We try
1478 * to grow the device-tree allocation as we progress. If we can't,
1493 * extending the previous allocation). Used for the device-tree flattening
1525 prom_debug(" -> %lx\n", addr); in alloc_up()
1552 addr = ALIGN_DOWN(alloc_top_high - size, align); in alloc_down()
1570 base = ALIGN_DOWN(alloc_top - size, align); in alloc_down()
1572 base = ALIGN_DOWN(base - 0x100000, align)) { in alloc_down()
1584 prom_debug(" -> %lx\n", addr); in alloc_down()
1605 s--; in prom_next_cell()
1640 size = top - base; in reserve_mem()
1642 if (cnt >= (MEM_RESERVE_MAP_SIZE - 1)) in reserve_mem()
1668 prom_getprop(prom.root, "#address-cells", &val, sizeof(val)); in prom_init_mem()
1671 prom_getprop(prom.root, "#size-cells", &val, sizeof(rsc)); in prom_init_mem()
1702 call_prom("package-to-path", 3, 1, node, prom_scratch, in prom_init_mem()
1703 sizeof(prom_scratch) - 1); in prom_init_mem()
1707 while ((endp - p) >= (rac + rsc)) { in prom_init_mem()
1750 * segment 0 when running non-LPAR. in prom_init_mem()
1754 * reasonable on 32-bit, cap at 768MB on all machines. in prom_init_mem()
1815 rtas_node = call_prom("finddevice", 1, 1, ADDR("/rtas")); in prom_rtas_os_term()
1821 prom_getprop(rtas_node, "ibm,os-term", &val, sizeof(val)); in prom_rtas_os_term()
1823 prom_debug("ibm,os-term: %x\n", token); in prom_rtas_os_term()
1825 prom_panic("Could not get token for ibm,os-term\n"); in prom_rtas_os_term()
1835 * Allocate room for and instantiate RTAS
1847 rtas_node = call_prom("finddevice", 1, 1, ADDR("/rtas")); in prom_instantiate_rtas()
1853 prom_getprop(rtas_node, "rtas-size", &val, sizeof(size)); in prom_instantiate_rtas()
1860 prom_panic("Could not allocate memory for RTAS\n"); in prom_instantiate_rtas()
1862 rtas_inst = call_prom("open", 1, 1, ADDR("/rtas")); in prom_instantiate_rtas()
1864 prom_printf("opening rtas package failed (%x)\n", rtas_inst); in prom_instantiate_rtas()
1868 prom_printf("instantiating rtas at 0x%x...", base); in prom_instantiate_rtas()
1870 if (call_prom_ret("call-method", 3, 2, &entry, in prom_instantiate_rtas()
1871 ADDR("instantiate-rtas"), in prom_instantiate_rtas()
1882 prom_setprop(rtas_node, "/rtas", "linux,rtas-base", in prom_instantiate_rtas()
1885 prom_setprop(rtas_node, "/rtas", "linux,rtas-entry", in prom_instantiate_rtas()
1888 /* Check if it supports "query-cpu-stopped-state" */ in prom_instantiate_rtas()
1889 if (prom_getprop(rtas_node, "query-cpu-stopped-state", in prom_instantiate_rtas()
1893 prom_debug("rtas base = 0x%x\n", base); in prom_instantiate_rtas()
1894 prom_debug("rtas entry = 0x%x\n", entry); in prom_instantiate_rtas()
1895 prom_debug("rtas size = 0x%x\n", size); in prom_instantiate_rtas()
1925 if (prom_getprop(ibmvtpm_node, "ibm,sml-efi-reformat-supported", in prom_instantiate_sml()
1927 if (call_prom_ret("call-method", 2, 2, &succ, in prom_instantiate_sml()
1928 ADDR("reformat-sml-to-efi-alignment"), in prom_instantiate_sml()
1934 if (call_prom_ret("call-method", 2, 2, &size, in prom_instantiate_sml()
1935 ADDR("sml-get-allocated-size"), in prom_instantiate_sml()
1941 if (call_prom_ret("call-method", 2, 2, &size, in prom_instantiate_sml()
1942 ADDR("sml-get-handover-size"), in prom_instantiate_sml()
1957 if (call_prom_ret("call-method", 4, 2, &entry, in prom_instantiate_sml()
1958 ADDR("sml-handover"), in prom_instantiate_sml()
1967 prom_setprop(ibmvtpm_node, "/vdevice/vtpm", "linux,sml-base", in prom_instantiate_sml()
1969 prom_setprop(ibmvtpm_node, "/vdevice/vtpm", "linux,sml-size", in prom_instantiate_sml()
2029 if (prom_getprop(node, "tce-table-minalign", &minalign, in prom_initialize_tce_table()
2032 if (prom_getprop(node, "tce-table-minsize", &minsize, in prom_initialize_tce_table()
2039 * By doing this, we avoid the pitfalls of trying to DMA to in prom_initialize_tce_table()
2052 /* It seems OF doesn't null-terminate the path :-( */ in prom_initialize_tce_table()
2055 if (call_prom("package-to-path", 3, 1, node, in prom_initialize_tce_table()
2056 path, sizeof(prom_scratch) - 1) == PROM_ERROR) { in prom_initialize_tce_table()
2057 prom_printf("package-to-path failed\n"); in prom_initialize_tce_table()
2061 prom_setprop(node, path, "linux,tce-base", &base, sizeof(base)); in prom_initialize_tce_table()
2062 prom_setprop(node, path, "linux,tce-size", &minsize, sizeof(minsize)); in prom_initialize_tce_table()
2069 /* Initialize the table to have a one-to-one mapping in prom_initialize_tce_table()
2086 call_prom("call-method", 6, 0, ADDR("set-64-bit-addressing"), in prom_initialize_tce_table()
2087 phb_node, -1, minsize, in prom_initialize_tce_table()
2092 reserve_mem(local_alloc_bottom, local_alloc_top - local_alloc_bottom); in prom_initialize_tce_table()
2107 * We can't wait until smp_boot_cpus (the OF is trashed by then)
2109 * by the kernel (not OF) before we destroy the OF.
2121 * -- Cort
2125 * 0 - 0x100 address range
2141 * On pseries, if RTAS supports "query-cpu-stopped-state", in prom_hold_cpus()
2142 * we skip this stage, the CPUs will be started by the in prom_hold_cpus()
2143 * kernel using RTAS. in prom_hold_cpus()
2177 /* Skip non-configured cpus. */ in prom_hold_cpus()
2182 reg = cpu_to_be32(-1); /* make sparse happy */ in prom_hold_cpus()
2188 /* Init the acknowledge var which will be reset by in prom_hold_cpus()
2192 *acknowledge = (unsigned long)-1; in prom_hold_cpus()
2195 /* Primary Thread of non-boot cpu or any thread */ in prom_hold_cpus()
2197 call_prom("start-cpu", 3, 0, node, in prom_hold_cpus()
2201 (*acknowledge == ((unsigned long)-1)); i++ ) in prom_hold_cpus()
2253 version[sizeof(version) - 1] = 0; in prom_find_mmu()
2259 call_prom("interpret", 1, 1, "dev /memory 0 to allow-reclaim"); in prom_find_mmu()
2287 call_prom("instance-to-path", 3, 1, prom.stdout, path, 255); in prom_init_stdout()
2289 prom_setprop(prom.chosen, "/chosen", "linux,stdout-path", in prom_init_stdout()
2292 /* instance-to-package fails on PA-Semi */ in prom_init_stdout()
2293 stdout_node = call_prom("instance-to-package", 1, 1, prom.stdout); in prom_init_stdout()
2301 prom_setprop(stdout_node, path, "linux,boot-display", NULL, 0); in prom_init_stdout()
2310 phandle rtas; in prom_find_machine_type() local
2316 compat, sizeof(compat)-1); in prom_find_machine_type()
2333 prom_strstr(p, "IBM,CPBW-1.0")) in prom_find_machine_type()
2342 * - /device_type is "chrp" (please, do NOT use that for future in prom_find_machine_type()
2343 * non-IBM designs ! in prom_find_machine_type()
2344 * - it has /rtas in prom_find_machine_type()
2347 compat, sizeof(compat)-1); in prom_find_machine_type()
2354 rtas = call_prom("finddevice", 1, 1, ADDR("/rtas")); in prom_find_machine_type()
2355 if (!PHANDLE_VALID(rtas)) in prom_find_machine_type()
2357 x = prom_getproplen(rtas, "ibm,hypertas-functions"); in prom_find_machine_type()
2370 return call_prom("call-method", 6, 1, ADDR("color!"), ih, i, b, g, r); in prom_set_color()
2415 /* It seems OF doesn't null-terminate the path :-( */ in prom_check_displays()
2423 if (call_prom("package-to-path", 3, 1, node, path, in prom_check_displays()
2424 sizeof(prom_scratch) - 10) == PROM_ERROR) in prom_check_displays()
2439 * method is available. Should update this to set-colors */ in prom_check_displays()
2455 if (prom_getprop(node, "linux,boot-display", NULL, 0) != in prom_check_displays()
2495 room = alloc_top - alloc_bottom; in make_room()
2527 return s - os; in dt_find_string()
2601 room = *mem_end - *mem_start; in scan_dt_build_struct()
2604 l = call_prom("package-to-path", 3, 1, node, namep, room); in scan_dt_build_struct()
2608 if (l >= *mem_end - *mem_start) in scan_dt_build_struct()
2610 call_prom("package-to-path", 3, 1, node, namep, l); in scan_dt_build_struct()
2631 call_prom("package-to-path", 3, 1, node, path, sizeof(prom_scratch) - 1); in scan_dt_build_struct()
2710 * Check how much room we have between alloc top & bottom (+/- a in flatten_device_tree()
2713 room = alloc_top - alloc_bottom - 0x4000; in flatten_device_tree()
2721 prom_panic("Can't allocate initial device-tree chunk\n"); in flatten_device_tree()
2760 hdr->boot_cpuid_phys = cpu_to_be32(prom.cpu); in flatten_device_tree()
2761 hdr->magic = cpu_to_be32(OF_DT_HEADER); in flatten_device_tree()
2762 hdr->totalsize = cpu_to_be32(dt_struct_end - dt_header_start); in flatten_device_tree()
2763 hdr->off_dt_struct = cpu_to_be32(dt_struct_start - dt_header_start); in flatten_device_tree()
2764 hdr->off_dt_strings = cpu_to_be32(dt_string_start - dt_header_start); in flatten_device_tree()
2765 hdr->dt_strings_size = cpu_to_be32(dt_string_end - dt_string_start); in flatten_device_tree()
2766 hdr->off_mem_rsvmap = cpu_to_be32(((unsigned long)rsvmap) - dt_header_start); in flatten_device_tree()
2767 hdr->version = cpu_to_be32(OF_DT_VERSION); in flatten_device_tree()
2769 hdr->last_comp_version = cpu_to_be32(0x10); in flatten_device_tree()
2779 prom_printf(" %llx - %llx\n", in flatten_device_tree()
2789 prom_printf("Device tree strings 0x%lx -> 0x%lx\n", in flatten_device_tree()
2791 prom_printf("Device tree struct 0x%lx -> 0x%lx\n", in flatten_device_tree()
2840 /* The values for memory-controller don't have right number of cells */
2855 prom_getprop(prom.root, "#address-cells", &ac, sizeof(ac)); in fixup_device_tree_maple_memory_controller()
2856 prom_getprop(prom.root, "#size-cells", &sc, sizeof(sc)); in fixup_device_tree_maple_memory_controller()
2922 prom_printf("Fixing up IDE class-code on Pegasos...\n"); in fixup_device_tree_chrp()
2923 rc = prom_getprop(ph, "class-code", prop, sizeof(u32)); in fixup_device_tree_chrp()
2926 prom_setprop(ph, name, "class-code", prop, sizeof(u32)); in fixup_device_tree_chrp()
2954 if (prom_getprop(u3, "device-rev", &u3_rev, sizeof(u3_rev)) in fixup_device_tree_pmac()
2971 prom_setprop(i2c, "/u3@0,f8000000/i2c@f8001000", "interrupt-parent", in fixup_device_tree_pmac()
2980 * The MPC5200 FEC driver requires an phy-handle property to tell it how
2981 * to talk to the phy. If the phy-handle property is missing, then this
2991 /* Check if /builtin/ethernet exists - bail if it doesn't */ in fixup_device_tree_efika_add_phy()
2996 /* Check if the phy-handle property exists - bail if it does */ in fixup_device_tree_efika_add_phy()
2997 rv = prom_getprop(node, "phy-handle", prop, sizeof(prop)); in fixup_device_tree_efika_add_phy()
3006 /* Check for an MDIO bus node - if missing then create one */ in fixup_device_tree_efika_add_phy()
3011 " s\" /builtin\" find-device" in fixup_device_tree_efika_add_phy()
3012 " new-device" in fixup_device_tree_efika_add_phy()
3013 " 1 encode-int s\" #address-cells\" property" in fixup_device_tree_efika_add_phy()
3014 " 0 encode-int s\" #size-cells\" property" in fixup_device_tree_efika_add_phy()
3015 " s\" mdio\" device-name" in fixup_device_tree_efika_add_phy()
3016 " s\" fsl,mpc5200b-mdio\" encode-string" in fixup_device_tree_efika_add_phy()
3019 " 0x2 encode-int" in fixup_device_tree_efika_add_phy()
3020 " 0x5 encode-int encode+" in fixup_device_tree_efika_add_phy()
3021 " 0x3 encode-int encode+" in fixup_device_tree_efika_add_phy()
3023 " finish-device"); in fixup_device_tree_efika_add_phy()
3026 /* Check for a PHY device node - if missing then create one and in fixup_device_tree_efika_add_phy()
3029 ADDR("/builtin/mdio/ethernet-phy")); in fixup_device_tree_efika_add_phy()
3033 " s\" /builtin/mdio\" find-device" in fixup_device_tree_efika_add_phy()
3034 " new-device" in fixup_device_tree_efika_add_phy()
3035 " s\" ethernet-phy\" device-name" in fixup_device_tree_efika_add_phy()
3036 " 0x10 encode-int s\" reg\" property" in fixup_device_tree_efika_add_phy()
3037 " my-self" in fixup_device_tree_efika_add_phy()
3039 " finish-device" in fixup_device_tree_efika_add_phy()
3040 " s\" /builtin/ethernet\" find-device" in fixup_device_tree_efika_add_phy()
3041 " encode-int" in fixup_device_tree_efika_add_phy()
3042 " s\" phy-handle\" property" in fixup_device_tree_efika_add_phy()
3043 " device-end"); in fixup_device_tree_efika_add_phy()
3107 /* Make sure ethernet phy-handle property exists */ in fixup_device_tree_efika()
3118 * Add an interrupt-controller property for the io-bridge to use
3133 /* check if interrupt-controller node set yet */ in fixup_device_tree_pasemi()
3134 if (prom_getproplen(iob, "interrupt-controller") !=PROM_ERROR) in fixup_device_tree_pasemi()
3137 prom_printf("adding interrupt-controller property for SB600...\n"); in fixup_device_tree_pasemi()
3139 prom_setprop(iob, name, "interrupt-controller", &val, 0); in fixup_device_tree_pasemi()
3158 /* found a node, update both interrupts and interrupt-parent */ in fixup_device_tree_pasemi()
3160 interrupts[0] -= 203; in fixup_device_tree_pasemi()
3162 interrupts[0] -= 213; in fixup_device_tree_pasemi()
3170 prom_setprop(node, pci_name, "interrupt-parent", &parent, in fixup_device_tree_pasemi()
3175 * The io-bridge has device_type set to 'io-bridge' change it to 'isa' in fixup_device_tree_pasemi()
3176 * so that generic isa-bridge code can add the SB600 and its on-board in fixup_device_tree_pasemi()
3179 name = "/pxp@0,e0000000/io-bridge@0"; in fixup_device_tree_pasemi()
3215 cpu_pkg = call_prom("instance-to-package", 1, 1, prom_cpu); in prom_find_boot_cpu()
3236 prom_setprop(prom.chosen, "/chosen", "linux,initrd-start", in prom_check_initrd()
3239 prom_setprop(prom.chosen, "/chosen", "linux,initrd-end", in prom_check_initrd()
3243 prom_initrd_end - prom_initrd_start); in prom_check_initrd()
3281 * relocated it so the check will fail. Restore the original image by in setup_secure_guest()
3322 memset(&__bss_start, 0, __bss_stop - __bss_start); in prom_init()
3407 * On non-powermacs, try to instantiate RTAS. PowerMacs don't in prom_init()
3408 * have a usable RTAS implementation. in prom_init()
3419 * On non-powermacs, put all CPUs in spin-loops. in prom_init()
3423 * (This must be done after instantiating RTAS) in prom_init()
3429 * Fill in some infos for use by the kernel later on in prom_init()
3433 prom_setprop(prom.chosen, "/chosen", "linux,memory-limit", in prom_init()
3438 prom_setprop(prom.chosen, "/chosen", "linux,iommu-off", in prom_init()
3442 prom_setprop(prom.chosen, "/chosen", "linux,iommu-force-on", in prom_init()
3446 prom_setprop(prom.chosen, "/chosen", "linux,tce-alloc-start", in prom_init()
3449 prom_setprop(prom.chosen, "/chosen", "linux,tce-alloc-end", in prom_init()
3456 * Fixup any known bugs in the device-tree in prom_init()
3461 * Now finally create the flattened device-tree in prom_init()
3489 prom_debug("->dt_header_start=0x%lx\n", hdr); in prom_init()
3492 reloc_got2(-offset); in prom_init()