Page 51 of 123 FirstFirst ... 41495051525361101 ... LastLast
Results 501 to 510 of 1226

Thread: grub2 EFI boot loader internal/external booting

  1. #501
    Join Date
    Apr 2006
    Beans
    Hidden!
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: grub2 EFI boot loader internal/external booting

    Quote Originally Posted by bean123 View Post
    First, we need to know which module handle the agp. You can browse through the /sys/devices/ directory and see if you can locate the host bus for agp. If you're not sure, please post the output from lspci.
    This is all I can see, on MBP41 with agp running.
    Code:
    pxw@mbp:~$ lsmod | grep -e agp -e nv
    mbp_nvidia_bl           9988  0 
    nvidia               6909268  28 
    i2c_core               31892  1 nvidia
    intel_agp              33724  0 
    agpgart                42184  2 nvidia,intel_agp
    pxw@mbp:~$ 
    
    ---------------
    pxw@mbp:~$ sudo lspci -k > lspci-k
    00:00.0 Host bridge: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub (rev 03)
    	Kernel modules: intel-agp
    00:01.0 PCI bridge: Intel Corporation Mobile PM965/GM965/GL960 PCI Express Root Port (rev 03)
    	Kernel driver in use: pcieport-driver
    	Kernel modules: shpchp
    00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4 (rev 04)
    	Kernel driver in use: uhci_hcd
    	Kernel modules: uhci-hcd
    00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 04)
    	Kernel driver in use: uhci_hcd
    	Kernel modules: uhci-hcd
    00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 04)
    	Kernel driver in use: ehci_hcd
    	Kernel modules: ehci-hcd
    00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 04)
    	Kernel driver in use: HDA Intel
    	Kernel modules: snd-hda-intel
    00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 04)
    	Kernel driver in use: pcieport-driver
    	Kernel modules: shpchp
    00:1c.2 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 3 (rev 04)
    	Kernel driver in use: pcieport-driver
    	Kernel modules: shpchp
    00:1c.4 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 5 (rev 04)
    	Kernel driver in use: pcieport-driver
    	Kernel modules: shpchp
    00:1c.5 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 6 (rev 04)
    	Kernel driver in use: pcieport-driver
    	Kernel modules: shpchp
    00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 04)
    	Kernel driver in use: uhci_hcd
    	Kernel modules: uhci-hcd
    00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 04)
    	Kernel driver in use: uhci_hcd
    	Kernel modules: uhci-hcd
    00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 04)
    	Kernel driver in use: uhci_hcd
    	Kernel modules: uhci-hcd
    00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 04)
    	Kernel driver in use: ehci_hcd
    	Kernel modules: ehci-hcd
    00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f4)
    00:1f.0 ISA bridge: Intel Corporation 82801HEM (ICH8M) LPC Interface Controller (rev 04)
    	Kernel modules: iTCO_wdt
    00:1f.1 IDE interface: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) IDE Controller (rev 04)
    	Kernel driver in use: ata_piix
    	Kernel modules: ata_piix
    00:1f.2 IDE interface: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA IDE Controller (rev 04)
    	Kernel driver in use: ata_piix
    	Kernel modules: ata_piix
    00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 04)
    	Kernel modules: i2c-i801
    01:00.0 VGA compatible controller: nVidia Corporation GeForce 8600M GT (rev a1)
    	Kernel driver in use: nvidia
    	Kernel modules: nvidia, nvidiafb
    0b:00.0 Network controller: Broadcom Corporation BCM4328 802.11a/b/g/n (rev 05)
    	Kernel driver in use: wl
    	Kernel modules: wl, ssb
    0c:00.0 Ethernet controller: Marvell Technology Group Ltd. Marvell Yukon 88E8058 PCI-E Gigabit Ethernet Controller (rev 13)
    	Kernel driver in use: sky2
    	Kernel modules: sky2
    0d:03.0 FireWire (IEEE 1394): Texas Instruments TSB82AA2 IEEE-1394b Link Layer Controller (rev 02)
    	Kernel driver in use: ohci1394
    	Kernel modules: ohci1394
    
    -------------
    pxw@mbp:~$ ls -l /sys/devices/pci0000\:00/0000:00:00.0 > sysdevpci
    
    total 0
    -rw-r--r-- 1 root root 4096 2009-03-25 23:55 broken_parity_status
    -r--r--r-- 1 root root 4096 2009-03-25 23:36 class
    -rw-r--r-- 1 root root  256 2009-03-25 23:40 config
    -r--r--r-- 1 root root 4096 2009-03-25 23:36 device
    -rw------- 1 root root 4096 2009-03-25 23:55 enable
    lrwxrwxrwx 1 root root    0 2009-03-25 23:55 firmware_node -> ../../LNXSYSTM:00/device:00/PNP0A08:00/PNP0C02:00
    -r--r--r-- 1 root root 4096 2009-03-25 23:45 irq
    -r--r--r-- 1 root root 4096 2009-03-25 23:55 local_cpulist
    -r--r--r-- 1 root root 4096 2009-03-25 23:55 local_cpus
    -r--r--r-- 1 root root 4096 2009-03-25 23:55 modalias
    -rw-r--r-- 1 root root 4096 2009-03-25 23:55 msi_bus
    drwxr-xr-x 2 root root    0 2009-03-25 23:55 power
    -r--r--r-- 1 root root 4096 2009-03-25 23:40 resource
    lrwxrwxrwx 1 root root    0 2009-03-25 23:36 subsystem -> ../../../bus/pci
    -r--r--r-- 1 root root 4096 2009-03-25 23:36 subsystem_device
    -r--r--r-- 1 root root 4096 2009-03-25 23:36 subsystem_vendor
    -rw-r--r-- 1 root root 4096 2009-03-25 23:36 uevent
    -r--r--r-- 1 root root 4096 2009-03-25 23:36 vendor
    --------------

  2. #502
    Join Date
    May 2007
    Beans
    465

    Re: grub2 EFI boot loader internal/external booting

    Quote Originally Posted by pxwpxw View Post
    This is all I can see, on MBP41 with agp running.
    [code]
    pxw@mbp:~$ lsmod | grep -e agp -e nv
    mbp_nvidia_bl 9988 0
    nvidia 6909268 28
    i2c_core 31892 1 nvidia
    intel_agp 33724 0
    agpgart 42184 2 nvidia,intel_agp
    pxw@mbp:~$
    Oh, it seems your agp is still intel, I wonder why it doesn't show in the log file.

    Perhaps you can try the needs_scratch_page trick and see if it works.

  3. #503
    Join Date
    May 2007
    Beans
    465

    Re: grub2 EFI boot loader internal/external booting

    Hi,

    I've send a new patch to grub-devel. It cleanup the code a little bit, and move some stuff out of the linux loader.

    There are two new module, loadbios and memrw.

    loadbios contains the command fakebios and loadbios. fakebios is used to fake acpi and dmi information. loadbios allows you to load a video rom from external file. loadbios fakes acpi and dmi as well, so you don't need to call fakebios again.

    memrw contains command write_dword. loadbios doesn't load IVT anymore, you need to get the INT10 address and write to memory address 0x40 using write_dword.

  4. #504
    Join Date
    May 2007
    Beans
    465

    Re: grub2 EFI boot loader internal/external booting

    Hi,

    The console screen problem is actually easier to fix than I thought. It turns out that efi uses pipeline B, which corresponds to the GART mapping at 0x4000. The mapping is controlled by video register DSPBSURF. When I set its value to 0, it uses GART at offset 0, and therefore no conflict with agp allocation.

    This new grub.efi add a command fix_video, which patch video register mentioned above. The operation is card specific, so I need to check for graphic card before doing anything. Currently it only support Intel 965GM, if you see the "Unknown graphic card" error, please report the device id on screen.

    With fix_video, I can boot to console mode with agp enabled. X.org driver may still need vbios and INT10 vector. There is a small catch though. If you go back to console mode from X-Window, the screen would have problem. This is because efi only use pipeline B, pipeline A is not initialized. When X-windows exits, it just resume output at pipeline A, therefore causing the problem.
    Attached Files Attached Files

  5. #505
    Join Date
    May 2007
    Beans
    465

    Re: grub2 EFI boot loader internal/external booting

    BTW, for intel graphic card 910 - 965, video register DSPBSURF is at fixed location. You can try modifying it manually.

    First, you should run linux with video=efifb option to see the PCI configuration, it should look something like this:

    MMIO(0): 0x50100000
    VMEM(2): 0x40000000

    The mmio base is 0x50100000, adding DSPBSURF offset 0x7119C, we have 0x5017119C, we read the original value first:
    Code:
    read_dword 0x5017119C
    The value should be 0x1000000, if it's not, stop right now.

    Use write_dword to change its value to 0:
    Code:
    write_dword 0x5017119C 0
    Read it back, its value should be 0 now:
    Code:
    read_dword 0x5017119C
    Then, continue the loading of linux. If all goes well, you should be able to boot to console mode with agp enabled.

    Oh BTW, from the x.org source code, I think the video register offset for radeonhd could be one of these:

    D1GRPH_PRIMARY_SURFACE_ADDRESS = 0x6110,
    D1GRPH_SECONDARY_SURFACE_ADDRESS = 0x6118,
    D2GRPH_PRIMARY_SURFACE_ADDRESS = 0x6910,

    pxwpxw, could you check it out ?
    Last edited by bean123; March 25th, 2009 at 09:17 PM.

  6. #506
    Join Date
    Apr 2006
    Beans
    Hidden!
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: grub2 EFI boot loader internal/external booting

    Quote Originally Posted by bean123 View Post
    Hi,

    The console screen problem is actually easier to fix than I thought. It turns out that efi uses pipeline B, which corresponds to the GART mapping at 0x4000. The mapping is controlled by video register DSPBSURF. When I set its value to 0, it uses GART at offset 0, and therefore no conflict with agp allocation.

    This new grub.efi add a command fix_video, which patch video register mentioned above. The operation is card specific, so I need to check for graphic card before doing anything. Currently it only support Intel 965GM, if you see the "Unknown graphic card" error, please report the device id on screen.

    With fix_video, I can boot to console mode with agp enabled. X.org driver may still need vbios and INT10 vector. There is a small catch though. If you go back to console mode from X-Window, the screen would have problem. This is because efi only use pipeline B, pipeline A is not initialized. When X-windows exits, it just resume output at pipeline A, therefore causing the problem.
    Getting an error

    grub32.efi #504 on MacBook21
    Code:
    Welcome to GRUB!
    
    the symbol 'grub_register_command' not found
    
    Aborted

  7. #507
    Join Date
    May 2007
    Beans
    465

    Re: grub2 EFI boot loader internal/external booting

    Hi,

    This is another update, it contains the following changes with regards to the previous one:

    1, Move loadbios command to commands/efi directory.
    2, loadbios support an optional second parameter which is the int10 vector dump file.
    3, The linux command enables frame buffer by default, so you don't need video= option anymore.
    4. New command fix_video to fix video register issue with efi. With this, you can boot to console mode with agp enabled.
    5, New shell script grub-dumpbios which can be used to generate the bios dump from pc mode.

    As the commands usage have changed in the previous patches, here is a summary of what you should do with this latest patch:

    1, Boot without bios dump.

    This is the commands to use:

    search --set /vmlinuz
    fix_video
    fakebios
    linux /vmlinuz root=/dev/sdb1
    initrd /initrd.img

    2, Boot with bios dump.

    First, boot to pc mode, then use script grub-dumpbios to generate the dump files:

    sudo grub-dumpbios -o /boot/

    video bios dump is in vbios.bin, int10 vector is in int10.bin. /boot/ is the output directory.

    Then, use the following commands in grub2:
    search --set /vmlinuz
    fix_video
    loadbios /boot/vbios.bin /boot/int10.bin
    linux /vmlinuz root=/dev/sdb1
    initrd /initrd.img

    Moreover, if you're booting 2.6.27-28, amd64 kernel, you need to add noefi option.

    The source has been uploaded to grub-devel
    Attached Files Attached Files

  8. #508
    Join Date
    Apr 2006
    Beans
    Hidden!
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: grub2 EFI boot loader internal/external booting

    Quote Originally Posted by bean123 View Post
    Hi,

    This is another update, it contains the following changes with regards to the previous one:
    Test 1.

    imac81 booted grub64-507, posting from xubuntu810 x86 agp desktop.
    I will post menuentry when back in OSX.

    Boot messages - (part)

    Unknown graphics card 9583 1002
    UMEM(0) 0xc0000000
    MMIO(2) 0xd0520000

    No console text, just GUI login.

    Code:
    pxw@im81:~$ cat /proc/cmdline 
    BOOT_IMAGE=/vmlinuz root=/dev/sda4 single
    pxw@im81:~$ grep Driver /etc/X11/xorg.conf
    	Driver	"fglrx"
    
    pxw@im81:~$ lspci -nn | grep VGA
    01:00.0 VGA compatible controller [0300]: ATI Technologies Inc M76XT 
    [Mobility Radeon HD 2600 XT] [1002:9583]
    pxw@im81:~$
    Added to this post from OSX

    Used this, after grub-dumpbios -o /boot/ in pc mode

    Code:
    menuentry "loadbios hd0,4 sda4" {
    	root=hd0,4
    	fix_video
    	loadbios /boot/vbios.bin /boot/int10.bin
    	sleep 1
    	root=hd0,4
    	linux /vmlinuz root=/dev/sda4 single
    	initrd /initrd.img
    }
    Don't know if sleep is needed now, not tried yet.

    --------------------------

    I was still catching up on your previous posts but I will do other checks on this #507 version now.

    I will just be off for an hour or so.
    Last edited by pxwpxw; March 26th, 2009 at 11:03 AM.

  9. #509
    Join Date
    May 2007
    Beans
    465

    Re: grub2 EFI boot loader internal/external booting

    Quote Originally Posted by pxwpxw View Post
    Test 1.

    imac81 booted grub64-507, posting from xubuntu810 x86 agp desktop.
    I will post menuentry when back in OSX.

    Boot messages - (part)

    Unknown graphics card 9583 1002
    UMEM(0) 0xc0000000
    MMIO(2) 0xd0520000
    In your mb81, what's the result of these commands ?

    read_dword oxd0526110
    read_dword oxd0526118
    read_dword 0xd0526910

    For mb21, try the steps at #505, it should fix the screen problem.

  10. #510
    Join Date
    Apr 2006
    Beans
    Hidden!
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: grub2 EFI boot loader internal/external booting

    IMAC81

    Code:
    read_dword 0xd0526110
    0x10000
    read_dword 0xd0526118
    0x0
    read_dword 0xd0526910
    0x0
    Last edited by pxwpxw; March 26th, 2009 at 12:58 PM. Reason: o0

Page 51 of 123 FirstFirst ... 41495051525361101 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •