Re: dmesg memory not match spdmem and bios

2020-06-11 Thread Dumitru Moldovan

On Thu, Jun 11, 2020 at 12:57:24PM +, man Chan wrote:

I just want to know why OpenBSD/i386 have the memory limit to 4G. Thanks for 
your reply.  It is the design of OpenBSD/i386 is 32 bits OS not the hardware 
limitation.  It is ok for me to run OpenBSD/amd64 on a i5 machine. Thanks



The 4GB limit is not specific to OpenBSD/i386.  It's a hardware
limitation specific to the x86 platform (also known as i386).  Use the
OpenBSD/amd64 installer on your Intel i5 hardware, it will run better,
without being limited to 4GB of RAM, among others.

Trivia fact: all recent Intel processors use the amd64 architecture,
licensed from AMD.  Unfortunately, Intel's marketing conceals this as
much as possible, thus the confusion from the less tech-inclined people.

But you could have easily found all this online, especially after been
pointed repeatedly on this list.  So please consider not wasting other
people's time with such basic questions.  OpenBSD developers are few
and far between, and two of the most senior ones have already spent
time explaining you these basics.  Otherwise you risk being ignored even
when raising issues actually related to OpenBSD.



Re: dmesg memory not match spdmem and bios

2020-06-11 Thread man Chan
 I just want to know why OpenBSD/i386 have the memory limit to 4G. Thanks for 
your reply.  It is the design of OpenBSD/i386 is 32 bits OS not the hardware 
limitation.  It is ok for me to run OpenBSD/amd64 on a i5 machine. Thanks 

Clarence

Stuart Henderson () 在 2020年6月11日星期四 下午6:02:56 [GMT+8] 
寫道:  
 
 On 2020/06/11 05:04, man Chan wrote:
> What make it different ?
> 
> 1) arch==> i386  limit to 4G (dmesg) and  spdmem show 8G , Bios show 8G
> 2) arch==> amd64 memory show correct figure 8G (dmeag, spdmem and bios)
> 
> 1 & 2 use the same machine with different arch.
> 
> 
> So can I use the i5 core at i386 arch to use the correct size of memory
> (i.e 8G) and how to make it work .

You can't.

OpenBSD/i386 is a 32-bit OS. This requires addresses that fit in 32 bits,
that is the memory location is numbered 4294967295 (2^32) or lower.

You are already seeing all the memory that can work with the 32-bit kernel.

Why do you want to run i386 anyway? There are many downsides (less supported
memory, fewer CPU registers which means that many programs run slower, fewer
secury mitigations are available, more limited in terms of what software you
can run on it, etc).

To me, the only reason for running i386 on amd64-capable hardware is to compile
software on a fast new machine to run on other old machines that can't run a
64-bit OS..

  


Re: dmesg memory not match spdmem and bios

2020-06-11 Thread Steven Shockley
On 6/11/2020 8:57 AM, man Chan wrote:
>  I just want to know why OpenBSD/i386 have the memory limit to 4G.

All operating systems have this limit.  The 80386 was released to the
public in 1986, when 4 GB was an absurd amount of memory.

> It is ok for me to run OpenBSD/amd64 on a i5 machine. Thanks 

Yes.  Intel bet on Itanium/IA-64 for their 64-bit architecture.
Meanwhile, AMD designed their own 64-bit architecture that extended x86.
 Intel wound up licensing AMD's 64-bit architecture, which at the time
was called Intel 64 or EM64T.  Your i5 processor uses Intel 64, which is
compatible with amd64.



Re: dmesg memory not match spdmem and bios

2020-06-11 Thread Stuart Henderson
On 2020/06/11 05:04, man Chan wrote:
> What make it different ?
> 
> 1) arch==> i386  limit to 4G (dmesg) and  spdmem show 8G , Bios show 8G
> 2) arch==> amd64 memory show correct figure 8G (dmeag, spdmem and bios)
> 
> 1 & 2 use the same machine with different arch.
> 
> 
> So can I use the i5 core at i386 arch to use the correct size of memory
> (i.e 8G) and how to make it work .

You can't.

OpenBSD/i386 is a 32-bit OS. This requires addresses that fit in 32 bits,
that is the memory location is numbered 4294967295 (2^32) or lower.

You are already seeing all the memory that can work with the 32-bit kernel.

Why do you want to run i386 anyway? There are many downsides (less supported
memory, fewer CPU registers which means that many programs run slower, fewer
secury mitigations are available, more limited in terms of what software you
can run on it, etc).

To me, the only reason for running i386 on amd64-capable hardware is to compile
software on a fast new machine to run on other old machines that can't run a
64-bit OS..



Re: dmesg memory not match spdmem and bios

2020-06-11 Thread man Chan
 What make it different ?
1) arch==> i386  limit to 4G (dmesg) and  spdmem show 8G , Bios show 8G 
2) arch==> amd64 memory show correct figure 8G (dmeag, spdmem and bios)
1 & 2 use the same machine with different arch.


So can I use the i5 core at i386 arch to use the correct size of memory (i.e 
8G) and how to make it work .
Thanks
clarence

Theo de Raadt () 在 2020年6月11日星期四 上午9:18:43 [GMT+8] 寫道: 
 
 
 i386 showed the correct amount of memory *it could use*.

man Chan  wrote:

>  Thanks.  I tried to use amd64 which show the correct memory size.
> Is there a way to use i386 to show the correct size of memory ?  The bios 
> shows 8G memory.  Did I miss something to make it ?
> Clarence
> 
>    Stuart Henderson () 在 2020年6月11日星期四 上午12:41:40 
>[GMT+8] 寫道:  
>  
>  On 2020-06-10, man Chan  wrote:
> >  You mean the memory limitation of i386 is 4G.  Am I right ?
> 
> A 32-bit kernel can only access memory mapped to addresses below 4GB.
> 
> The actual amount of memory that you can use depends on where the
> BIOS/UEFI maps the memory (it reserves some addresses for device i/o
> etc).
> 
> That's why you see a lower "available memory" amount than 4GB.
> 
>    


Re: dmesg memory not match spdmem and bios

2020-06-10 Thread man Chan
 Thanks.  I tried to use amd64 which show the correct memory size.
Is there a way to use i386 to show the correct size of memory ?  The bios shows 
8G memory.  Did I miss something to make it ?
Clarence

Stuart Henderson () 在 2020年6月11日星期四 上午12:41:40 
[GMT+8] 寫道:  
 
 On 2020-06-10, man Chan  wrote:
>  You mean the memory limitation of i386 is 4G.  Am I right ?

A 32-bit kernel can only access memory mapped to addresses below 4GB.

The actual amount of memory that you can use depends on where the
BIOS/UEFI maps the memory (it reserves some addresses for device i/o
etc).

That's why you see a lower "available memory" amount than 4GB.

  


Re: dmesg memory not match spdmem and bios

2020-06-10 Thread Theo de Raadt
i386 showed the correct amount of memory *it could use*.

man Chan  wrote:

>  Thanks.  I tried to use amd64 which show the correct memory size.
> Is there a way to use i386 to show the correct size of memory ?  The bios 
> shows 8G memory.  Did I miss something to make it ?
> Clarence
> 
> Stuart Henderson () 在 2020年6月11日星期四 上午12:41:40 
> [GMT+8] 寫道:  
>  
>  On 2020-06-10, man Chan  wrote:
> >  You mean the memory limitation of i386 is 4G.  Am I right ?
> 
> A 32-bit kernel can only access memory mapped to addresses below 4GB.
> 
> The actual amount of memory that you can use depends on where the
> BIOS/UEFI maps the memory (it reserves some addresses for device i/o
> etc).
> 
> That's why you see a lower "available memory" amount than 4GB.
> 
>   



Re: dmesg memory not match spdmem and bios

2020-06-10 Thread man Chan
 thanks you .  will amd64 on my i5 machine
clarence

() 在 2020年6月10日星期三 下午10:17:51 [GMT+8] 寫道:  
 
 Haai,

