grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] xnu


From: Joey Korkames
Subject: Re: [PATCH] xnu
Date: Fri, 24 Apr 2009 12:25:04 -0700

Vladimir Serbinenko writes:

<< HTML content follows >>
Your FSB wasn't detected correctly (or rather not detected at all, what's your CPU?). The actual bug is that if fsb frequency is too low the kernel will crash when trying to use 64-bit mode (you can use -legacy parameter to put xnu in 32-bit mode). You need to specify fsb with a variable. Can you come to <URL:http://irc.freenode.net#grub>irc.freenode.net#grub ?
(e.g. for 200Mhz: set fsb=200).


Correct you are, It was a Intel Xeon L5410. http://en.wikipedia.org/wiki/Xeon tells me it is a fsb=1333 and now the boot gets to where it was on the first patch. Boot log at bottom. My ramdisk isn't fully populated yet so the launchd error is not (necessarily) a bug.

I'm lurking on #grub as joeykork.


On Fri, Apr 24, 2009 at 2:41 AM, Joey Korkames <<URL:mailto:address@hidden>address@hidden> wrote:

This patch did not work as well as the last one posted (on my test machine). The last one got all the way to trying to run /sbin/launchd off the ramdisk - log post of this one's boot attempt are attached. Oh, here is my updated menuentry, works well and gives me serial output of the darwin kernel (as well as on the VGA monitor): menuentry "PureDarwin 9 (phcoder efiemu)" {
         echo "Switching to VESA and booting Darwin (slow)... "
         #bootloader must tickle VESA before xnu can use it
      loadfont /osstore/STAGE1a/grub2/unifont.pf2
         set gfxmode="800x600x32"
         set vbe_mode=0x115
         terminal_output gfxterm
         echo "VESA enabled. Booting Darwin (slow)... "
      #efiemu_loadcore /osstore/STAGE1a/grub2/efiemu64.o       efiemu_loadcore /osstore/STAGE1a/grub2/efiemu32.o
         efiemu_pnvram
         efiemu_prepare
        xnu_kernel /osstore/STAGE2/DARWIN/live/mach_kernel -s -f debug=0x08 serial=2 serialbaud=9600 rd=md0

-f parameter isn't actually used. Use xnu_kextdir if you don't want to use  mkext

Ok, dropping the -f. I don't think xnu_kextdir will work with (pxefs).


      xnu_mkext /osstore/STAGE2/DARWIN/live/System/Library/Extensions.mkext
         xnu_ramdisk /osstore/STAGE2/DARWIN/ramdisk.hfs
#       ^^30MB too big? (full /System/Library/Extensions) - yes, box will reboot before kernel turnover

Can you give more info about it

I'll test again, that conclusion was before I had a stable menuentry. But 
basically,
putting a full /System/Library/Extensions folder from a PureDarwin iso into my 
ramdisk caused my
machine to reboot itself (triple-fault?) before I saw any kernel printfs.


Boot log:
----------
Switching to VESA and booting Darwin (slow)...
Serial mode specified: 00000002
version_variant = 0
version         = Darwin Kernel Version 9.5.0: Thu Sep 18 14:14:00 PDT 2008; 
root:xnu-1228.7.58.obj/RELEASE_I386
EM64T supported and will be enabled
EFI region: type = 7/7,  base = 0x0,  top = 0x88
EFI region: type = 8/8,  base = 0x89,  top = 0x9f
EFI region: type = 8/8,  base = 0xca,  top = 0xcb
EFI region: type = 8/8,  base = 0xe4,  top = 0xff
EFI region: type = 7/7,  base = 0x100,  top = 0x9bfbc
EFI region: type = 5/5,  base = 0x9bfbd,  top = 0x9bfbd
EFI region: type = 6/6,  base = 0x9bfbe,  top = 0x9bfc0
EFI region: type = 7/7,  base = 0x9bfc1,  top = 0xcff4f
EFI region: type = 9/9,  base = 0xcff50,  top = 0xcff5d
EFI region: type = 10/10,  base = 0xcff5e,  top = 0xcff5e
EFI region: type = 8/8,  base = 0xcff5f,  top = 0xcff7f
EFI region: type = 8/8,  base = 0xcff80,  top = 0xcffff
EFI region: type = 8/8,  base = 0xe0000,  top = 0xeffff
EFI region: type = 8/8,  base = 0xfec00,  top = 0xfec0f
EFI region: type = 8/8,  base = 0xfee00,  top = 0xfee00
EFI region: type = 8/8,  base = 0xff000,  top = 0xfffff
Physical memory 3328 MB
HIGH_MEM_BASE 0xffe00000 fixed per-cpu begin 0xffe17000
tramp: 0xffe00000, GDT: 0xffe02000, LDT: 0xffe04000, IDT: 0xffe03000, KTSS: 
0xffe14000, DFTSS: 0xffe15000
MCTSS: 0xffe15000
gdt/idt reloaded, tr reset to KERNEL_TSS
Kernel virtual space from 0x0 to 0xfe7fffff.
64 bit mode enabled
Available physical space from 0x1058000 to 0xcff4f000
EFI_FSB_frequency: read FSBFrequency value: 1333000000
BUS: Frequency =   1333.0000MHz, cvtt2n = 00000000.C00C4A83, cvtn2t = 
00000001.553F7CEE, cvtInt = 000B726B.8BFE44F9
TSC: Frequency =   9331.0019MHz, cvtt2n = 00000000.1B6F785B, cvtn2t = 
00000009.54BC6AD2, gran = 7
RCBA: vaddr = 0106E000, paddr = FED1C001
HPET: vaddr = 01072000, paddr = FED00000
HPET: Frequency =     14.318179MHz, cvtt2n = 00000045.D75E0F7F, cvtn2t = 
00000000.03AA5B32
initialize_screen: b=DC000000, w=00000320, h=00000258, r=00000C80, d=00000001
pmap_steal_memory: 0124B000 - 0124C000; size=00001000
pmap_steal_memory: 0124C000 - 016BF000; size=00473000
pmap_steal_memory: 016BF000 - 016CC000; size=0000D000
pmap_steal_memory: 016CC000 - 01ACC000; size=00400000
pmap_steal_memory: 01ACC000 - 03DE6608; size=0231A608
CPU identification: Intel(R) Xeon(R) CPU           L5410  @ 2.33GHz
CPU features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT 
PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM SSE3 MON DSCPL VMX EST TM2 
SSSE3 CX16 TPR PDCM SSE4.1
 HTT: 4 cores per package; 4 logical cpus per package
