How to disable ACPI today with the lastest release of FreeBSD.

Hello to everyone. It's again me. I'm trying to understand what are the statement that I should put into the right configuration files to disable totally the acpi,since it seems that it is needed to boot the cdrom with freebsd with qemu and kvm. (for more informations about this,give a look at this post :


I've googled between the sites and I found that these arguments could be put inside these configuration files. What I don't know,is what's changed from the past freebsd releases until the latest one ? I suppose that most of the statements below have been suppressed,but for a newbie like me it's hard to know what's useful and what's not,since in internet there are a lot of unordered and contradictory informations :


Code:
a) /boot/loader.conf:

debug.acpi.disabled="thermal"
debug.acpi.disabled ="hostres"
hint.acpi.0.disabled="1"
hint.p4tcc.0.disabled=1
hint.acpi_throttle.0.disabled=1


b) in /boot/device.hints add:

hint.acpi.0.disabled="1"


c) in /boot/defaults/loader.conf make sure:

acpi_dsdt_load="NO"
acpi_dsdt_type="acpi_dsdt"
acpi_dsdt_name="/boot/acpi_dsdt.aml"
acpi_video_load="NO"
 
Kernel environment,
Code:
kenv | grep -i acpi
sysctl settings,
Code:
sysctl -a | grep -i acpi
If you want to disable ACPI simply add hint.acpi.0.disabled="1" to /boot/device.hints.
You can disable ACPI temporarily at the boot loader prompt by issuing unset acpi_load if you are having problems booting an ACPI enabled machine.
 
Code:
CPU  0: ARM Cortex-A57 r1p1 affinity:  0                                                                              
                   Cache Type = <64 byte D-cacheline,64 byte I-cacheline,PIPT ICache,64 byte ERG,64 byte CWG>         
 Instruction Set Attributes 0 = <CRC32,SHA2,SHA1,AES+PMULL>                                                           
 Instruction Set Attributes 1 = <>                                                                                    
         Processor Features 0 = <AdvSIMD,FP,EL3 32,EL2 32,EL1 32,EL0 32>                                              
         Processor Features 1 = <>                                                                                    
      Memory Model Features 0 = <TGran4,TGran64,SNSMem,BigEnd,16bit ASID,16TB PA>                                     
      Memory Model Features 1 = <8bit VMID>                                                                           
      Memory Model Features 2 = <32bit CCIDX,48bit VA>                                                                
             Debug Features 0 = <2 CTX BKPTs,4 Watchpoints,6 Breakpoints,PMUv3,Debugv8>
             Debug Features 1 = <>
         Auxiliary Features 0 = <>
         Auxiliary Features 1 = <>
Trying to mount root from cd9660:/dev/iso9660/13_0_RELEASE_AARCH64_CD [ro]...
mountroot: waiting for device /dev/iso9660/13_0_RELEASE_AARCH64_CD...
Mounting from cd9660:/dev/iso9660/13_0_RELEASE_AARCH64_CD failed with error 19.

Loader variables:
  vfs.root.mountfrom=cd9660:/dev/iso9660/13_0_RELEASE_AARCH64_CD
  vfs.root.mountfrom.options=ro

Manual root filesystem specification:
  <fstype>:<device> [options]
      Mount <device> using filesystem <fstype>
      and with the specified (optional) option list.

    eg. ufs:/dev/da0s1a
        zfs:zroot/ROOT/default
        cd9660:/dev/cd0 ro
          (which is equivalent to: mount -t cd9660 -o ro /dev/cd0 /)

  ?               List valid disk boot devices
  .               Yield 1 second (for background tasks)
  <empty line>    Abort manual input

mountroot> unset acpi_load
Invalid file system specification.
 
what this means ?

# set debug.acpi.disabled ="hostres"

I read that I should choose "hostres" instead of hint.acpi.0.disabled="1" if I want to disable ACPI to allow qemu to boot properly the freebsd arm64 iso image.
 
what this means ?

# set debug.acpi.disabled ="hostres"

"[amd64, i386] FreeBSD 9.0-RELEASE includes several changes to improve resource
management of PCI devices. Some x86 machines may not boot or may have devices
that no longer attach when using ACPI as a result of these changes. This can be
worked around by setting a loader(8) tunable debug.acpi.disabled to hostres. To
do this, enter the following lines at the loader prompt:

set debug.acpi.disabled="hostres"
boot

Or, put the following line into /boot/loader.conf:

debug.acpi.disabled="hostres"
..."
 
Inside the iso image of freebsd there isn't any file called /boot/device.hints.
 

Attachments

  • 2021-07-12_16-04-34.png
    2021-07-12_16-04-34.png
    110.2 KB · Views: 180
FreeBSD-13.0-RELEASE-amd64-dvd1.iso.xz has a device.hints file.
For AARCH is see,
Code:
grep -i acpi menu-commands.4th
returns,
Code:
\ ACPI
: acpi_enable ( -- )
    s" set acpi_load=YES" evaluate \ XXX deprecated but harmless
    s" set hint.acpi.0.disabled=0" evaluate
    s" loader.acpi_disabled_by_user" unsetenv
: acpi_disable ( -- )
    s" acpi_load" unsetenv \ XXX deprecated but harmless
    s" set hint.acpi.0.disabled=1" evaluate
    s" set loader.acpi_disabled_by_user=1" evaluate
: toggle_acpi ( N -- N TRUE )
    acpienabled? if
        acpi_disable
        acpi_enable
    acpi_enable
 
so,what it means ? I'm not expert as you. I didn't understand which file I should edit to disable ACPI.
 
You can try to :
From /boot/loader.conf remove the line,
Code:
acpi_load="YES"
At /boot/loader.conf add the line,
Code:
hint.acpi.0.disabled=1
That is the boot option to disable ACPI.

If it works or how much is another question.
On my AMD64 PC, disabling ACPI let the kernel crash.
 
Back
Top