"man Chan"  wrote:
> Hello,
> I just got a second Gaga-H97N-wifi motherbroad and installed openbsd6.6 
> Stable. The  dmesg shows real and avail memory does not  match with the 
> spdmem.  Anyone know how to solve this problem ?  Please help.
> Thanks
> Clarence
> OpenBSD 6.6-stable (GENERIC.MP) #1: Sun Jun  7 14:00:04 HKT 2020
>    r...@dell.my.domain:/usr/src/sys/arch/i386/compile/GENERIC.MP

i386 is limited to 4G of memory. Try amd64.

(In theory, there's PAE, but the developers appear to find it more
trouble than it's worth.) 

> real mem  = 3634733056 (3466MB)    
> avail mem = 3552747520 (3388MB)    
>[snip]
> spdmem0 at iic0 addr 0x50: 8GB DDR3 SDRAM PC3-12800  
> 

Good luck,

        --zeurkous.

-- 
Friggin' Machines!
  


FU: RE: dmesg memory not match spdmem and bios

2020-06-10 Thread zeurkous
[before someone starts shooting me...]

me wrote:
> i386 is limited to 4G of memory.

In reality, of course, it's 4G of address space... which is not
exclusively devoted to main memory. But, while that observation does
suggest a theoretical, partial work-around (reducing the amount of
address space taken up by other devices), it likely won't help OP much.

  --zeurkous.

-- 
Friggin' Machines!



RE: dmesg memory not match spdmem and bios

2020-06-10 Thread zeurkous
Haai,

"man Chan"  wrote:
> Hello,
> I just got a second Gaga-H97N-wifi motherbroad and installed openbsd6.6 
> Stable. The  dmesg shows real and avail memory does not  match with the 
> spdmem.  Anyone know how to solve this problem ?  Please help.
> Thanks
> Clarence
> OpenBSD 6.6-stable (GENERIC.MP) #1: Sun Jun  7 14:00:04 HKT 2020
> r...@dell.my.domain:/usr/src/sys/arch/i386/compile/GENERIC.MP

i386 is limited to 4G of memory. Try amd64.

(In theory, there's PAE, but the developers appear to find it more
trouble than it's worth.) 

> real mem  = 3634733056 (3466MB)
> avail mem = 3552747520 (3388MB)
>[snip]
> spdmem0 at iic0 addr 0x50: 8GB DDR3 SDRAM PC3-12800  
> 

Good luck,

--zeurkous.

-- 
Friggin' Machines!



Re: dmesg memory not match spdmem and bios

2020-06-10 Thread man Chan
 You mean the memory limitation of i386 is 4G.  Am I right ?
clarence


Zé Loff () 在 2020年6月10日星期三 下午10:08:24 [GMT+8] 寫道:  
 
 

Wrong architecture.  You should be running amd64, not i386

On Wed, Jun 10, 2020 at 02:02:32PM +, man Chan wrote:
> Hello,
> I just got a second Gaga-H97N-wifi motherbroad and installed
> openbsd6.6 Stable. The  dmesg shows real and avail memory does not 
> match with the spdmem.  Anyone know how to solve this problem ? 
> Please help.
> Thanks
> Clarence
> OpenBSD 6.6-stable (GENERIC.MP) #1: Sun Jun  7 14:00:04 HKT 2020
>     r...@dell.my.domain:/usr/src/sys/arch/i386/compile/GENERIC.MP
                                            

-- 
 
  


dmesg memory not match spdmem and bios

2020-06-10 Thread man Chan
Hello,
I just got a second Gaga-H97N-wifi motherbroad and installed openbsd6.6 Stable. 
The  dmesg shows real and avail memory does not  match with the spdmem.  Anyone 
know how to solve this problem ?  Please help.
Thanks
Clarence
OpenBSD 6.6-stable (GENERIC.MP) #1: Sun Jun  7 14:00:04 HKT 2020
    r...@dell.my.domain:/usr/src/sys/arch/i386/compile/GENERIC.MP
real mem  = 3634733056 (3466MB)    
avail mem = 3552747520 (3388MB)    
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: date 04/13/12, SMBIOS rev. 2.7 @ 0xecf50 (76 entries)
bios0: vendor American Megatrends Inc. version "F6" date 02/02/2015
bios0: Gigabyte Technology Co., Ltd. H97N-WIFI
acpi0 at bios0: ACPI 5.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT SSDT SSDT SSDT MCFG HPET SSDT SSDT DMAR
acpi0: wakeup devices PEG0(S4) PEGP(S4) PEG1(S4) PEGP(S4) PEG2(S4) PEGP(S4) 
RP01(S4) PXSX(S4) PXSX(S4) PXSX(S4) RP04(S4) PXSX(S4) RP05(S4) PXSX(S4) 
PXSX(S4) PXSX(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz ("GenuineIntel" 686-class) 3.71 
GHz, 06-3c-03
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 100MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4, IBE
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz ("GenuineIntel" 686-class) 3.31 
GHz, 06-3c-03
cpu1: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz ("GenuineIntel" 686-class) 3.31 
GHz, 06-3c-03
cpu2: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz ("GenuineIntel" 686-class) 3.31 
GHz, 06-3c-03
cpu3: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
ioapic0 at mainbus0: apid 8 pa 0xfec0, version 20, 24 pins
acpimcfg0 at acpi0
acpimcfg0: addr 0xf800, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG0)
acpiprt2 at acpi0: bus -1 (PEG1)
acpiprt3 at acpi0: bus -1 (PEG2)
acpiprt4 at acpi0: bus 1 (RP01)
acpiprt5 at acpi0: bus 2 (RP04)
acpiprt6 at acpi0: bus 3 (RP05)
acpiec0 at acpi0: not present
acpicpu0 at acpi0: C2(200@117 mwait.1@0x30), C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: C2(200@117 mwait.1@0x30), C1(1000@1 mwait.1), PSS
acpicpu2 at acpi0: C2(200@117 mwait.1@0x30), C1(1000@1 mwait.1), PSS
acpicpu3 at acpi0: C2(200@117 mwait.1@0x30), C1(1000@1 mwait.1), PSS
acpipwrres0 at acpi0: PG00, resource for PEG0
acpipwrres1 at acpi0: PG01, resource for PEG1
acpipwrres2 at acpi0: PG02, resource for PEG2
acpipwrres3 at acpi0: FN00, resource for FAN0
acpipwrres4 at acpi0: FN01, resource for FAN1
acpipwrres5 at acpi0: FN02, resource for FAN2
acpipwrres6 at acpi0: FN03, resource for FAN3
acpipwrres7 at acpi0: FN04, resource for FAN4
acpitz0 at acpi0: critical temperature is 105 degC
acpitz1 at acpi0: critical temperature is 105 degC
"PNP0A08" at acpi0 not configured
acpicmos0 at acpi0
"INT33CA" at acpi0 not configured
acpibtn0 at acpi0: PWRB
acpibtn1 at acpi0: SLPB
"PNP0C0B" at acpi0 not configured
"PNP0C0B" at acpi0 not configured
"PNP0C0B" at acpi0 not configured
"PNP0C0B" at acpi0 not configured

Re: dmesg memory not match spdmem and bios

2020-06-10 Thread Stuart Henderson
On 2020-06-10, man Chan  wrote:
>  You mean the memory limitation of i386 is 4G.  Am I right ?

A 32-bit kernel can only access memory mapped to addresses below 4GB.

The actual amount of memory that you can use depends on where the
BIOS/UEFI maps the memory (it reserves some addresses for device i/o
etc).

That's why you see a lower "available memory" amount than 4GB.



Re: dmesg memory not match spdmem and bios

2020-06-10 Thread Zé Loff



Wrong architecture.  You should be running amd64, not i386

On Wed, Jun 10, 2020 at 02:02:32PM +, man Chan wrote:
> Hello,
> I just got a second Gaga-H97N-wifi motherbroad and installed
> openbsd6.6 Stable. The  dmesg shows real and avail memory does not 
> match with the spdmem.  Anyone know how to solve this problem ? 
> Please help.
> Thanks
> Clarence
> OpenBSD 6.6-stable (GENERIC.MP) #1: Sun Jun  7 14:00:04 HKT 2020
>     r...@dell.my.domain:/usr/src/sys/arch/i386/compile/GENERIC.MP


--