CPU extended features: XD EM64T
Initializing EFI runtime services
Boot args version 1 revision 4 mode 32
Processing 32-bit EFI tables at 0x9bfbe060
RuntimeServices table at 0x9bfbe000
MSR_IA32_APIC_BASE 0xfee00000 enabled BSP
Boot cpu local APIC id 0x0
[RTCLOCK] frequency 9330000000 (9331000019)
maxDec: 1611015488
Kernel boot args: '-s -f debug=0x08 serial=2 serialbaud=9600 rd=md0'
ACPI: RSDP @ 0xf5a50/0x0024 (v002 PTLTD )
ACPI: XSDT @ 0xcff55a96/0x0094 (v001 PTLTD       XSDT   0x06040000  LTP 
0x00000000)
ACPI: FACP @ 0xcff5dd9c/0x00F4 (v003 INTEL  SANCLMNT 0x06040000 PTL  0x00000003)
ACPI: DSDT @ 0xcff575fc/0x671C (v001  Intel SANCLMNT 0x06040000 MSFT 0x03000001)
ACPI: FACS @ 0xcff5efc0/0x0040
ACPI: APIC @ 0xcff5de90/0x00BC (v001 PTLTD       APIC   0x06040000  LTP 
0x00000000)
ACPI: MCFG @ 0xcff5df4c/0x003C (v001 PTLTD    MCFG   0x06040000  LTP 0x00000000)
ACPI: BOOT @ 0xcff5df88/0x0028 (v001 PTLTD  $SBFTBL$ 0x06040000  LTP 0x00000001)
ACPI: SPCR @ 0xcff5dfb0/0x0050 (v001 PTLTD  $UCRTBL$ 0x06040000 PTL  0x00000001)
ACPI: SSDT @ 0xcff5739d/0x025F (v001  PmRef  Cpu0Tst 0x00003000 INTL 0x20061109)
ACPI: SSDT @ 0xcff572f7/0x00A6 (v001  PmRef  Cpu7Tst 0x00003000 INTL 0x20061109)
ACPI: SSDT @ 0xcff57251/0x00A6 (v001  PmRef  Cpu6Tst 0x00003000 INTL 0x20061109)
ACPI: SSDT @ 0xcff571ab/0x00A6 (v001  PmRef  Cpu5Tst 0x00003000 INTL 0x20061109)
ACPI: SSDT @ 0xcff57105/0x00A6 (v001  PmRef  Cpu4Tst 0x00003000 INTL 0x20061109)
ACPI: SSDT @ 0xcff5705f/0x00A6 (v001  PmRef  Cpu3Tst 0x00003000 INTL 0x20061109)
ACPI: SSDT @ 0xcff56fb9/0x00A6 (v001  PmRef  Cpu2Tst 0x00003000 INTL 0x20061109)
ACPI: SSDT @ 0xcff56f13/0x00A6 (v001  PmRef  Cpu1Tst 0x00003000 INTL 0x20061109)
ACPI: SSDT @ 0xcff55b2a/0x13E9 (v001  PmRef    CpuPm 0x00003000 INTL 0x20061109)
cpu_data_alloc(1) 0x463c6000 desc_table: 0x4ef45000 ldt: 0x4ef48000 int_stack: 
0x4ef41000-0x4ef45000
cpu_data_alloc(2) 0x463dd000 desc_table: 0x4ef70000 ldt: 0x4ef73000 int_stack: 
0x4ef6c000-0x4ef70000
cpu_data_alloc(3) 0x4ef32000 desc_table: 0x4ef9b000 ldt: 0x4ef9e000 int_stack: 
0x4ef97000-0x4ef9b000
cpu_data_alloc(4) 0x4efc4000 desc_table: 0x4efc9000 ldt: 0x4efcc000 int_stack: 
0x4efc5000-0x4efc9000
cpu_data_alloc(5) 0x4eff4000 desc_table: 0x4eff9000 ldt: 0x4effc000 int_stack: 
0x4eff5000-0x4eff9000
cpu_data_alloc(6) 0x4f024000 desc_table: 0x4f029000 ldt: 0x4f02c000 int_stack: 
0x4f025000-0x4f029000
cpu_data_alloc(7) 0x4f054000 desc_table: 0x4f059000 ldt: 0x4f05c000 int_stack: 
0x4f055000-0x4f059000
cpu_datap(1):0x463dd000 local apic id 0x1 remapped from 2
cpu_datap(2):0x4efc4000 local apic id 0x2 remapped from 4
cpu_datap(3):0x4f024000 local apic id 0x3 remapped from 6
cpu_datap(4):0x463c6000 local apic id 0x4 remapped from 1
cpu_datap(5):0x4ef32000 local apic id 0x5 remapped from 3
cpu_datap(6):0x4eff4000 local apic id 0x6 remapped from 5
Started cpu 1 (lapic id 00000001)
Started cpu 2 (lapic id 00000002)
Started cpu 3 (lapic id 00000003)
Started cpu 4 (lapic id 00000004)
Started cpu 5 (lapic id 00000005)
Started cpu 6 (lapic id 00000006)
Started cpu 7 (lapic id 00000007)
bsd_autoconf: calling kminit
Serial keyboard started
panic(cpu 3 caller 0x0036FE27): "Process 1 exec of /sbin/launchd failed, errno 
2\n"@/Volumes/work/darwin/9F33-roots/BuildRoot/SourceCache/xnu/xnu-1228.7.58/bsd/kern/kern_exec.c:2885
Debugger called: <panic>
Backtrace (CPU 3), Frame : Return Address (4 potential args on stack)
0x4f1abe48 : 0x12b0fa (0x4598d8 0x4f1abe7c 0x133243 0x0)
0x4f1abe98 : 0x36fe27 (0x498bac 0x5196e4 0x2 0x0)
0x4f1abef8 : 0x3518d8 (0x53cac50 0x7e 0x52dcdac 0x80000001)
0x4f1abf38 : 0x37f30a (0x52e8ba0 0x8b0af0b4 0x1a236f 0x52e8c7c)
0x4f1abf68 : 0x1291aa (0x52e8ba0 0x
--------------------
(serial stopped here)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]